Rodja
Rodja

Reputation: 8081

How to capture an ip camera (mjpeg) stream and replay it later via commandline?

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?

Upvotes: 4

Views: 12170

Answers (1)

Rodja
Rodja

Reputation: 8081

I figured it out by myself:

$ vlc  -I dummy  -vvv test-stream.asf -L --sout '#standard{access=http,mux=mpjpeg,dst=:8080}'

Upvotes: 3

Related Questions