eladg / ffmpeg-by-example

Creative Commons Attribution 4.0 International
8 stars 5 forks source link

Stream local file to RTMP Server and Client - FFmpeg By Example #81

Open eladg opened 2 years ago

eladg commented 2 years ago

https://www.ffmpegbyexample.com/examples/yk0wt5pl/stream_local_file_to_rtmp_server_and_client/

The following command will take an input.mp4 file and 'copy' it over the RTMP protocol. The -listen 1 parameter instructs FFmpeg to wait for a connection. Once a client is connected (ffplay, VLC, or any video player that supports RTMP), FFmpeg will start transmitting the frames data over the RTMP protocol.

Note: -c copy means that FFmpeg will not re-encode the video and transmit the video frames in their original size, bitrate, and encoding.

For a full list of supported flags and settings for the RTMP protocol, refer to the official RTMP documentation