vMix Forums
»
General
»
General Discussion
»
Live stream push to nginx+ffmpeg transcoded audio drifting out of sync
Rank: Newbie
Groups: Registered
Joined: 8/26/2017(UTC) Posts: 7 Location: Texas
|
I am having an issue and am not sure if I am allowed to ask here. We are pushing an rtmp stream to our nginx+ffmpeg transcoder. Nginx forwards the stream and transcodes it to 2x lower quality streams. The origin stream play fine and stays in sync. The transcodes streams have audio drift. Basically the audio slowly goes out of sync. Anyone have any ideas?
My Nginx exec command:
exec_push /root/bin/ffmpeg -r 30 -i rtmp://127.0.0.1:1935/$app/$name -async 1 -vsync -1 -c:v libx264 -c:a aac -b:v 256k -b:a 32k -vf "scale=480:trunc(ow/a/2)*2" -tune zerolatency -preset veryfast -crf 23 -f flv rtmp://127.0.0.1:1935/show/$name_low -c:v libx264 -c:a aac -b:v 768k -b:a 64k -vf "scale=720:trunc(ow/a/2)*2" -tune zerolatency -preset veryfast -crf 23 -f flv rtmp://127.0.0.1:1935/show/$name_mid -c copy -f flv rtmp://127.0.0.1:1935/show/$name_src 2>>/var/log/ffmpeg.log
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 8/26/2017(UTC) Posts: 7 Location: Texas
|
I fixed it by changing the ffmpeg command. I think the issue is that I was already pushing 30fps rtmp and ffmpeg was set to change framerate to the same 30fps with the "-r 30" option.
Here is my working command:
exec_push /root/bin/ffmpeg -i rtmp://127.0.0.1:1935/$app/$name -async 1 -vsync -1 -c:v libx264 -c:a aac -b:v 256k -b:a 64k -vf "scale=480:trunc(ow/a/2)*2" -tune zerolatency -preset veryfast -crf 23 -f flv rtmp://127.0.0.1:1935/show/$name_low -c:v libx264 -c:a aac -b:v 768k -b:a 96k -vf "scale=720:trunc(ow/a/2)*2" -tune zerolatency -preset veryfast -crf 23 -f flv rtmp://127.0.0.1:21935/show/$name_mid -c copy -f flv rtmp://127.0.0.1:1935/show/$name_src 2>>/var/log/ffmpeg.log;
|
|
|
|
vMix Forums
»
General
»
General Discussion
»
Live stream push to nginx+ffmpeg transcoded audio drifting out of sync
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The vMix Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close