[mythtv-users] MythArchive: No sound on DVD - ffmpeg stream mapping problem

Andrew Meredith andrew at anvil.org
Wed Sep 13 18:38:18 UTC 2006


Hi Folks,

I have just tried to burn a program from the recorded list to DVD. It 
all went very nicely indeed until I went to play the finished product. 
Absolutely superb in all respects but one ... no sound.

The original recorded program has not been transcoded and tcprobe 
reports the following:

[tcprobe] MPEG packetized elementary stream (PES)
[tcprobe] summary for Input.nuv, (*) = not default, 0 = not detected
import frame size: -g 544x576 [720x576] (*)
      aspect ratio: 16:9 (*)
        frame rate: -f 25.000 [25.000] frc=3
                    PTS=20520.4506, frame_time=40 ms, bitrate=10000 kbps
    audio track: -a 0 [0] -e 48000,16,2 [48000,16,2] -n 0x50 [0x2000] (*)
                    PTS=20519.7965, bitrate=192 kbps
                    -D 16 --av_fine_ms 14 (frames & ms) [0] [0]
    audio track: -a 0 [0] -e 48000,16,1 [48000,16,2] -n 0x50 [0x2000] (*)
                    PTS=20519.8099, bitrate=64 kbps
                    -D 16 --av_fine_ms 0 (frames & ms) [0] [0]

The first pass through mythtranscode went fine, and produced the following:

[tcprobe] MPEG program stream (PS)
[tcprobe] summary for /tmp/work/1/newfile.mpg, (*) = not default, 0 = 
not detected
import frame size: -g 544x576 [720x576] (*)
      aspect ratio: 16:9 (*)
        frame rate: -f 25.000 [25.000] frc=3
                    PTS=0.3768, frame_time=40 ms, bitrate=10000 kbps
    audio track: -a 0 [0] -e 48000,16,1 [48000,16,2] -n 0x50 [0x2000] (*)
                    PTS=0.3600, bitrate=64 kbps
                    -D 0 --av_fine_ms 16 (frames & ms) [0] [0]
    audio track: -a 0 [0] -e 48000,16,2 [48000,16,2] -n 0x50 [0x2000] (*)
                    PTS=0.3706, bitrate=192 kbps
                    -D 0 --av_fine_ms 6 (frames & ms) [0] [0]

This plays, with sound, through both xine and mplayer.

The next stage, to reprocess the file into an MPEG format suitable for 
DVD creation seems to be where it all goes pear shaped.

the command used was:

   ffmpeg -v 1 -i "/tmp/work/1/newfile.mpg" -r pal -target dvd -b 4771
   -s 720x576 -acodec ac3 -ab 192 -ac 2 -copyts -aspect 16:9
   "/tmp/work/1/newfile2.mpg" -map 0:0 -map 0:1

The format summary was:

> Input #0, mpeg, from '/tmp/work/1/newfile.mpg':
>   Duration: 01:04:56.0, start: 0.360000, bitrate: 2364 kb/s
>   Stream #0.0[0x1e0]: Video: mpeg2video, yuv420p, 544x576, 10000 kb/s, 25.00 fps(r)
>   Stream #0.1[0x1c0]: Audio: mp2, 48000 Hz, mono, 64 kb/s
>   Stream #0.2[0x1c1]: Audio: mp2, 48000 Hz, stereo, 192 kb/s
> Assuming PAL for target.
> Output #0, dvd, to '/tmp/work/1/newfile2.mpg':
>   Stream #0.0: Video: mpeg2video, yuv420p, 720x576, q=2-31, 4771 kb/s, 25.00 fps(c)
>   Stream #0.1: Audio: ac3, 48000 Hz, stereo, 192 kb/s
> Stream mapping:
>   Stream #0.0 -> #0.0
>   Stream #0.1 -> #0.1

The problem is that the source file has two separate audio tracks; one 
mono (0.1) and one stereo (0.2). The ffmpeg command chooses the mono 
track to reprocess to the DVD format file (Stream #0.1 -> #0.1).

I reran the ffmpeg command as above, but with "-map 0:0 -map 0:2" at the 
end instead and the resultant file had sound.

In case it matters, the system I used to do the mytharchive run is:

   - AMD Sempron(tm) 2300+
   - 512 MB RAM
   - Fedora Core 5 with atrpms up to date
   - mytharchive-0.20-131.fc5.at
   - transcode-1.0.2-26.fc5.at
   - ffmpeg-0.4.9-15_r19707.fc5.at

I am really looking forward to this function working. It will be the 
final cut for the proprietary alternatives to MythTV, not to mention 
being VERY useful :)

Cheers

Andy M




More information about the mythtv-users mailing list