On AppleTV only (not iPhone), remote playback of recordings is broken when using software transcoding on DVR server


#1

For some recordings, when using remote DVR, the Apple TV app only shows about half a second of video before seeking to the end off the recording and then exiting out of it.

The problem only occurs when using software transcoding. Playback works fine when using hardware transcoding (via videotoolbox), although the quality isn't as good. As far as source content goes, it seems to affect both MPEG-2 and MPEG-4 channels.

It seems to have regressed recently -- maybe in a recent DVR server beta?

Applicable DVR logs (notice the seek to 1h15m, which is the length of the recording):

2019/06/08 07:42:22 [HLS] Starting transcoder for file891-665915d1591c at 0s from 50.1.47.117 (encoder=libx264, resolution=720, deinterlacer=linear, bitrate=2000)
[h264 @ 0x7fabb4008600] Increasing reorder buffer to 2
[h264 @ 0x7fabb4008600] Increasing reorder buffer to 3
[mpegts @ 0x7fabb400a000] start time for stream 2 is not set in estimate_timings_from_pts
[mpegts @ 0x7fabb400a000] start time for stream 3 is not set in estimate_timings_from_pts
[mpegts @ 0x7fabb400a000] start time for stream 4 is not set in estimate_timings_from_pts
[mpegts @ 0x7fabb400a000] start time for stream 5 is not set in estimate_timings_from_pts
[mpegts @ 0x7fabb400a000] Dropped corrupted packet (stream = 1)
[h264 @ 0x7fabb401ae00] mmco: unref short failure
[libx264 @ 0x7fabb4018000] MB rate (324000000) > level limit (522240)
2019/06/08 07:42:24 [HLS] Stopping transcoder for file891-665915d1591c after seek to 1h15m0s (out=3.262178s, finished=false)
2019/06/08 07:42:24 [HLS] Starting transcoder for file891-665915d1591c at 1h15m0s from 50.1.47.117 (encoder=libx264, resolution=720, deinterlacer=linear, bitrate=2000)
[h264 @ 0x7fc78d822c00] Increasing reorder buffer to 2
[h264 @ 0x7fc78d822c00] Increasing reorder buffer to 3
[mpegts @ 0x7fc78d800000] start time for stream 2 is not set in estimate_timings_from_pts
[mpegts @ 0x7fc78d800000] start time for stream 3 is not set in estimate_timings_from_pts
[mpegts @ 0x7fc78d800000] start time for stream 4 is not set in estimate_timings_from_pts
[mpegts @ 0x7fc78d800000] start time for stream 5 is not set in estimate_timings_from_pts
[mpegts @ 0x7fc78d800000] Dropped corrupted packet (stream = 1)
    Last message repeated 2 times
[libx264 @ 0x7fc78d811c00] MB rate (324000000) > level limit (522240)
[mpegts @ 0x7fc78d800000] Dropped corrupted packet (stream = 1)
[h264 @ 0x7fc78d815000] error while decoding MB 57 11, bytestream -22
2019/06/08 07:42:25 [HLS] Stopping transcoder session file891-665915d1591c @ 1h15m0.488244s

#2

This also only appears to affect playback using the Apple TV app. It doesn't seem to affect playback from an iPhone.

Idle speculation: The Apple TV Channels app uses software decoding for h.264 (for better signal error correction), but the iOS app uses hardware decoding (for lower power consumption) [source]. Maybe the software decoder behaves differently in a way that cause this bug to happen.


Recordings Start Playing, Then Immediatly Bails-Out, Using Cellular Connection