Kodi15 with VNSI: Audio drops & Out of Sync
#16
(2015-07-21, 21:48)mule1 Wrote: Does this new fix mean that vnsi needs resampling and xvdr not and therefore this fix will help or am i totally wrong with my conclusion?

No, that is not the case. Live streams can't fill the buffers once playback has started because they come in in real time. For this reason pvr does pre-buffering. You see this when tuning to channels: "buffering". When watching the same channel for a long time the buffers either run dry or overflow because the clock on the PC is not in sync with the clock the video is produced.
In order to cope with this I have implemented a mechanism that changes clock speed when the buffer level comes close to an end. I only use "sync playback to display" (because I think the other methods don't make much sense, in particular now that we have DTS-HD MA). I simply forgot the case that drops/dupe audio packets for a/v sync.

Your system is a boarder case because the audio device has a large internal buffer that sucks out the audio queue right after playback has started. You can also increase minaudiocachelevel, see pvr advancedsettings.

xvdr may have not shown this issue by chance because its demuxer sends audio packets before first video I-Frame has been detected.
Reply
#17
Thanks for your detailed explanation! This explains why i could use xvdr even without any cache/buffer ("cacheindvdplayer = false" in advanced settings) while vnsi would produce endless audio hickups without cache/buffer.
Will try your fix and report backup asap. Once again thanks for quick support!
Reply
#18
Just made a patch and compiled OpenELEC myself and tested it: Thumbs up! Stuttering is gone and the log is "clean" now! Now i can finally migrate to Kodi15 :-)

One ot question: Would it be possible to have an option in vnsi so that the demuxer works as in xvdr (sends audio packet without waiting für I-Frame)? This could give the possibility to switch off caching as with xvdr and would result in much faster zapping.

EDIT: Sorry to say, but it is not solved. Tested some more time and the stutter appears once again. This time without any hint in the logs. Any idea what i could test/do?
Reply
#19
plaese elaborate on stuttering. what exactly do you observe?
Reply
#20
checkout this https://github.com/xbmc/xbmc/pull/7587
Reply
#21
Just chcked it out but unfortunately it doesn't solve the issue.

I tried to record a movie via iPhone but the quality is too low and with different fps between TV and iPhone it is nearly not recognizable. The stutter looks like a frame is being repeated 1 or 2 times and therefore the video freeezes for a very short time (split second). It does not appear all the time. Sometimes it's there for 2 or 3 minutes then disappears and after some time its there once again. Sometimes it starts right after a channel switch sometimes not.
Although there is no stutter with XVDR i tried it on different TVs and even on a cheap Sony which has no frame Interpolation or some similar gimmick the stutter is present.
Reply
#22
what do skip and drop counter do in this situation?
Reply
#23
Do you have enabled "avoid epg scan while streaming"?
Reply
#24
"avoid epg scan while streaming" is enabled on kodi frontend or do you mean the vnsi option on the vdr backend?

Skip and drop counter remain zero.
Reply
#25
(2015-07-22, 20:25)mule1 Wrote: "avoid epg scan while streaming" is enabled on kodi frontend or do you mean the vnsi option on the vdr backend?

Skip and drop counter remain zero.

server side.
Reply
#26
Set it on server with no change regarding stutters.

It's driving me nuts :-)
Reply
#27
please compile my master branch and post a log. it will log any dropped or missing frame. let me know the time you observed the stutter so I can relate it to the section of the log.

i run my master branch and master of kodi-pvr/vnsi and don't observe this issue
Reply
#28
Thx once again! I'm going to test it on the upcoming weekend.
Reply
#29
we just discovered another lock which may be responsible too:
https://github.com/xbmc/xbmc/pull/7596
Reply
#30
The latest fix didn't solve it either. Will try your master upcoming weekend.
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi15 with VNSI: Audio drops & Out of Sync0