Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Record incoming mjpeg stream?

I have a incoming mjpeg stream from an IP cam. Now I can show it using ffmpeg and openGL, but when I tried to save all the incoming streams into a file and play it later, the player(VLC) fails to open the file.

I was told I need to add some header when I start/stop the recording to let the player know the file's format. But I could not find any reference on this topic. Could anyone share a example on this topic?

like image 849
Nyaruko Avatar asked Mar 14 '23 08:03

Nyaruko


1 Answers

try,

ffmpeg -i http://x.x.x.x/axis-cgi/mjpg/video.cgi?resolution=320x240 -an -vcodec flv file.flv

work for me in VLC and others players.

like image 81
Jarek Avatar answered Mar 24 '23 02:03

Jarek