Unable to playback BBC recording from TVHeadend with DD 5.1 Audio

Oh - forgot an important BBC 5.1 show. Doctor Who!

That’s been produced in 5.1 since the reboot - even back in the days when it was SD and broadcast in stereo, the DVDs were 5.1.

I’m running TV Headend on a raspberry pi 3. It’s currently v4.2.5-18, but was likely a slightly earlier release of v4.2 when the recording was made.

I’ve uploaded a sample clip to here:

I’ve set Hard Sun to record. I’m using the TS profile these days rather than MKV.

Tried that .mkv in Kodi on my Vero 4K, LibreElec on an S905X no-name box, and on my Mac.

All three did the same thing - froze on the first frame of the video. Plays in VLC on my Mac fine.

I remember .mkvs from TV Headend being flaky. I’ve not used them for ages - as they don’t play nice with 2.0/5.1 switching on-the-fly.

Think .ts is the way to go as a first step.

I got an error out of VLC on windoze, but it went on to play stream 1 as stereo:

Further to this original post I’ve now recorded an episode of Hard Sun from BBC One HD using the TVheadend “Pass” profile to record directly to TS. Steve_Neal was correct that it does have AAC 5.1 audio.
Anyway, this file also has problems with OSMC on the Vero4K, but plays fine in VLC on Windows.
This suggests that the MKV container on the previous recording was not the whole problem.

I’ve uploaded the whole episode to here if anyone else wants to give it a go:
https://www.dropbox.com/s/jtcu0g8zqalq30q/Hard%20Sun2018-02-03.ts?dl=0

General
ID : 16515 (0x4083)
Complete name : \192.168.1.6\usbdrive1\Media\Videos\Hard Sun2018-02-03.ts
Format : MPEG-TS
File size : 1.35 GiB
Duration : 58 min 35 s
Overall bit rate mode : Variable
Overall bit rate : 3 308 kb/s

Video
ID : 6601 (0x19C9)
Menu ID : 17540 (0x4484)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, RefFrames : 4 frames
Codec ID : 27
Duration : 58 min 34 s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 25.000 FPS
Standard : Component
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709

Audio #1
ID : 6602 (0x19CA)
Menu ID : 17540 (0x4484)
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Muxing mode : LATM
Codec ID : 17-2
Duration : 58 min 35 s
Bit rate mode : Variable
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Delay relative to video : -976 ms
Language : English

Audio #2
ID : 6606 (0x19CE)
Menu ID : 17540 (0x4484)
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : HE-AAC / LC
Format settings : NBC
Muxing mode : LATM
Codec ID : 17-2
Duration : 58 min 35 s
Channel(s) : 1 channel
Channel positions : Front: C
Sampling rate : 48.0 kHz / 24.0 kHz
Frame rate : 23.438 FPS (1024 SPF)
Compression mode : Lossy
Delay relative to video : -64 ms
Language : English
Language, more info : Visual impaired commentary

Text
ID : 6605 (0x19CD)
Menu ID : 17540 (0x4484)
Format : DVB Subtitle
Codec ID : 6
Duration : 58 min 34 s
Delay relative to video : 2 s 84 ms
Language : English

Menu
ID : 6600 (0x19C8)
Menu ID : 17540 (0x4484)
Duration : 58 min 35 s
List : 6601 (0x19C9) (AVC) / 6602 (0x19CA) (AAC, English) / 6606 (0x19CE) (AAC, English) / 6605 (0x19CD) (DVB Subtitle, English)
Language : / English / English / English
Service name : BBC ONE HD
Service type : advanced codec HD digital television

What version of TVHeadend are you using? Are you in a position to update it?

HTS Tvheadend 4.2.5-18~g951777a running on a Raspberry Pi 3.
Yes, I can update it, but it should be fairly up to date with the repo.

@shukerr: Very Strange, the provided .ts file only shows first video frame but AAC audio continue to play. So, this is the error symptom.

If I remux the file using mkvtoolnix including all 4 tracks video+audio1+audio2+subtitle … the resulting mkv plays like a charm. Perhaps we get more Infos from mkvtoolnix logs and logs from the Vero 4k what happens there.

Here, it plays OK on Pi (no idea if all channels are there as I don’t have a 5.1 speaker setup). But no sound on Vero4k.

I think the frame rate is detected incorrectly.

Video is fine. Just audio missing.

Edit: Analogue sound is always there. if I toggle the audio track to 2/2 then back to 1/2 I get sound on HDMI. No idea about S/PDIF as the laptop I use to read that is in hospital.

Edit2: Now I can’t reproduce the issue at all. Playing on a stereo (2.0) TV, I get all sound when Kodi is set to 2.0, only L and R (no dialogue) when Kodi is set to 5.1. All as expected.

My log https://paste.osmc.tv/asoposovoq

I’ve got a spare RPi 2 so I’m mindful to install OSMC on that and see how it performs compared to the Vero 4k. I’ll report back.

I’ve looked at this and I’m pretty sure I can fix it.

I think something is wrong on the TVH side though

Sam

@shukerr: Hi, can you try to disable the following settings in your tvheadend’s streaming profile for pass and do a recording of BBC HD with that?? It is just a test, so don’t set your expectation high.

Let us know whether this changed anything and set back the default settings to the pass profile if there is no improvement.

I’ve set a whole bunch of programmes to record today so we’ll see how they perform with the Vero 4k. Will be interesting as my experience is that content with stereo audio has been ok in the past.

Update: re-imaged vero with the 20180207 image. Previously, HW acceleration was not working - now it is. Hard Sun plays in fits and starts with HW acceleration but perfectly if acceleration is turned off. The onscreen info reports 90000 FPS.

I have discovered a load of recordings I made earlier have surround sound and they all report 25 FPS and play fine with HW acceleration. All recordings made on Pi2.

That’s going to confuse the decoder.

Quick update. With the latest updates to tvheadend and the Vero 4k and recording to TS format then the picture playback of new recordings is fine.

However, the whole audio channel mapping is wrong for these AAC 5.1 recordings. I have a 3.0 setup (left, centre, right) and with the vero set as 3.0 then don’t get the dialogue at all.

If I set kodi as 2.0 then the audio is fine. I’ve verified the same audio behaviour on a raspberry pi also running osmc.

Currently, it would be sent in a 7.1 container.
We’re working on channel masking to add improve multi channel audio support in the future.

Sam