FORUMS: list search recent posts

Live streaming with FFmpeg

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Terry Wilson
Live streaming with FFmpeg
on Mar 10, 2012 at 6:16:03 am

I want to input a continous stream of images into FFmpeg (using a NamedPipe) and send the resulting continuous video stream out through a NamedPipe and then subsequently to an HTML5 based client application utilizing the video tag.

I have the input and output mechanisms working but I am not sure about the format I should be using for the output video stream. I was going to use MP4 but I have read a couple of posts that suggest MP4 is not an appropriate format for a continuous video stream. I was hoping that someone here could clarify this for me and suggest what video format could be used to send a continuous stream that could be generated by ffmpeg displayed by the HTML5 video tag.

Note I tried an intermediate step where I simply write the output stream I received through the NamedPipe to a mp4 file. The resultant file is not recognized as a valid mp4 file. If I change my ffmpeg command to write the output directly to an mp4 file, then the resultant file displays correctly. The two files appear almost identical except that the one I wrote based on the output from the NamedPipe is about 68 bytes longer then the valid one. If I try to use ffplay to display the video, it says "moov atom not found". Perhaps this is related to my first question about trying to stream mp4.

Any suggestions would be appreciated.

Terry


Return to posts index

Reuben Martin
Re: Live streaming with FFmpeg
on Mar 10, 2012 at 5:53:16 pm

MP4 is ok, but for a live stream, MPEG-TS is a much better option.

As for named pipes, they can be tricky, because processes are blocked until there are connections on both ends of the pipe. You can get more control and unblock processes creating file descriptors and using those to interface with the pipe.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]