Skip to content

Instantly share code, notes, and snippets.

@cAstraea
Last active February 8, 2018 15:28
Show Gist options
  • Save cAstraea/bcb5c33225f1dc442b0fcf10c5d4b21b to your computer and use it in GitHub Desktop.
Save cAstraea/bcb5c33225f1dc442b0fcf10c5d4b21b to your computer and use it in GitHub Desktop.
ffmpeg stream commands
//transmux rtmp to hls stream with encoding
./ffmpeg -v verbose -i rtmp://52.197.22.*:1935/live1/nar-4 -c:v libx264 -c:a aac -ac 1 -strict -2 -tune zerolatency -crf 23 -preset veryfast -profile:v baseline -maxrate 1560k -bufsize 1560k -x264opts keyint=30:min-keyint=10:no-scenecut -b:v 500k -threads 0 -g 60 -movflags +faststart -flags -global_header -hls_time 10 -hls_list_size 6 -hls_wrap 10 -start_number 1 /var/www/symfony/nar-4.m3u8
//transmux rtmp to hls stream without encoding
./ffmpeg -v verbose -i rtmp://52.197.22.*:1935/live1/nar-4 -c copy -flags -global_header -hls_time 10 -hls_list_size 6 -hls_wrap 10 -start_number 1 /var/www/symfony/nar-4.m3u8
thumbnail every 2 minutes
/usr/local/bin/ffmpeg/ffmpeg-3.4.1-64bit-static/ffmpeg -i rtmp://52.197.22.22*:1935/live1/greenchannel1 -s 1000x564 -r 1 -vf fps=1/120 -an -updatefirst 1 -y /var/www/symfony/img/greenchannel1.jpg
/usr/local/bin/ffmpeg/ffmpeg-3.4.1-64bit-static/ffmpeg -i rtmp://52.197.22.22*:1935/live1/nar-4 -s 1000x564 -r 1 -vf fps=1/120 -an -updatefirst 1 -y /var/www/symfony/img/nar-4.jpg
/usr/local/bin/ffmpeg/ffmpeg-3.4.1-64bit-static/ffmpeg -i rtmp://52.197.22.22*:1935/live1/nar-2 -s 1000x564 -r 1 -vf fps=1/120 -an -updatefirst 1 -y /var/www/symfony/img/nar-2.jpg
/usr/local/bin/ffmpeg/ffmpeg-3.4.1-64bit-static/ffmpeg -i rtmp://52.197.22.22*:1935/live1/greenchannel2 -s 1000x564 -r 1 -vf fps=1/120 -an -updatefirst 1 -y /var/www/symfony/img/greenchannel2.jpg
/usr/local/bin/ffmpeg/ffmpeg-3.4.1-64bit-static/ffmpeg -i rtmp://52.197.22.22*:1935/live1/nar-3 -s 1000x564 -r 1 -vf fps=1/120 -an -updatefirst 1 -y /var/www/symfony/img/nar-3.jpg
/usr/local/bin/ffmpeg/ffmpeg-3.4.1-64bit-static/ffmpeg -i rtmp://52.197.22.22*:1935/live1/nar-5 -s 1000x564 -r 1 -vf fps=1/120 -an -updatefirst 1 -y /var/www/symfony/img/nar-5.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment