ffmpeg

FFmpeg is a command-line program available for Linux, windows, and mac. It is used to convert videos from one format to another. Many professional video encoders depend on FFmpeg to do the encoding in the background.

Install ffmpeg

How to use ffmpeg

Streaming

Steaming to Anti Media Server using ffmpeg

Convert mp4 to hls stream

ffmpeg -i video.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls video.m3u8

Saving a steam with ffmpeg

ffmpeg -i "stream_url" -c copy -f mpegts test.ts

Example

The following command will save the steam as 1.mp4

ffmpeg -i "rtmp://cp.livecastnet.com:1935/85nortetv/live" 1.mp4

To convert video into HLS steam

ffmpeg -i video.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls 1.m3u8

error: ‘x264_bit_depth’ undeclared (first use in this function

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *