Kodi Community Forum

Full Version: Passthrough-compatible A/V sync methods removed
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
"sync playback to display" aka "smooth video" is designed to change the speed of the playing video. That is what has been done in PAL areas: 23.976 videos were played back on 50hz displays. The result was, that the video ran faster by 4%. We allow a change of speed in the range of 5%.

Changing the speed of video contradicts with passthrough audio where the speed can't be changed.
Yeah - I liked my sports guys, trying to speed up the cup of water supply :-)
I don't see why it makes my post useless/wrong, I still think that when "sync playback to display" is not needed (which obviously is automatically checked) it does not make sense to disable passthrough for people who activated it.
There exists no 100% perfectly matching file that 100% matches the display clock. And btw. if that would be the case - you would not need Sync Playback to Display _at _ all.
(2017-02-18, 19:20)fritsch Wrote: [ -> ]There exists no 100% perfectly matching file that 100% matches the display clock.

What is the error range? I guess it doesn't really make sense to speed up sound by 0.0000001% and maybe the "sync" option could come with a lower bound (fixed or chose by the user).
But OK, it starts to sound complicated, guess I need to modify the code myself to get what I want.

(2017-02-18, 19:20)fritsch Wrote: [ -> ]And btw. if that would be the case - you would not need Sync Playback to Display _at _ all.
You would still need it if your TV does not support the refresh rate of the file, that was my point: sometimes you need sync sometimes you dont.
But I thought sync was to watch 23.976p movies on non-23.976p TVs, but I did not know it was to watch (23.976 +/- 0.001)p movie on (23.976 +/- 0.001)p TV.
The very moment your TV does not support 23.976 - it would perhaps support 24.0? Then even a perfect file would not work properly when syncing to display.

For the first question:
Think if the clock would only go wrong one 2ms per second and you would not do something about that. Then audio would be half a second off after < 5 mins of watching.
My TV does support 23.976 and 24hz, I'm just trying to understand. I ran a movie with sync enabled and I got:
...
23:49:59.057 T:140209383524096 DEBUG: CVideoPlayer::SetCaching - caching state 3
23:49:59.057 T:140209383524096 DEBUG: CDVDClock::SetSpeedAdjust - adjusted:0.000000
23:49:59.057 T:140209383524096 DEBUG: CVideoPlayer::SetCaching - caching state 0
23:49:59.057 T:140209383524096 DEBUG: CDVDClock::SetSpeedAdjust - adjusted:0.000000
23:49:59.057 T:140209383524096 DEBUG: VideoPlayer::Sync - Audio - pts: 213000.000000, cache: 227529.986318, totalcache: 442666.679621
23:49:59.057 T:140209383524096 DEBUG: VideoPlayer::Sync - Video - pts: 0.000000, cache: 50000.000000, totalcache: 100000.000000
23:49:59.057 T:140208226531072 DEBUG: CVideoPlayerAudio - CDVDMsg::GENERAL_RESYNC(-100000.000000)
23:49:59.058 T:140208236906240 DEBUG: CVideoPlayerVideo - CDVDMsg::GENERAL_RESYNC(-100000.000000)
23:49:59.058 T:140208226531072 DEBUG: CDVDAudio::Resume - resume audio stream
23:49:59.058 T:140208236906240 DEBUG: CVideoPlayerVideo::CalcDropRequirement - hurry: 0
23:49:59.058 T:140208236906240 NOTICE: VDPAU::CreateContext - creating decoder context
23:49:59.058 T:140210511320832 DEBUG: ActiveAE - start sync of audio stream
23:49:59.161 T:140210511320832 DEBUG: ActiveAE::SyncStream - average error of 88.448430, start adjusting
...

From the first lines I would say that here there was no need to enable "sync payback to display" but from the other ones it seems the option is needed, could you explain me please?
What you posted here has nothing to do with that. It's a stream start, where video and audio clock are synced, two different threads producing audio / video packages.

So what's your "first line"?
debug: http://paste.ubuntu.com/24026491/

OK so what are the related lines? Is it: DEBUG: CVideoReferenceClock: Clock speed 100.000233% ?
(2017-02-18, 19:58)LoupD Wrote: [ -> ]
(2017-02-18, 19:20)fritsch Wrote: [ -> ]There exists no 100% perfectly matching file that 100% matches the display clock.

What is the error range? I guess it doesn't really make sense to speed up sound by 0.0000001% and maybe the "sync" option could come with a lower bound (fixed or chose by the user).
But OK, it starts to sound complicated, guess I need to modify the code myself to get what I want.

(2017-02-18, 19:20)fritsch Wrote: [ -> ]And btw. if that would be the case - you would not need Sync Playback to Display _at _ all.
You would still need it if your TV does not support the refresh rate of the file, that was my point: sometimes you need sync sometimes you dont.
But I thought sync was to watch 23.976p movies on non-23.976p TVs, but I did not know it was to watch (23.976 +/- 0.001)p movie on (23.976 +/- 0.001)p TV.

The application can't tell if refresh rate matches video fps. Some platforms still do not expose refresh rate an a floating point. In addition the refresh rate reported by the driver may be wrong (not exact).
Pages: 1 2