seofere.blogg.se

Ffmpeg h264 codec example
Ffmpeg h264 codec example









ffmpeg h264 codec example ffmpeg h264 codec example

Leveraging the “native process” feature of AIR it is simple to launch a command line like the one above and do the job. One of the partecipants at the conference could fetch a local file and stream it to the conference FMS to show, in realtime, the same file to other partecipants. In which scenario can be useful a command like that ?įor example, suppose to have created a communication or conference tool in AIR. In this case remember that the CPU power requested for a live encoding can be high and cause loss in frame rate or stuttering playback on subscribers’ side. Obviously it would be also possible to encode on the fly the input video. The input file must have audio and video codec compatible with FMS, for example H.264 for video and AAC for audio but any supported codecs combination should work. With -c copy (alias -acodec copy -vcodec copy ) I’m telling FFmpeg to copy the essences of the input file without transcoding, then to package them in an FLV container ( -f flv) and send the final bitstream to an rtmp destination (rtmp://server/live/streamName). The -re option tells FFmpeg to read the input file in realtime and not in the standard as-fast-as-possible manner. ffmpeg -re -i localFile.mp4 -c copy -f flv rtmp://server/live/streamName

ffmpeg h264 codec example

This can be very useful for test purpose but also to create pseudo-live channels. With the help of FFmpeg it is possible for example to stream a pre-encoded file to FMS as if it were a live source. FFmpeg works with FMS as well as Wowza Server and RED5, so in the article I will use FMS as a generic term to mean any “RTMP-server”.ġ. Sometimes there are minor bugs but generally speaking the rtmplib works well and helps FMS to fill the gap with some advanced feature of Wowza Server (like re-purposing of rtp/rtsp stream, TS-stream and so on). Using some of the parameters that we have seen in the first three parts of the series, it’s possible to do a lot of things that the standard Flash Streaming Ecosystem cannot offer. Where rtmp_proto can be: “ rtmp“, “ rtmpt“, “ rtmpte“, “ rtmps“, “ rtmpte“, “ rtmpts” and options contain a list of space-separated options in the form key=val (more info here). An RTMP stream can be used both as an input and/or as an output in a command line. In this article I will focus on the support for RTMP that makes FFmpeg an excellent tool for enhancing the capabilities of the Adobe Flash Streaming Ecosystem.įFmpeg introduced a strong support for RTMP streaming with the release 0.5 by the inclusion of the librtmp (rtmpdump) core. PART IV – FFmpeg for streaming (revised 0) PART II – Parameters and recipes (revised 0)











Ffmpeg h264 codec example