Sound and video asynchronous for H.264 with AAC on raspberry pi3

I’m still doing some experiments to find out why DRM PRIME fails. Thus I’ve selected all default settings for player and videos sections within OSMC 19.4 (thus HW acceleartion will be enabled). And I’ve set the whitelist as recommended within the HOWTOs. Then I’ve watched different streams from German broadcast services (arte - 3sat - SWR), and ctuplink. To my surprise videos from arte are in sync (as are those from ctuplink). But 3sat and SWR fail with big offsets between sound and video. Inspecting the kodi.log unrevealed a potential reason: ctuplink is sending with 30 fps 1280x720 - being rendered with 60 fps. arte is sending with 25 fps 1280x720 - being rendered with 50 fps. Otherwise 3sat is using 50 fps 1280x720 - a supported resolution, but out of sync. And SWR is even using 50 fps 1920x1080 - again a supported resolution, but out of sync.

Conclusion: My pi3 seems not to be capable to support input stream with fps higher then 30. I was not aware of those differences among the input streams - all claim to be 720p H.264 with AAC sound. The different fps is somewhere behind the scene, but probably important.

Regards, Michael

The only difference I can see between your Pi3 and mine (which plays 720p50 from 3sat just fine) is I’m on Debian Bullseye so maybe you could give that a try.

@grahamh : Thank you very much for your patience. And for your hint that it is working fine with bullseye. Since I’m running some other tasks, too, on my OSMC pi3, I will wait for the final OSMC bullseye release. Otherwise my other tasks would be interrupted - not so good for e.g. my 24/7 weather station:-) BTW - it is really astonishing how many tasks work in parallel on such a small device without any trouble.

Regards, Michael

We’ve just noticed you have Audio output set to ‘Optimized’. Try ‘Best match’.

No improvement. But audio works fine, it’s just some seconds ahead. And the offset increases continuously. It feels, as if the video cannot be rendered “fast” enough and is played instead slightly slower than the audio. Thus the audio is more and more ahead.

Regards, Michael

News w. r. t asynchronous sound and video within the addon ARDundZDF. It has resolved by itself. Now sound and video are perfect in sync, even for 1080p streams. Of course there were some updates for that addon. But I also had to reboot my raspi3 (because I wanted to replace my power strip). There was no change in configuration of kodi 19.4 ressp. OSMC).

My guess: rebooting did the trick. My raspi is typically up 24/7 for months. But I start kodi always when I want to use it and stop it afterwards (using systemctl).

Regards, Michael

1 Like