Missing audio in some recordings
Added by Anonymous almost 12 years ago
Hi
I'm using the current release of TV Headend on Ubuntu 12.04 with a mix of DVB cards. In general all is working well using XBMC (Frodo pre-release) front-ends.
I have encountered a couple of issues:
1. I have found that the audio is missing on some recordings (Matroska container) e.g. recording a BBC HD programme; video seems fine and two audio tracks show as being available (one 5.1 and one stereo). Trying to play the .mkv file in VLC gives the following error:
"VLC does not support the audio or video format "undf". Unfortunately there is no way for you to fix this."
There is some audio playback in VLC but it is intermittent, with nothing in XBMC.
2. Leaving channels playing, after an extended period the video becomes partially corrupted. Re-tuning (re-selecting) the channel in XBMC fixes this.
I'm not clear where I should be looking for logs relevant to issue 1 but it does seem to be an issue solely related to TV Headend.
I'd appreciate any suggestions on how to resolve the above two issues.
I've been using TV Headend for quite a while and am very impressed with the general stability and usability of the most recent release. So would like to say thanks to the developers for their work on this great bit of software.
Replies (17)
RE: Missing audio in some recordings - Added by Jasper Thrussell almost 12 years ago
I am also having this issue, it seems to only occur on Freeview HD in the UK?
I have noticed it most often when trying to record a film.
RE: Missing audio in some recordings - Added by Prof Yaffle almost 12 years ago
Freeview HD, certainly - possibly Freesat HD as well, but for different reasons (I don't think they broadcast 5.1 audio on DVB-T2, but I need to check that).
I've had problems with mkv and ts containers: either the 5.1 soundtrack won't play, or - if the programme has dual stereo tracks - I'm missing dialogue on the first track, and the second is an overlaid audio descriptor track. It's almost as if three tracks are needed (to be muxed on demand as required?), and tvheadend is dropping one (one for background soundtrack, one language-specific dialogue track, one audio described).
Let me check some logs and see if I can find a pattern...
RE: Missing audio in some recordings - Added by Prof Yaffle almost 12 years ago
Okay, on Freeview HD, I'm getting this:
Jan 5 22:49:31 revo tvheadend[1744]: dvr: "Pirates of the Caribbean: At World's End" on "BBC One HD" recorder starting Jan 5 22:49:31 revo tvheadend[1744]: subscription: "DVR: Pirates of the Caribbean: At World's End" subscribing on "BBC One HD", weight: 300, adapter: "Sony CXD2820R (DVB-T/T2)", network: "Gloucestershire", mux: "Gloucestershire: 482,200 kHz", provider: "", service: "BBC One HD", quality: 100 Jan 5 22:49:33 revo tvheadend[1744]: TS: Sony CXD2820R (DVB-T/T2)/Gloucestershire: 482,200 kHz/BBC One HD: H264 @ #6601: Continuity counter error Jan 5 22:49:33 revo tvheadend[1744]: dvr: /home/xbmc/Recordings/Pirates of the Caribbean- At World's End.2013-01-05.22-55.ts from adapter: "Sony CXD2820R (DVB-T/T2)", network: "Gloucestershire", mux: "Gloucestershire: 482,200 kHz", provider: "", service: "BBC One HD" Jan 5 22:49:33 revo tvheadend[1744]: dvr: # type lang resolution samplerate channels Jan 5 22:49:33 revo tvheadend[1744]: dvr: 1 H264 1920 x 1088 Jan 5 22:49:33 revo tvheadend[1744]: dvr: 2 AAC eng 96000 0 Jan 5 22:49:33 revo tvheadend[1744]: dvr: 3 AAC eng 96000 0 Jan 5 22:49:33 revo tvheadend[1744]: dvr: 4 DVBSUB eng
I've just noticed that "channels" is reporting as "0" for each, which is interesting...
VLC identifies the audio streams as MPEG AAC Audio (mp4a), English, Stereo. However, the tracks are as described above: the first one is background and incidental sounds (e.g. birds, guns, footsteps) - the second is audio description only ("The captain walks over to a cabinet and removes a box which contains an old sword" sort of thing). Neither track includes the actually dialogue, though - I suspect that this should be on an additional track which would be muxed with the first, and then the audio description track could be overlaid again if required. That means there's an entire track missing, plus I've no idea how these would get muxed together if that is what happens.
I had the same with some other recordings over Christmas, so it's consistent.
Freesat HD, there's seemingly an issue with when the Beeb changes from stereo (for the continuity announcements) to 5.1 (for the film proper). XBMC has been adapted to handle this, I seem to recall reading somewhere, but tvheadend is having issues with mkv containers and these streams. Try .ts instead.
EDIT
The Channel count isn't the issue - I had this same problem on a previous recording, and that reports as:
Jan 1 18:28:34 revo tvheadend[1744]: dvr: # type lang resolution samplerate channels Jan 1 18:28:34 revo tvheadend[1744]: dvr: 1 H264 1920 x 1088 Jan 1 18:28:34 revo tvheadend[1744]: dvr: 2 AAC eng 48000 2 Jan 1 18:28:34 revo tvheadend[1744]: dvr: 3 AAC eng 24000 1 Jan 1 18:28:34 revo tvheadend[1744]: dvr: 4 DVBSUB eng
However, I suspect that this only happens with audio described programmes, so I've scheduled something later to see if I can get a fresh sample with debug information.
RE: Missing audio in some recordings - Added by Adam Sutton almost 12 years ago
Just a few quick points:
I've never seen any evidence of Audio track mixing in dvb clients/streams, I dont thindk they're that clever. But I could be wrong. Sounds more likely the player is playing the wrong channels from a multi channel track.
What does ffmpeg -i file say for a recording.
Ignore these channels 0, its a long standing issue, printing only.
Tvh doesn't have problems with mkv and stream change. Its mkv that has the issue, it was never designed for this. However it does now include support, which tvh master uses, but most players (xbmc included) don't support playback.
Adam
RE: Missing audio in some recordings - Added by Prof Yaffle almost 12 years ago
Thanks, Adam - I didn't mean to dis tvheadend, so I stand corrected on the mkv/audio stream issue!
I know what you mean about audio stream mixing - it just seems unnecessary, since audio is a fraction of the bandwidth, so why worry about that and put a burden on the client. I'm just trying to make sense of what I'm seeing.
It could be a player issue, but this is where I come unstuck with .ts containers (hate, hate, hate): VLC will play it, but with the audio problems as described; SMplayer chokes and starts looping; WMP (spit) plays the video only and can see no audio tracks (Microsoft presumably deciding that multiple tracks aren't necessary - at least it's not Apple, I suppose, who'd demand that you buy new, Apple-compatible ears); XBMC struggles with both video and audio streams and aborts playback.
fmpeg -i:
Y:\Videos\Recordings>ffmpeg -i "Pirates of the Caribbean- At World's End.2013-01 -05.22-55.ts" ffmpeg version N-41537-g728f86e Copyright (c) 2000-2012 the FFmpeg developers built on Jun 12 2012 12:54:01 with gcc 4.6.3 configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-ru ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libass --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb --enable -libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libope njpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libth eora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc --enable- libvorbis --enable-libvpx --ena libavutil 51. 58.100 / 51. 58.100 libavcodec 54. 25.100 / 54. 25.100 libavformat 54. 6.101 / 54. 6.101 libavdevice 54. 0.100 / 54. 0.100 libavfilter 2. 78.101 / 2. 78.101 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 libpostproc 52. 0.100 / 52. 0.100 [aac_latm @ 01ce1220] audio config changed [h264 @ 01cdb180] non-existing SPS 0 referenced in buffering period [h264 @ 01cdb180] non-existing PPS referenced [h264 @ 01cdb180] non-existing SPS 0 referenced in buffering period [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] no frame! [h264 @ 01cdb180] non-existing SPS 0 referenced in buffering period [h264 @ 01cdb180] non-existing PPS referenced [h264 @ 01cdb180] non-existing SPS 0 referenced in buffering period [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] no frame! [h264 @ 01cdb180] non-existing SPS 0 referenced in buffering period [h264 @ 01cdb180] non-existing PPS referenced [h264 @ 01cdb180] non-existing SPS 0 referenced in buffering period [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] no frame! [h264 @ 01cdb180] non-existing SPS 0 referenced in buffering period [h264 @ 01cdb180] non-existing PPS referenced [h264 @ 01cdb180] non-existing SPS 0 referenced in buffering period [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] non-existing PPS 0 referenced [h264 @ 01cdb180] decode_slice_header error [h264 @ 01cdb180] no frame! [aac_latm @ 01ce74e0] audio config changed [h264 @ 01cdb180] mmco: unref short failure Last message repeated 2 times [mpegts @ 01e2bfc0] max_analyze_duration 5000000 reached at 5013333 [mpegts @ 01e2bfc0] PES packet size mismatch Last message repeated 1 times Input #0, mpegts, from 'Pirates of the Caribbean- At World's End.2013-01-05.22-5 5.ts': Duration: 02:45:00.59, start: 86443.414500, bitrate: 6599 kb/s Program 1 Stream #0:0[0x19c9]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1 920x1080 [SAR 1:1 DAR 16:9], 25.68 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x19ca](eng): Audio: aac_latm ([17][0][0][0] / 0x0011), 48000 Hz , stereo, s16 Stream #0:2[0x19ce](eng): Audio: aac_latm ([17][0][0][0] / 0x0011), 48000 Hz , stereo, s16 Stream #0:3[0x19cd](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) At least one output file must be specified Y:\Videos\Recordings>
... so the same two channels that VLC sees.
I'm trying to find a suitable test programme to schedule something on, but I need to force it onto the DVB-T2 tuner while I'm using the system (feature request: add "use this tuner please" to the DVR routines...!).
RE: Missing audio in some recordings - Added by Prof Yaffle almost 12 years ago
Okay, I just recorded four samples from BBC HD (sadly, BBC One HD for two and BBC HD for two - I had to switch to get another Audio Described programme). I'll do some more testing later with Bruce Almighty, since it seems to be Hollywood fodder that shows the symptoms most regularly.
So: one programme on DVB-S2, mkv and ts containers; another programme on DVB-T2, mkv and ts containers.
Summary of this, though:
1. On satellite, the audio streams are clearly "soundtrack" and "the soundtrack with additional audio descriptions"
2. On terrestrial, they're clearly "the soundtrack" and "the audio description bit only" - no dialogue or background noises on the second track
If my suspicion on language is correct (i.e. there's something missing for the dialogue in a given language, even if only English is broadcast in the UK) then I need to find something more international than BBC drama, hence the search for something more blockbustery. Otherwise, it's all rolled into track 1, which is fine unless you're trying the AD stream.
Just for completeness (and to capture it), lightly-edited ffmpeg output:
MKV on DVB-S2:
Input #0, matroska,webm, from 'HD Test 1 - mkv on DVB-S2.mkv': Metadata: title : HD Test 1 - mkv Duration: 00:09:29.44, start: 0.000000, bitrate: 6802 kb/s Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default) Stream #0:1(nar): Audio: mp2, 48000 Hz, stereo, s16, 256 kb/s (default) Stream #0:2(eng): Subtitle: none (default) Stream #0:3(eng): Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s (default) Stream #0:4(eng): Subtitle: text (default)
TS on DVB-S2:
Input #0, mpegts, from 'HD Test 2 - ts on DVB-S2.ts': Duration: 00:09:01.16, start: 1562.247600, bitrate: 8042 kb/s Program 1 Stream #0:0[0x157c]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 26.30 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x157e](nar): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz, stereo, s16, 256 kb/s Stream #0:2[0x1580](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) Stream #0:3[0x157d](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, s16, 192 kb/s No Program Stream #0:4[0x157f]: Unknown: none
MKV on DVB-T2:
Input #0, matroska,webm, from 'HD Test 3 - mkv on DVB-T2.mkv': Metadata: title : HD Test 3 - mkv Duration: 00:09:30.20, start: 0.000000, bitrate: 5383 kb/s Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 1k tbn, 50 tbc (default) Stream #0:1(eng): Audio: aac, 48000 Hz, stereo, s16 (default) Stream #0:2(eng): Audio: aac, 48000 Hz, stereo, s16 (default) Stream #0:3(eng): Subtitle: none (default)
TS on DVB-T2:
Input #0, mpegts, from 'HD Test 4 - ts on DVB-T2.ts': Duration: 00:08:59.52, start: 71939.750144, bitrate: 5675 kb/s Program 1 Stream #0:0[0x19c9]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 28.94 fps, 25 tbr, 90k tbn, 50 tbc Stream #0:1[0x19ca](eng): Audio: aac_latm ([17][0][0][0] / 0x0011), 48000 Hz, stereo, s16 Stream #0:2[0x19ce](eng): Audio: aac_latm ([17][0][0][0] / 0x0011), 48000 Hz, stereo, s16 Stream #0:3[0x19cd](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
I'll try to get a few 5-minute samples of something later that I can share (otherwise, I'm uploading a 7Gb sample file somewhere to avoid damage by cutting...!).
I suppose it is perfectly possible that it's something peculiar to my DVB-T2 stick (a PCTV T2 nanostick 290e) if no-one else sees this... I'll have a think how to bypass tvheadend and see if anything else sees the same issue.
Can someone remind me why we all do this, rather than just buy a Sky+ box or similar?
RE: Missing audio in some recordings - Added by Prof Yaffle almost 12 years ago
Yes, some unnamed issues that may have been fixed in kernel 3.2+ (I'm on Oneiric, so still on 3.0): http://stevekerrison.com/290e/
Nothing definitive, but I may have to trash and rebuild everything to rule out driver issues. And no, I can't just rebuild V4L, since I also have a TBS tuner, and that's bound to sulk if I do anything rash...
Interestingly, also a lot of debate about things going wrong when the audio stream switches from stereo to 5.1, and what Myth did to work around it. ffmpeg appears to have been updated to cope with the stream change now as well, but the problem has been around for a while, it appears, with various folks patching their way around it independently.
RE: Missing audio in some recordings - Added by Adam Sutton almost 12 years ago
Damn, can't actually get ffmpeg to display the correct info. Even skipping the start of the stream does not work on the version I have (that's why you get stereo listed, as that's what the start is).
I can confirm that most of the recordings you've noted so far I also recorded myself as TS and they work fine, XBMC correctly detects stream changes and continues audio playback fine.
This was all done using a TBS6981 and TVH master from shortly before xmas (3.3.192~g45e6247, commit:45e6247).
Adam
RE: Missing audio in some recordings - Added by Anonymous almost 12 years ago
I have only seen this issue with FreeView HD recordings using MKV as the container. I have switched to using .ts for recordings and have not had a problem since (although I would prefer to use MKV). As an example, I recorded a film on Channel 4 HD (UK FreeView) and there was sound in the adverts throughout but no audio for the film itself. Similarly, I recorded a program on BBC One HD and had sound up until the start of the show itself. Fairly clear that it is related to a change in the audio stream(s). I have not had a problem playing (XBMC / VLC) these MKV files apart from the lack of audio.
I haven't been able to test with FreeSat (DVB-S2) as yet as I am having an 'interesting' time getting my adapter to work reliably (hardware issue not software).
From Adam's comments, it may just be a limitation with Matroska containers and "most players (xbmc included)". Is the a player which does support audio stream switching in MKV files so that I can confirm that this is the issue?
RE: Missing audio in some recordings - Added by Adam Sutton almost 12 years ago
Jon,
I'm not sure which players actually support playback, John T would be the person to ask since he added the support in TVH and understands MKV far better than I. but I would expect that he was probably using some recent version of something like vlc or mplayer.
I should also clarify that MKV with 3.2 builds will NOT include the audio tracks when they're changed mid recording. This support is only available in master as it was only recently understood how this could even be handled using the MKV container (plus the lack of support made it mostly pointless).
Adam
RE: Missing audio in some recordings - Added by Anonymous almost 12 years ago
Thanks for the clarification Adam. All seems to work well with .ts in any case so I will happily stick with that.
I'm keeping a close eye on how Time Shifting is coming along in 3.3 and would like to jump to using a current build except that I have other users who are less sympathetic to things which don't just work!
I am very appreciative of all the effort going into TVH (and XBMC PVR support) as it is mostly working very well at 3.2 (and 12.0 RC3). Time Shifting and getting the DVB-S2 card to behave will give me a very capable setup indeed.
RE: Missing audio in some recordings - Added by Adam Sutton almost 12 years ago
I've just had some thoughts, I've just remuxed a recording I had made from C4 over the holidays. This includes an AC3 stereo track at the start (ads) and then switches to an AC3 (5.1) track during the main programme.
I've not yet tested this (as I did the conversion remotely and it'll take me ages to upload the video to where I am) but the MKV is reporting it has a stereo audio track, though my guess is it actually has the 5.1 track there.
What I'm wondering is whether the fact the track is incorrectly marked (as stereo) means its picking 2 tracks from the 6, and these happen to be something like the rear 2 channels or centre etc... that might explain why the audio does not play properly. I'll do some digging and see if I can get myself a short sample of what I have remuxed.
Adam
RE: Missing audio in some recordings - Added by Prof Yaffle almost 12 years ago
That would make more sense than my convoluted "missing random language dialogue channel" theory.
I've just utterly failed to properly strip out the offending audio stream to see if there's any way I can examine it further, though (I was wondering if I could split it into the elemental streams, perhaps). Cutting it in mkvmerge, avidemux, Handbrake, ffmpeg or MP4Box fails in some way - normally turning the 5.1 section into a stereo track. And if you don't cut it, you're left detecting it as stereo since that's what it starts with.
Seems that anything ffmpeg-based (... so that's "everything"!) has problems in some way. And that assumes I get past all the "channel element is not allocated" errors... I thought I'd seek out mencoder as an alternative, but SMPlayer has its own problems with these files, and MediaCoder doesn't want to split files, so I suspect another dead end here.
I should take the hint and surrender gracefully!
RE: Missing audio in some recordings - Added by Colin MacDonald almost 12 years ago
I just wanted to chime and and say I also have this issue. I am on Ubuntu 12.04 with Tvheadend 3.2.18 using a DVB-T2 290e USB tuner in the UK. I had this issue for the first time last night when Recording the BBC series "Africa" from BBC One HD. I had two audio streams available in my XBMC frontend, one silent and the second with a voice over describing what was on screen for visually impaired viewers or similar.
Having read this thread I have switched my DVR settings in Tvheadend to use the ts container to see if that helps.
I have recorded other programmes with this tuner from BBC One HD without issue.
I have been using MythTV in the past and know they had a similar issue with audio stream switching in the BBC's HD streams but they managed to fix it.
Here's a thread from the MythTV mailing list covering the issue http://www.gossamer-threads.com/lists/mythtv/users/480133
Looks like it was an ffmpeg bug for Myth, here's the Ticket http://ffmpeg.org/trac/ffmpeg/ticket/200
Posting in the hope that some of this info will help the Tvheadend devs. Loving Tvheadend so far.
RE: Missing audio in some recordings - Added by Prof Yaffle almost 12 years ago
Colin - 12.04 - so you're on kernel 3.5, then, yes? If you are, that sinks any hope for a kernel/v4l update fixing the problem, so I have to hope that it is purely down to the mkv/audio stream change issue that Adam referenced.
I've also switched to ts, I'm just waiting to get a decent set of results to know if this helps or not.
RE: Missing audio in some recordings - Added by Colin MacDonald almost 12 years ago
My kernel seems to be 3.2.0-36-generic on 12.04. This is after doing a dist-upgrade too.
I have now had time to test using ts and and happy to say I haven't had a the audio issue since switching to this container. I recorded the "Africa" program from BBC HD again this weekend and all is good. So, it's a workaround at least.
RE: Missing audio in some recordings - Added by Adam W almost 11 years ago
The audio is definitely there in the MKV when recording 5.1 programmes from Freeview HD.
I can play the programmes fine in VLC on my computer, and also using MX Player on my Android Nexus 7 tablet.
XBMC will play the lead in with 2.0 stereo audio then goes silent at the switch to 5.1. Interestingly, if I put the files on a USB stick and try to play them on my Samsung TV, that has the same problem and will not play the 5.1 sound.