Web playback stuttering (Linux hardware transcoder)

What show/channel is that file?

It’s strange that you only see the issue after a few minutes of transcoding. I’m not able to reproduce.

2017/01/23 15:32:42 [HLS] Starting transcoder for file-7 at 0s (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 @ 0x18c8de0] PES packet size mismatch
[mpegts @ 0x18c8de0] Dropped corrupted packet (stream = 1)
[mpegts @ 0x18c8de0] PES packet size mismatch
[mpegts @ 0x18c8de0] Dropped corrupted packet (stream = 2)
Unrepairable overflow!
2017/01/23 15:36:34 [HLS] Stopping transcoder session file-7 @ 6m15.641944s

Does it happen consistently with other recordings too?

Once the stream starts stuttering, can you access the QNAP filesystem to tar/zip up the Streaming directory in your Recordings folder and share that with me.

It happens on all recordings with hardware transcoding. It does not happen on live TV, nor does it happen with software transcoding.

Here’s a clip of the stuttering. As you can see, there is no issue with transcoding speed. Also, this happens with Safari on iOS and MacOS (as well as Chrome on MacOS).

I poke around for the streaming directory and tar it for you.

Strange. That almost looks like corruption in the recording, haven’t seen stuttering like that before.

It is not in the recording. I can play the same part again and, if I start at that point, it will play just fine. Also, remember, it plays fine with software transcoding.

I’ll message you to figure out how to get you the tar of the stream.

file-8.tar.gz sent to [email protected]

I see the issue in the sample you sent. The audio is fine, but the video does a strange jump every so often. Will see if I can reproduce on my QNAP with a Late Show recording.

What version of QTS are you running btw?

QTS 4.2.2.

I just got notified that 4.2.3 was available and upgraded. Will retry in 4.2.3 shortly.

Same behavior in 4.2.3.

I can reproduce with a Late Show recording, but only at 240p. All other resolutions are fine.

I just duplicated it again [remotely] at 480P (transcoder at 1.1). When I get home, it’s very likely I’ll be able to reproduce at all resolutions.

Also, just watched (remotely) PBS NewsHour for the entire 57 minutes as Live TV, hardware, blend, 240p with no issues.

Perhaps exploring the delta between the two paths (live/recorded) is a path forward.

Hrm, I already combined the live and recorded code a few days ago…

You likely can observe this also—but just at 240p for you.

Aren’t people also seeing a difference between live and recorded on the DS916+ thread also?

One report, but the DS916+ situation seems different altogether because the hardware transcoder can’t even run at full speed there. I suspect the user who’s able to stream live was watching a cable channel that’s already h264, so no transcoding was involved.

I tried to watch some live tv at 240p here, and actually see the same glitching there too.

Latest version has some more transcoder options, but I’m still seeing the glitchy behavior at 240p on recorded content. Unclear why live tv is unaffected, as they are using identical code paths now.

I’m going to bump us to the latest hardware acceleration driver which has a bunch of fixes and see if that does anything.

I’m still seeing stuttering for hardware blend at all resolutions for recordings — starting about two minutes in.

I tried hardware linear at 240P/360k and I made it 5 minutes — until it stalled because the transcoder couldn’t keep up. There was no stuttering in that 5 minutes. My hypothesis continues to be that the stuttering arises when the transcoder gets too far ahead (which doesn’t happen for live TV). Perhaps the TS-251+ isn’t the best choice for this.

WRT, software transcoding in the 01.30.2232 release, it seems that transcoding got way slower. Whereas before I could transcode at 1080P, the best I can do now is 480P/1mb (anything higher and the transcoding can’t keep up).

The TS-251+ definitely struggles with the linear deinterlacer. It’s quite possible the glitching is coming from the blend, which would mean it would only happen on 1080i recordings.

No changes were made to the software transcoder, other than passing in the correct bitrate. Previously it was hardcoded at 4mbps.

Maybe check to make sure the cpu on the QNAP is idle, in case some rogue ffmpeg or other processes are chewing away in the background.

Ok I let a recording play for a while and saw an issue after a few minutes. It’s different than the issue in your video though… it’s more buffering/stuttering than glitching.

When I see glitching, the audio is unaffected and the video does a quick jump almost as if frames are being played out of order.

When I see stuttering, the audio and video both pause briefly and then resume.

I have finally isolated this bug. You were right that it’s a function of time, triggering only on recorded files and only after a minute or more of transcoding.