Intel VAAPI howto with Leia v18 nightly based on Ubuntu 18.04 server
(2015-09-16, 17:28)ggp759 Wrote:
(2015-09-16, 15:16)FernetMenta Wrote: the point is that you can't adjust refresh rate to match video to a 100% match.

Ok. Saw you are saying that i should have both options enabled?

No. Sync Playback syncs perfectly the fps to the videoclock. Simplified, whenever we change the front with the backbuffer one fps is displayed. This happens fps count a second. Fully in vsync -> perfect video. Problem here is: If video and audio don't match exactly.

Use case a) The VSync Clock runs at 23.99 fps and not at 23.976 fps -> no problem for video as it is just displayed "a bit" faster -> you won't notice. Cause in perfect vsync 23.99 fps are displayed per second - perfectly matching your screen, just like a clock - always doing: tick, tick, tick e.g. frame, frame, frame - the clock just runs faster as a 23.976 clock would run - no one cares. Problem comes into play, when you have audio. Cause audio and video would go ahead of each other. Therefore one needs to do something when this is happening.

With passthrough audio: we only have two choices drop or dupe and that you can hear very loud if you have bad luck, it makes a famous psssst noise to correct this offset.
Without passthrough audio: We resample a bit and video stays perfectly in sync and you won't even notice anything

=> Reason why you should disable it when you passthrough.

In a perfect world where videos are really exactly 23.976 fps and your refreshrate is really 23.976 hz -> Sync Playback does not harm (even if you passthrough), but it won't be able to help you - as everything is perfect already. And: world is not perfect.

Use case b) You play 59.94 fps content at 60 hz -> vclock "speeds it up" automatically, cause swapBuffers every 1000 / 60.0 ms vs. 1000 / 59.94 ms -> audio needs to be speed up too.
With passthrough: drop samples (ugly, bad experience)
Without passthrough: resample with a factor > 1 - audio will get a little bit higher in tone -> but you won't realize.

Adjust Refreshrate to match video is something else - it tries to find a refreshrate, so that Refreshrate % (modulo) fps == some even non fractional value. 25 fps at 50 hz is fine, 23.976 fps at 23.976 hz is fine. 23.976 at 24.0 hz -> not fine. But with RefClock -> no issue video wise.

So to summarize:
- Use Adjust Refreshrate to match video: good precondition to have the Sync Playback do a nice job afterwards
- Use Adjust Refreshrate to match video: also if you are a passthrough audio user - cause 23.976 fps content + passthrough audio played at 60 hz - won't work without either visual stutter or audio drops.
- Passthrough audio sucks for "perfect playback" as video clock might not match fps exactly, we need to drop / dupe or resync after 200 ms off
- Enable Sync Playback to Display _if_ you don't use passthrough audio as it cares for perfect video while maintaining your audio in sync without you noticing.

Edit: Not covered in here: What happens if you play 24.0 fps content at 60 hz? How would you play 23.976 fps at 60 hz? -> Some wikipedia for the dear user able to read: https://en.wikipedia.org/wiki/Three-two_pull_down

Personally: I don't use passthrough audio at all - I have a 5.1 capable LPCM receiver which I feed directly. Since we have dcadec support - I even can decode DTS-HDMA and have perfect audio also in combination with perfect video.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply


Messages In This Thread
RE: New Era: VAAPI with EGL interoperation - by fritsch - 2015-09-16, 18:15
Live TV broken again? - by schamane - 2016-02-29, 19:56
Random crashes - by hal2100 - 2016-03-08, 22:03
Strange Behaviour - by MicTie - 2016-12-07, 10:46
Working lirc with mce remote - by fr1day - 2019-08-10, 17:36
Logout Mark Read Team Forum Stats Members Help
Intel VAAPI howto with Leia v18 nightly based on Ubuntu 18.04 server18