Envek / dockerized-browser-streamer

Stream video of any website (but WebRTC things works best) to RTMP endpoint. Launch it in Docker. Pray if it works.
24 stars 8 forks source link

Out of sync audio and video #3

Open amarmashruwala opened 1 year ago

amarmashruwala commented 1 year ago

Hi Envek,

Have you experienced out of sync audio and video when you run this container?

what are the exact values you are using in your FFMPEG filter complex to sync the audio and video? could you please share your ffmpeg code.

mine is -filter_complex "aresample=async=1000:min_hard_comp=0.100000:first_pts=0,adelay=delays=562|562" \

Any issues you see with this? sometimes the sync is on and sometimes it is off. usually audio is early compared to video.

What can i change to shift audio in sync with video?

thank you!

Envek commented 1 year ago

As far as I remember, delay always was more or less constant, so I was fine with constant compensation delay here: https://github.com/Envek/dockerized-browser-streamer/blob/cce86821221d7ef49fd257900b852b7088d3836a/ffmpeg.sh#L40-L41

I'm not using this thing anymore, so not sure what could change (or what can influence that delay)

amarmashruwala commented 1 year ago

Ok thank you. Yes the delay is more of less constant. I have used -itsoffset on tue input instead of adelay on the output, and -async 1 on the output. This seems to help constant delay. It still is sometimes out of sync.

amarmashruwala commented 1 year ago

You mentioned you are not using this anymore. Are you using something else instead to livestream a browser source? Thanks

Envek commented 1 year ago

No, just don't have a need in this anymore.