I have a mjpeg stream in a fifo (comes from gphoto2 --capture-movie) and I want to play that stream in chromium. To capture the mjpeg stream I use:
gphoto2 --capture-movie --stdout> fifo.mjpg
Now I'm having hard times to figure out how to convert that stream into something I can play in chromium (e.g. video-tag or via javascript).
I have tried to use ffmpeg to convert the stream using the following command
gphoto2 --capture-movie --stdout> fifo.mjpg & ffmpeg -i fifo.mjpg -vcodec h264 -acodec copy test.mp4 </dev/null
but that produced an corrupt mp4 file. I think I somehow need to redirect the output of ffmpeg into a second fifo. Bu I have no idea how to do that. could not find anything in the manual of ffmpeg. thanks for your help.