[mythtv-users] Transcoding HD (QAM) recording to DVD compatible format

faginbagin mythtv at hbuus.com
Thu Jun 11 23:12:11 UTC 2009


I'm having trouble transcoding an HD recording (cable channel CBSHD 1080i) made with an HVR-1600 to a DVD compatible format using mytharchive/mythburn.py. The problem seems to be some corruption in the audio stream about 13 minutes into the recording. mplex chokes with the error message:

**ERROR: [mplex] Can't find next AC3 frame: @ 39073536 we have fdfc - broken bit-stream?

So I thought I'd try changing the ffmpeg command that's used to transcode the video stream to DVD format so it will also transcode the ac3 audio stream in the hopes I could get an audio stream that mplex likes. I extracted the ffmpeg command executed by mythburn:

ffmpeg -threads 2 -v 1 -i "/video/tmp/work/1/newfile.mpg" -r ntsc \
-target dvd -b 2000k -s 720x480 \
-acodec copy \
-aspect 16:9 "/video/tmp/work/1/newfile2.mpg" -map 0:0 -map 0:1

This command simply copies the audio stream "-acodec copy". I tried changing it to do some audio transcoding as follows:

ffmpeg -threads 2 -v 1 -i "/video/tmp/work/1/newfile.mpg" -r ntsc \
-target dvd -b 2000k -s 720x480 \
-ab 128k -ar 48000 -acodec ac3 \
-aspect 16:9 "/video/tmp/work/1/newfile3.mpg" -map 0:0 -map 0:1

But this command fails at what I think is the same point in time as mplex with the following output:

frame=24664 fps= 36 q=4.3 size=  250756kB time=813.44 bitrate=2525.3kbits/s
[mpeg2video @ 0x24653d0]ac-tex damaged at 77 8
[mpeg2video @ 0x24653d0]concealing 92 DC, 92 AC, 92 MV errors
frame=24682 fps= 36 q=2.7 size=  250956kB time=813.98 bitrate=2525.6kbits/s
[ac3 @ 0x2466130]frame CRC mismatch
Resampling with input channels greater than 2 unsupported.
Can not resample 3 channels @ 44100 Hz to 6 channels @ 48000 Hz

FWIW, when I play the original recording in mythfrontend, I see the following in the log at around 13-14 minutes into the recording: 

2009-06-11 17:27:58.877 [ac3 @ 0x7fb4ccb7ced0]frame CRC mismatch
2009-06-11 17:27:58.877 audio stream changed
2009-06-11 17:27:58.879 Opening audio device 'default'. ch 2(2) sr 44100
2009-06-11 17:27:58.880 Opening ALSA audio device 'default'.
2009-06-11 17:27:58.928 audio stream changed
2009-06-11 17:27:58.929 Opening audio device 'default'. ch 2(2) sr 48000
2009-06-11 17:27:58.930 Opening ALSA audio device 'default'.
2009-06-11 17:27:58.963 [ac3 @ 0x7fb4ccb7ced0]frame CRC mismatch
2009-06-11 17:27:58.976 NVP: prebuffering pause
2009-06-11 17:27:59.347 NVP: prebuffering pause
2009-06-11 17:27:59.349 WriteAudio: buffer underrun

I think I need some way to repair the audio stream in this recording. Can anyone suggest a more error tolerant AC3 decoder than ffmpeg's ac3 codec, or some command line magic that might help? Or perhaps a way to repair it using another tool like mencoder?

TIA,
Helen



More information about the mythtv-users mailing list