Page 1 of 1

Capture mjpeg stream to file, transcode, append problems

Posted: 25 Sep 2008 18:54
by Phylth
Hi All --

I am having problems capturing a few seconds of an HTTP-streamed mjpg on a regular schedule, and appending it to a locally-saved file. The stream is coming from a static webcam with no audio. I'd like to set up something that schedules a short daily capture, ultimately creating a time-lapse video.

First I tried a "dump" to file using the following code (where "xxx.xxx.xxx.xxx" is the remote server IP):

Code: Select all

"c:\program files\videoLAN\VLC\vlc.exe" vlc -I dummy --run-time=10 http://xxx.xxx.xxx.xxx/video.mjpg :demux=dump :demuxdump-file=test.mjpg --demuxdump-append vlc://quit
But no matter how long I set the run-time, the resulting mjpg file seemed to play only the first frame for a fraction of a second. The file got bigger with each new instance, showing that "append" was working, but still the first frame was all I got.

Suspecting a problem with the functionality of a dump I tried transcoding, as follows:

Code: Select all

"c:\program files\videoLAN\VLC\vlc.exe" vlc -I dummy --run-time=20 http://xxx.xxx.xxx.xxx/video.mjpg --sout=#transcode{vcodec=mp2v}:std{access=file{append},dst=test.mpg} vlc://quit
This time I get a video clip that sometimes works (at least in media player classic, if not VLC), although the frame rate of the output varies like crazy.

I want to get the best possible capture of this video at its native resolution and frame rate. If anyone can offer possible solutions for both the capture issue and appending to the existing file I'd be really grateful.

Dave

Re: Capture mjpeg stream to file, transcode, append problems

Posted: 26 Sep 2008 18:50
by VLC_help
Does it work better if you don't transcode with second command line?