steep-balloon-41261
09/14/2023, 8:09 PMmagnificent-art-43333
09/14/2023, 9:42 PMacoustic-engineer-41666
09/14/2023, 10:18 PMfancy-author-2900
09/14/2023, 10:28 PMchilly-animal-65189
09/14/2023, 11:44 PMchilly-animal-65189
09/15/2023, 10:26 PMfancy-author-2900
09/18/2023, 6:21 PMmpegts-whip library so I don't want to take up your time time with it.fancy-author-2900
09/21/2023, 3:26 PMmpegts-whip developers and we are finding that using a different whip playback endpoint, we don't get the audio/video synchronization errors, so I am wondering if there is a problem on livekit's end. About 75% of the time I send WHIP to livekit, I get synchronization errors such that the lips of a speaker do not match the audio of the voice. Typically the audio lags behind the video. If you are able to look up previous streams in your logs, you could try looking for Ingress IN_QVnTEJEAFmd7 and/or ROOM IDs RM_4cTvb6wyWEBz or RM_hjLBq3mdBLmKfancy-author-2900
09/21/2023, 3:27 PMfancy-author-2900
09/21/2023, 3:34 PMfancy-author-2900
09/21/2023, 3:38 PMchilly-animal-65189
09/21/2023, 4:17 PMfancy-author-2900
09/21/2023, 4:21 PMfancy-author-2900
09/25/2023, 4:10 PMmpegts-whip to try to troubleshoot synchronization issues with whip ingress used with bypass_transcoding: true .... @quiet-address-2256 is the developer and will now join this thread. He has done a detailed study of the issue and will provide his findings here. Thank again.quiet-address-2256
09/25/2023, 4:16 PMchilly-animal-65189
09/25/2023, 6:26 PMfancy-author-2900
09/25/2023, 7:06 PMchilly-animal-65189
09/25/2023, 7:25 PMquiet-address-2256
09/26/2023, 10:59 AMfancy-author-2900
09/26/2023, 11:14 AMg parameter ( https://stackoverflow.com/questions/66218565/what-does-g-flag-mean-in-ffmpeg ) .. which I think is related, but I don't know if mpegts-whip is somehow over-riding this value.quiet-address-2256
09/26/2023, 11:14 AMfancy-author-2900
09/26/2023, 11:25 AMmpegts-whip 's output to, which, if he were to try to amend `mpegts-whip`'s output, he might might be most likely to provide the needed stream data such that the video and audio of mpegts-whip output stream does not lose synchronization when played through LiveKit with bypass_encoding: true ?fancy-author-2900
09/26/2023, 11:27 AMquiet-address-2256
09/26/2023, 11:29 AMchilly-animal-65189
09/26/2023, 3:52 PMquiet-address-2256
09/27/2023, 7:28 AMfancy-author-2900
09/27/2023, 11:01 PMIN_2C6Rhf7FfUYv .. and also we tried a WHIP ingress with bypass_whip_transcoding: false, with whip ingress id IN_KN2rwqSjGFdd
So far we are unable to achieve a stable ingress into LiveKit.
RTMP has great audio/video synchronization. Maybe only once or twice have we seen problems with audio/video synchronization with RTMP, out of 50+ attempted streams. The problem with RTMP is random dropouts and with time/pitch shifting. Our service uses background music, so random dropouts or pitch shifting, which might not be a big deal for videoconference, are a real problem.
WHIP ingress is much more stable with regard to random dropouts or pitch shifting -- these almost never happen. WHIP also has lower overall latency when compared with RTMP. The problem with WHIP ingress is the audio/video synchronization.
We're using whip-mpegts to convert a local SRT stream to a WHIP stream. We've tried both setting bypass_whip_transcoding: true and bypass_whip_transcoding: false, and in both cases there can be audio/video synchronization problems, typically the audio falling behind the video. The issue is very challenging to debug, because sometimes the synchronization is perfect -- I can stop and start my stream ten times, and each time it is perfect. But then I come back an hour later, and do the same thing, and each time I start and stop the stream, the synchronization is way off, and it looks like the person speaking in our video's lips do not match the audio.
I'm beginning to think the issue might be on LiveKit's end, or in any case, I'm not sure how to troubleshoot it better on my end. If anyone is interested I'd be happy to share a docker compose file which you could quickly start, put in your own WHIP endpoint url, and you should be able to reproduce the problem (again, it might take a few tries for the problem to show.)