Short audio gap after skipping in 15.1
#16
Hi

Will this one ever get merged in?
Reply
#17
(2016-03-07, 20:14)candyman2000 Wrote: Hi

Will this one ever get merged in?

It was merged about three months ago.
Reply
#18
Strange I'm still getting audio delay on both Android and Windows clients
Reply
#19
(2016-03-15, 23:19)candyman2000 Wrote: Strange I'm still getting audio delay on both Android and Windows clients

Likewise. Unfortunately the audio lag still remains on my setup. Windows 8 ~ Kodi-20160423-979e6d0-master.exe (nightly as of 24-Apr-2016 09:02)

14.2 is the last version which does not exhibit this bug.
Reply
#20
As am I on all of my machines (Windows 10, Ubuntu, Raspberry Pi 2 and Amazon Fire TV), so it's clearly not been fixed.
Reply
#21
The entire videoplayer in v17 has been reworked, so I would not expect flawless playback until later on in the v17 development cycle. In other words, this is a car engine that has been taken apart and is still being put back together. It's one of the biggest changes to video playback in the project's history.
Reply
#22
(2015-12-17, 20:12)FernetMenta Wrote:
(2015-12-17, 02:19)errr Wrote: Maybe KODI could "learn" to be more patient, less anxious, and wait until both video and audio streams are ready to be played together, and only then (re)start playing.

It learned a lot Smile https://github.com/xbmc/xbmc/pull/8486
That's more than 10000 lines of code diff to Jarvis (incorrectly indicated by GIthub due to renaming)

Actually it does almost what you put in words. It sends data to audio and video players and waits for response. Both players signal back current timestamp when they have filled their buffers. VideoPlayer takes this info, sets the clock, and finally starts the stream players.

I took this comment to imply that the issue had been fixed. Does this still show as an "open" issue (either on trac or github) so I can follow developments?
Reply
#23
I am sure there is still a lot of potential for optimizations but I have no clue what you guys are observing. Here are some measurement on a Linux system with ALSA which I consider reference.

This log is after a seek forward:

Code:
19:29:33 T:140468415346432   DEBUG: CVideoPlayer::HandleMessages - player started 1
19:29:33 T:140470868023680   DEBUG: Keyboard: scancode: 0x72, sym: 0x0113, unicode: 0x0000, modifier: 0x0
19:29:33 T:140468423739136 WARNING: CVideoSurfaces::ClearReference - surface invalid
19:29:33 T:140468415346432   DEBUG: CVideoPlayer::HandleMessages - player started 2
19:29:33 T:140468415346432   DEBUG: CVideoPlayer::SetCaching - caching state 3
19:29:33 T:140468415346432   DEBUG: CVideoPlayer::SetCaching - caching state 0
19:29:33 T:140468415346432   DEBUG: VideoPlayer::Sync - Audio - pts: 14682000.000000, cache: 287107.679903, totalcache: 570666.670799
19:29:33 T:140468415346432   DEBUG: VideoPlayer::Sync - Video - pts: 14348000.000000, cache: 50000.000000, totalcache: 100000.000000
19:29:33 T:140468423739136   DEBUG: CVideoPlayerVideo - CDVDMsg::GENERAL_RESYNC(14248000.000000)
19:29:33 T:140468893501184   DEBUG: CVideoPlayerAudio - CDVDMsg::GENERAL_RESYNC(14248000.000000)
19:29:33 T:140468893501184  NOTICE: -------- resume at : 14258.093241
19:29:33 T:140468893501184   DEBUG: CDVDAudio::Resume - resume audio stream
19:29:33 T:140470378051328   DEBUG: ActiveAE - start sync of audio stream
19:29:33 T:140470868023680  NOTICE: VAAPI::Close
19:29:33 T:140468902569728  NOTICE: COutput::OnExit: Output Thread terminated
19:29:33 T:140468902569728   DEBUG: Thread Vaapi-Output 140468902569728 terminating
19:29:33 T:140470378051328   DEBUG: ActiveAE::SyncStream - average error of 161.309244, start adjusting
19:29:33 T:140470378051328   DEBUG: ActiveAE::SyncStream - average error 5.202139 below threshold of 30.000000
19:29:33 T:140470378051328  NOTICE: ------- time: 14496.024358 - buffer: 0.341438

You see that first audio packet coming from demuxer has a timestamp of 14.682 sec
Before resume videoplayer clock is set to 14.248 sec
Audioengine manages it to sync audio at time: 14.496 sec
At this time we have an audio buffer of 341 ms, this means that we get audible audio at 14.469 + 0.341 = 14.810

Remember that our first audio packet had a timestamp of 14.682.

That means that you lose approximately 130 ms of audio after a seek forward.

In this example first video packet was 334 ms earlier than audio. Means that pictures started moving 334 + 130 = 464 ms before audible audio.

Remember earlier version had stuttering video after a seek because audio changes the clock.
Reply
#24
Hi FernetMenta. I can't speak for Linux, but on a Windows machine (Windows 8 in my case) it is very easy to reproduce.

- Take any version of Kodi after 14.2

- Pause any video after seeking or regular play

- Resume play

Audio resumes about a second after the video resumes.

It may seem like a minor defect to some but it ruins the experience for me. I appreciate all the hard work and sacrifice you guys put in but I'll just have to stick with 14.2 until a resolution can be found.

Regards.
Reply
#25
The title of this thread is "Short audio gap after skipping"

If you have an issue with pausing, open another thread.

(2016-04-27, 20:25)GeneralDisarray Wrote: I'll just have to stick with 14.2 until a resolution can be found.

Feel free to use any version that you prefer most or a different player.
Reply
#26
My apologies FernetMenta. I confused my issue with this. I've posted about it in a new thread -> http://forum.kodi.tv/showthread.php?tid=271583
Reply



Logout Mark Read Team Forum Stats Members Help
Short audio gap after skipping in 15.10
This forum uses Lukasz Tkacz MyBB addons.