Livestream stuttering
#1
I'm using LibreElec 7.0.3 on my RPi 3 and I'm - as the thread title suggests - eperiencing livestream stutters. I'm able to watch YouTube, or stream videos from my NAS, but many Internet livestreams start stuttering up to a point, where the stream becomes unwatchable.

This is my advancedsettings.xml file:
Code:
<advancedsettings>
<network>
<cachemembuffersize>104857600</cachemembuffersize>
<readbufferfactor>50</readbufferfactor>
</network>
<pvr>
<minvideocachelevel>60</minvideocachelevel>
<minaudiocachelevel>60</minaudiocachelevel>
</pvr>
</advancedsettings>
Even though I've increased my membuffersize up to 100MiB, it still does not prevent stuttering on my pvr for instance. (Although, I haven't figured out what minvideo- and minaudocachelevel exactly accomplish). Is there anything else I might be missing? I have tested they streams in my browser and they seem to work fine, therefore I assume this is an issue on my end.

Thanks for thelp!

Link to my Log:
http://pastebin.com/PTBuT0ra
Reply
#2
The log doesn't have debug enabled, so isn't much help.

Does PVR have same issues with recordings as live TV?

Might be worth trying a Krypton beta build.
Reply
#3
Thanks for your response, I have debug log enabled now and will upload it as soon as the error occurs. Right now, everything seems to be fine though.

Actually, I've never watched anything but livestream with PVR.

If the problem persists, I'll definitely try Krypton.
Reply
#4
Ok, the error occured again and I find these entries suspicious:

Code:
22:51:44 481.623108 T:1426584480   DEBUG: ffmpeg[5507F3A0]: [NULL] Current profile doesn't provide more RBSP data in PPS, skipping
22:51:45 482.991882 T:1963388928   DEBUG: CMMALRenderer::FlipPage - not configured: source:1
22:51:45 482.992035 T:1963388928   DEBUG: CMMALRenderer::ReleaseBuffer - bypass: source:0
22:51:46 483.359558 T:1963388928   DEBUG: CMMALRenderer::RenderUpdate - bypass: clear:0 flags:0 alpha:255 source:0
22:51:46 483.524994 T:1963388928   DEBUG: Previous line repeats 1 times.
22:51:46 483.525146 T:1963388928   DEBUG: CMMALRenderer::FlipPage - not configured: source:2
22:51:46 483.525208 T:1963388928   DEBUG: CMMALRenderer::ReleaseBuffer - bypass: source:1
22:51:46 483.525391 T:1963388928   DEBUG: CMMALRenderer::RenderUpdate - bypass: clear:0 flags:0 alpha:255 source:0
22:51:46 483.550232 T:1426584480   DEBUG: ffmpeg[5507F3A0]: [NULL] Current profile doesn't provide more RBSP data in PPS, skipping
Reply
#5
So, I've updated to Krypton and this problem still exists, sometimes the livestream's stutters are too annoying to keep watching. Everytime it stutters, the following is written to the log:
  • CVideoPlayer::CheckContinuity
  • CDVDClock::SetSpeedAdjust
  • CVideoPlayer::OMXDoProcessing Resume
  • OMXClock::OMXSetSpeed(1.000)
  • ffmpeg[4C1FF3A0]: skipping 1
  • CVideoPlayer::OMXDoProcessing Resume

advancedsettings.xml:
Code:
<advancedsettings>
<cache>
<memorysize>104857600</memorysize>
<buffermode>1</buffermode>
<readfactor>10.0</readfactor>
</cache>
</advancedsettings>

log file (I've enabled DEBUG at 22:16)
http://pastebin.com/xW4eSE0c
Reply
#6
Disable omxplayer (leave mmal enabled) in video/acceleration settings.
Reply
#7
Thanks for your response, disabling omxplayer (and leaving mmal enabled) didn't sole the problem either. Today I edited my advancedsettings.xml to:

Code:
<advancedsettings>
<cache>
<memorysize>209715200</memorysize>
<buffermode>1</buffermode>
<readfactor>100.0</readfactor>
</cache>
</advancedsettings>

This seems to decrease the stuttering. (It does still happen, but far less freqeuently an the video doesn't pause very long). That being said, I've experienced a crash today, propably due to unsufficient free memory (or a too high readbufferfactor).
Reply
#8
It's almost certainly the failure of the servers providing the content to keep up with demand. Exactly what is the source of these livestreams?
Reply
#9
I'm acessing the following streams (The first one stopped working on LibreELEC a few weeks ago, but still works fine on my notebook with VLC player):

Code:
https://zdf0910-lh.akamaihd.net/i/dach10_v1@392872/master.m3u8
http://apasfiisl.apa.at/ipad/orf1_q4a/orf.sdp/playlist.m3u8
http://apasfiisl.apa.at/ipad/orf2_q4a/orf.sdp/playlist.m3u8
http://apasfiisl.apa.at/ipad/orf3_q4a/orf.sdp/playlist.m3u8

The other three streams are provided by the Austrian Press Agency and consist of Austria's public channel streams.
Reply
#10
I just wanted to post an update:

Unfortunately, I still experience livestream stuttering via the simple IPTV client and via addons. I tried disabling OMX and MMAL and neither of these approaches worked. OMX seems to be able recover more quickly from longer stutters, while MMAL doesn't appear to have have shorter stutters. Oddly enough, disabling both yielded the best result, but that might have been a coincidence.

I disabled OMX at 22:54 and MMAL at 23:20, then I continued watching without any hardware acceleration.

When watching with OMX the kodi.log file has the following messages while stuttering:
Code:
22:53:29.225 T:1406137248   DEBUG: CVideoPlayer::OMXDoProcessing Resume 5.81,7.86 (A:00 V:00) EOF:0 FULL:1 T:12.80
22:53:29.225 T:1406137248   DEBUG: OMXClock::OMXSetSpeed(1.000) pause_resume:1
22:53:37.732 T:1406137248   DEBUG: ffmpeg[53CFF3A0]: skipping 1 segments ahead, expired from playlists
22:53:39.506 T:1406137248   DEBUG: CVideoPlayer::CheckContinuity - resync forward :2, prev:449897999.666657, curr:459937999.666651, diff:9954000.000002
22:53:39.506 T:1406137248   DEBUG: CVideoPlayer::CheckContinuity - resync forward :2, prev:449897999.666657, curr:459977999.666659, diff:9994000.000010
22:53:39.507 T:1406137248   DEBUG: CVideoPlayer::CheckContinuity - resync forward :1, prev:449962666.333315, curr:460031999.666663, diff:10048000.000014
22:53:39.507 T:1406137248   DEBUG: CVideoPlayer::CheckContinuity - update correction: 10048000.000014
22:54:07.366 T:1693447072   DEBUG: CRepositoryUpdater: busy playing. postponing scheduled update

Here are MMAL's messages:
Code:
23:19:53.592 T:1212646304   DEBUG: ffmpeg[484783A0]: skipping 1 segments ahead, expired from playlists
23:19:53.607 T:1439167392   DEBUG: OutputPicture - dropped in output
23:19:53.607 T:1439167392    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 25.000000 fps
23:19:53.607 T:1439167392   DEBUG: OutputPicture - dropped in output
23:19:55.449 T:1439167392    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
23:19:55.751 T:1212646304   DEBUG: CVideoPlayer::CheckContinuity - resync forward :2, prev:119881999.666659, curr:129921999.666652, diff:9921999.999996
23:19:55.751 T:1212646304   DEBUG: CVideoPlayer::CheckContinuity - resync forward :1, prev:119978666.333323, curr:129983999.666658, diff:9984000.000001
23:19:55.751 T:1212646304   DEBUG: CVideoPlayer::CheckContinuity - update correction: 9984000.000001
23:19:55.751 T:1439167392   DEBUG: OutputPicture - dropped in output
23:19:55.754 T:1439167392   DEBUG: Previous line repeats 6 times.
23:19:55.754 T:1439167392   DEBUG: CMMALVideo::SetDropState - bDrop(1)
23:19:55.755 T:1439167392   DEBUG: CMMALVideo::SetDropState - bDrop(0)
23:19:56.157 T:1439167392    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 25.000000 fps
23:19:56.686 T:1439167392    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback

Finally, messages without hw acceleration:
Code:
23:29:28.295 T:1299182496    INFO: CVideoPlayerVideo - Stillframe detected, switching to forced 25.000000 fps
23:29:28.396 T:1299182496    INFO: CVideoPlayerVideo - Stillframe left, switching to normal playback
23:29:28.471 T:1940349856   DEBUG: ActiveAE::SyncStream - average error -123.104954 above threshold of 100.000000
23:29:28.471 T:1940349856   DEBUG: ActiveAE::SyncStream - average error -23.104954 below threshold of 30.000000
23:29:29.520 T:1940349856   DEBUG: ActiveAE::SyncStream - average error -147.722817 above threshold of 100.000000
23:29:29.520 T:1940349856   DEBUG: ActiveAE::SyncStream - average error -0.722817 below threshold of 30.000000

The weird thing about all of this is that the stream I'm watching is at 360p - so from a speed perspective it should be able to handle it. I'm sorry for the split log, but pastebin doesn't allow larger files than 512KiB:

Log 1: http://pastebin.com/TSKJehBX
Log 2: http://pastebin.com/QapRz81j
Log 3: http://pastebin.com/d4pYDS7h
Log 4: http://pastebin.com/1maQskQh
Reply
#11
Can you check behaviour with those streams on another platform? e.g. kodi on windows?
Reply
#12
I installed Kodi on my MacBook and had the same issues:

Code:
20:55:40.274 T:123145417134080   DEBUG: CVideoPlayerVideo::CalcDropRequirement - hurry: 1
20:55:40.441 T:123145417134080   DEBUG: Previous line repeats 2 times.
20:55:40.441 T:123145417134080   DEBUG: CVideoPlayerVideo::CalcDropRequirement - dropped in decoder, lateframes: 1467, Bufferlevel: 1, dropped: 1
20:55:40.483 T:123145417670656  NOTICE: CVideoPlayerAudio::Process - stream stalled
20:55:40.487 T:123145416060928   DEBUG: CVideoPlayer::HandlePlaySpeed - audio stream stalled, triggering re-sync
20:55:40.487 T:123145416060928   DEBUG: CVideoPlayer::FlushBuffers - flushing buffers

So, it is a problem with the stream provider and I just have to wait?

Complete Log: http://pastebin.com/nzDbiK5r
Reply
#13
(2017-03-14, 22:06)d3nnycr4n3 Wrote: I installed Kodi on my MacBook and had the same issues:

Well, we now know it's a generic kodi issue, rather than a Pi issue.
I'd suggest a trac ticket which should get the attention of the right dev.
Reply
#14
Thanks, I just submitted a bug report.
Reply

Logout Mark Read Team Forum Stats Members Help
Livestream stuttering0