Kodi Community Forum

Full Version: "sync playback to display", best sync method?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I was wondering which sync method will be the best to use in my setup. I'm using optical spdif passthrough for audio and 24Hz capable plasma TV so I guess video clock resample is out of the picture. Between audio clock and video clock (drop/dupe), should I expect any differences?

regards,
Video clock will cause jerks to keep a/v sync and drop/dupe will cause audio artifacts.
So it depends what bothers you the most.

In both cases you have to make sure your video can be played on the refreshrate without changing the speed, for example if you have 29.97 fps video your refreshrate will have to be exactly 59.94 hertz, if it's a little bit higher your video will play slightly too fast and you'll get jerks or skipped audiopackets.

If you want almost perfect sync you should set the synctype to drop/dupe, play a video for about an hour or so and examine the log for skipped or duplicated audiopackets, the length of the audiopackets together with the interval at which they're dropped/duplicated will tell you how much the refreshrate is off.

This all doesn't matter when using resample because the PI will keep perfect a/v sync all the time.
Many thanks for the explanation bobo1on1,

As I'm using passthrough and I'm sensible to video judder I'm using "video clock (drop/dupe)". I've tested it with a 23.97 video. XBMC seems to change refresh allright to 24Hz and it seems the sync algorithm is working as it creates audio packets. In the log file I see loads of this:

22:56:54 T:139666727172432 M:2866921472 DEBUG: CDVDPlayerAudio:: Duplicating 1 packet(s) of 32.00 ms duration
22:59:23 T:139666727172432 M:2868068352 DEBUG: CDVDPlayerAudio:: Duplicating 1 packet(s) of 32.00 ms duration
23:01:46 T:139666727172432 M:2868154368 DEBUG: CDVDPlayerAudio:: Duplicating 1 packet(s) of 32.00 ms duration

(complete log file is here)

My guess is that was the sync algorithm doing its job? Huh

In any case, audio was allright (could not detect any artifact). However, I seem to still notice somehow framedrops in the video (but there are no report of frame drops in the log :-?). Maybe it is the video file itself with problems (lost episode 720p) or I'm just being oversensible to it but ...

I also tried one of my kid episodes (which is 30fps). XBMC correctly sets my display to 60Hz but in the log I also see the sync working and audio packets are also created as before. Shouldn't it be in sync now that refresh rate and fps match??

(Log with 30fps video here).

Sorry for my confusion Confused I might be reading the log completely wrong though... Best regards,
Increase your pixelclock for the 23.976 hertz modeline by 0.020645161 percent.

You also need a 59.94 hertz modeline, you're playing 29.97 fps video at 60 hertz which causes the video to be played at 30 fps, so you'll get lots of packet skips.
Thanks for pointing it out bobo1on1,

The second video is also not exactly 30fps but 29.97fps so of course it should also skip... Nod

bobo1on1 Wrote:Increase your pixelclock for the 23.976 hertz modeline by 0.020645161 percent.
You also need a 59.94 hertz modeline, you're playing 29.97 fps video at 60 hertz which causes the video to be played at 30 fps, so you'll get lots of packet skips.

Unfortunately I'm using a plasma TV so only 24, 50 and 60Hz modelines are available. No 59.94 or 23.97 modelines for me.

In any case I'll investigate further the first video and log as I'm almost certain I could still see some frame drops / jerkiness in the video. Again, I'm fairly sure it might the video itself so I'll check with some other movies/series as I see them.

Thanks again for the clarification.
bobo1on1 Wrote:Increase your pixelclock for the 23.976 hertz modeline by 0.020645161 percent.

You also need a 59.94 hertz modeline, you're playing 29.97 fps video at 60 hertz which causes the video to be played at 30 fps, so you'll get lots of packet skips.

Thanks for the suggestion, i have exactly the same problem as the topic starter.

I spend the whole last weekend trying to figure out how to get the playback right and almost wanted to return my new LCD Wink

It would be really super nice of you if you could lead me to a info how i can increase the pixel clock so i can finally fully enjoy those movies on xbmc.

xbmc rocks! Smile

thanks much in advance!!!
So what does the Video Clock (resample audio) exactly do? The internal decoders then work on the audio? Also not a good option if you want your AVR to do that. So there is no way to perfectly sync video and audio for a 24p tv?