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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With