To test a software which processes ip camera streams (eg. mjpeg) I would like to capture a short sequence from an original camera and later stream this recording in loop as if it would come from an ip camera. It should be commandline based to simplify automated integration testing.
I already figured out the recording part (capturing 10 seconds):
$ vlc -I dummy --run-time=10 http://192.168.0.142:8080/videofeed --sout=file/asf:test-stream.asf vlc://quit
How to use vlc or similar to loop this recording as a mjpeg stream served on http://localhost:8080 or similar?
I figured it out by myself:
$ vlc -I dummy -vvv test-stream.asf -L --sout '#standard{access=http,mux=mpjpeg,dst=:8080}'