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

11,515

I figured it out by myself:

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

Rodja

Updated on June 05, 2022

Comments

  • Rodja
    Rodja almost 2 years

    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?

  • praxmon
    praxmon about 10 years
    Hello the command that I am trying to use is: vlc -I dummy --run-time=20 http://169.254.159.110//axis-cgi/mjpg/video.cgi --sout=#std{access=file,mux=ps,dst=1.mpg} Do you know where I am going wrong? I am trying to do the same thing, that is capture the stream.