Web playback stuttering (Linux hardware transcoder)

I was hoping this thread would track down the issue I am seeing, but if you say it is only the Mac transcoder, it will not.

I’ve got as TS-251+ that is only running Channels DVR. It’s connected to a gigabit switch using LAG (two gigabit Ethernet cables).

I see stuttering after two or so minutes in Safari on the iPad (802.11AC 2.4 & 5 ghz.), Safari and Chrome on an iMac (1 gigabit Ethernet).

In all cases the log looks clean. This is for any resolution. I have only tried hardware transcoding. Speed is always significantly over one. I believe I’ve seen it as high as 1.8).

Please consider that this issue might be bigger than you suggest. Since you guys have a TS-251+, may I ask if you have tried web playback lately?

I don’t mean to hijack the thread. If you are sure it’s a different issue, I’ll start a new thread after this one is resolved.

I have been streaming off my TS-251+ with no issue.

What hdhomerun model?

Have you tried recently, after the fix in Web GUI playback (Linux/NAS hardware transcoder)

[New model] Extend with transcoder set to None.

Yes, I have tried with 2017.01.21.0059.

And this is both on live tv and with recordings? What about with the software transcoder?

Caveat: unlike above post, in this case I am recording an NFL game while testing. Also note: I stopped the live playback of the game on the ATV because that seems to use the second tuner.

I played NBC 11.1 live for 5 minutes with no issues. Next, I played an NBC 11.1 recorded show and the stuttering—very short stutters, as always—started when the transcoder read 2:21 seconds. At no time did the transcoder speed get down close to 1.

I’ll try software transcoding now.

What if you pause the web player for a bit and let it buffer?

Watched the same prerecorded show as above with the software encoder and had no issues.

For completeness, I’ve run these tests at 480p (but I don’t think it matters).

So, have you watched prerecorded shows with hardware transcoding on the TS-251+? It might be good to figure out what’s different about our setups. On the other hand, if no one else is seeing this, I’m OK with putting this issue on the back burner.

Back to same prerecorded show (each time I’m picking up where I left off). Also, back to hardware acceleration.

Played a little over two minutes and got the stutter.

Paused and waited one minute.

Hit play and stutter resumed immediately and continued.

I’ll see if I can reproduce with a prerecorded show on my QNAP. I only tried live last week. There is a difference between the transcoder used between the two, so that could explain the behavior.

Thanks for giving it a try when you have time.

You will have to decide if this hypothesis is plausible, but perhaps the issue arises when the buffer gets too big. Transcoding is staying over 1 and builds up over two minutes and change until the stuttering starts. Restarting after a long pause results in stuttering immediately.

Ah great observation. I bet I know what’s causing it. Does the log show rapid pause/resume of transcoder?

It does not show any pausing of the transcoder.

2017/01/22 17:42:41 [HLS] Starting transcoder for file-13 at 25m54s
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: va_openDriver() returns 0
[mpegts @ 0x18c8e40] PES packet size mismatch
[mpegts @ 0x18c8e40] Dropped corrupted packet (stream = 1)
[mpegts @ 0x18c8e40] PES packet size mismatch
[mpegts @ 0x18c8e40] Dropped corrupted packet (stream = 1)
[mpegts @ 0x18c8e40] PES packet size mismatch
[mpegts @ 0x18c8e40] Dropped corrupted packet (stream = 1)
[mpegts @ 0x18c8e40] PES packet size mismatch
[mpegts @ 0x18c8e40] Dropped corrupted packet (stream = 1)
Unrepairable overflow!
2017/01/22 17:45:19 [HLS] Stopping transcoder session file-13
2017/01/22 17:45:19 [HLS] error during ffmpeg progress: unexpected EOF

Can you describe the stuttering… is it just the audio or does the video freeze and resume as well?

Reproduced! Thanks for reporting, will take a look.

Very cool! Thanks!

This has been fixed in DVR v2017.01.23.2004. Thanks for reporting!

I’m still experiencing the stutter. Is the fix only for new recordings?

Should work for all recordings.

I was seeing stuttering almost immediately after starting a recording playback before, and am not anymore. Using 1080p hardware transcoder on TS-251+ with a recording of Elementary from local FOX station.

Can you post the new transcoder logs?

Unlike yesterday, I’m doing this remotely; but same behavior.

Transcoding was >1.5 throughout. Stuttering started ~2 minutes and the was frequent (on avg every second or two).

Unremarkable Log:

2017/01/23 15:07:12 [HLS] Starting transcoder for file-13 at 35m30s (encoder=h264_vaapi, resolution=240, deinterlacer=blend, bitrate=4000)
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: va_openDriver() returns 0
[mpegts @ 0x18c8e00] PES packet size mismatch
[mpegts @ 0x18c8e00] Dropped corrupted packet (stream = 1)
[mpegts @ 0x18c8e00] PES packet size mismatch
[mpegts @ 0x18c8e00] Dropped corrupted packet (stream = 1)
[mpegts @ 0x18c8e00] PES packet size mismatch
[mpegts @ 0x18c8e00] Dropped corrupted packet (stream = 1)
[mpegts @ 0x18c8e00] PES packet size mismatch
[mpegts @ 0x18c8e00] Dropped corrupted packet (stream = 1)
2017/01/23 15:09:56 [HLS] Stopping transcoder session file-13 @ 39m50.226644s