Created
October 11, 2013 09:38
-
-
Save rdkls/6932166 to your computer and use it in GitHub Desktop.
ffmpeg command to product segmented variant m3u8 playlist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
basename=/mnt/warehouse/grouch_core/live/grouch_ramdisk | |
mkdir -p $basename/$1 | |
( | |
cd $basename/$1 | |
/usr/local/bin/ffmpeg -i rtmp://172.16.1.14/publish/$1 \ | |
-acodec copy \ | |
-f segment \ | |
-flags -global_header \ | |
-map 0 \ | |
-vbsf h264_mp4toannexb \ | |
-segment_wrap 10 \ | |
-segment_format mpegts \ | |
-segment_list_flags +live \ | |
-segment_list_type m3u8 \ | |
-segment_list live.m3u8 \ | |
-vcodec libx264 \ | |
-b:v 2M \ | |
-segment_list $1.2M.m3u8 \ | |
$1-%03d.2M.ts \ | |
\ | |
-b:v 1M \ | |
-segment_list $1.1M.m3u8 \ | |
$1-%03d.1M.ts \ | |
\ | |
-b:v 500k \ | |
-segment_list $1.500k.m3u8 \ | |
$1-%03d.500k.ts \ | |
\ | |
-b:v 250k \ | |
-segment_list $1.250k.m3u8 \ | |
$1-%03d.250k.ts | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment