Answer the question
In order to leave comments, you need to log in
How to set up a stream in two pass encoding?
At the moment we have a config
worker_priority -19;
user www-data;
worker_processes auto;
events {
worker_connections 8192;
use epoll;
multi_accept on;
}
rtmp_auto_push on;
rtmp {
server {
listen 1935;
max_message 10M;
chunk_size 8192;
max_streams 32;
sync 10ms;
application potok<>{
live on;
record off;
exec nice --20 ffmpeg -re -i rtmp://127.0.0.1/potok -vcodec libx264 -g 60 -preset slow -b:v 7800k -maxrate 7800k -bufsize 7800k -s 1664x936 -x264opts nal-hrd=cbr:force-cfr=1:keyint=120:scenecut=0 -sws_flags lanczos -acodec copy -r 60 -f flv rtmp://127.0.0.1:1935/transcode_potok;
}
application transcode_potok {
live on;
meta copy;
push rtmp://сайт с ключем;
}
exec nice --20 ffmpeg -re -i rtmp://127.0.0.1/potok -vcodec libx264 -g 60 -preset slow -b:v 7800k -maxrate 7800k -bufsize 7800k -s 1664x936 -x264opts nal-hrd=cbr:force-cfr=1:keyint=120:scenecut=0 -sws_flags lanczos -acodec copy -r 60-pass 1 -f flv /dev/null;
exec nice --20 ffmpeg -re -i rtmp://127.0.0.1/potok -vcodec libx264 -g 60 -preset slow -b:v 7800k -maxrate 7800k -bufsize 7800k -s 1664x936 -x264opts nal-hrd=cbr:force-cfr=1:keyint=120:scenecut=0 -sws_flags lanczos -acodec copy -r 60 -pass 2 -f flv rtmp://127.0.0.1:1935/transcode_potok;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question