logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
grantvnetwork  
#1 Posted : Tuesday, October 3, 2017 7:42:56 PM(UTC)
grantvnetwork

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
grantvnetwork  
#2 Posted : Wednesday, October 4, 2017 2:05:51 AM(UTC)
grantvnetwork

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;
Users browsing this topic
Guest
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.