[mythtv-users] Mythexport choosing wrong audio stream

John Pilkington J.Pilk at tesco.net
Tue Dec 4 11:47:55 UTC 2012


On 04/12/12 11:08, Stephen Robertson wrote:
>>>> On 03.12.2012 18:21, Stephen Robertson wrote:
>>>>>
>>>>>
>>>>> It seems that for some recordings the resultant video from mythexport
>>>>> has the "wrong" audio track.  In my case I get an audio description
>>>>> track.  I think this may be the first audio track and the normal audio
>>>>> is on the second.  Is there a way tell mythexport which stream to use.
>>>>
>>>>
>>>>
>>>> Which version is that? (of MythTV and MythExport)
>>>> Where do you source the recording from? (DVB-C/S/T of which country)
>>>>
>>>> Regards,
>>>> Karl
>>>
>>>
>>> Sorry for the vague information earlier
>>>
>>> Mythexport  2.2.4-0ubuntu1
>>>
>>> MythTV Version : v0.26.0-51-ged7b577
>>> MythTV Branch : fixes/0.26
>>> Network Protocol : 75
>>> Library API : 0.26.20120822-1
>>> QT Version : 4.8.1
>>>
>>> I've seent this in
>>> BBC HD from DVB-S2 in the UK
>>>
>>> ffmpeg line from mythxport config:
>>>    system("avconv -i \'$self->{_inputFile}\' -y -pass 1 -an -vcodec
>>> libx264 -pre:v libx264-medium_firstpass -pre:v libx264-ipod640 -b
>>> 1500k -bt 1000k -threads 0 -s 800x480 -aspect 16:9 -f ipod '/dev/null'
>>> && avconv -i \'$self->{_inputFile}\' -y -pass 2 -vcodec libx264
>>> -preset medium -pre:v libx264-ipod640 -b 1500k -bt 1000k -threads 0 -s
>>> 800x480 -acodec libfaac -ab 192k -ar 48000 -ac 2 -aspect 16:9 -f ipod
>>> \'$self->{_outputFile}$self->{_extension}\'")
>>>
>>>
>>> mediainfo otuput for a recording that exhibited this:
>>> General
>>> ID                                       : 2050 (0x802)
>>> Complete name                            :
>>> /media/disk/Recordings/8940_20121013202800.mpg
>>> Format                                   : MPEG-TS
>>> File size                                : 2.58 GiB
>>> Duration                                 : 31mn 57s
>>> Overall bit rate                         : 11.5 Mbps
>>>
>>> Video
>>> ID                                       : 5500 (0x157C)
>>> Menu ID                                  : 1 (0x1)
>>> Format                                   : AVC
>>> Format/Info                              : Advanced Video Codec
>>> Format profile                           : High at L4.0
>>> Format settings, CABAC                   : Yes
>>> Format settings, ReFrames                : 4 frames
>>> Codec ID                                 : 27
>>> Duration                                 : 31mn 56s
>>> Bit rate                                 : 10.5 Mbps
>>> Width                                    : 1 920 pixels
>>> Height                                   : 1 080 pixels
>>> Display aspect ratio                     : 16:9
>>> Frame rate                               : 25.000 fps
>>> Color space                              : YUV
>>> Chroma subsampling                       : 4:2:0
>>> Bit depth                                : 8 bits
>>> Scan type                                : MBAFF
>>> Bits/(Pixel*Frame)                       : 0.203
>>> Stream size                              : 2.35 GiB (91%)
>>> Color primaries                          : BT.709
>>> Transfer characteristics                 : BT.709
>>> Matrix coefficients                      : BT.709
>>>
>>> Audio #1
>>> ID                                       : 5501 (0x157D)
>>> Menu ID                                  : 1 (0x1)
>>> Format                                   : AC-3
>>> Format/Info                              : Audio Coding 3
>>> Mode extension                           : CM (complete main)
>>> Format settings, Endianness              : Big
>>> Codec ID                                 : 129
>>> Duration                                 : 31mn 57s
>>> Bit rate mode                            : Constant
>>> Bit rate                                 : 192 Kbps
>>> Channel(s)                               : 2 channels
>>> Channel positions                        : Front: L R
>>> Sampling rate                            : 48.0 KHz
>>> Bit depth                                : 16 bits
>>> Compression mode                         : Lossy
>>> Delay relative to video                  : -853ms
>>> Stream size                              : 43.9 MiB (2%)
>>> Language                                 : English
>>>
>>> Audio #2
>>> ID                                       : 5502 (0x157E)
>>> Menu ID                                  : 1 (0x1)
>>> Format                                   : MPEG Audio
>>> Format version                           : Version 1
>>> Format profile                           : Layer 2
>>> Codec ID                                 : 3
>>> Duration                                 : 31mn 57s
>>> Bit rate mode                            : Constant
>>> Bit rate                                 : 256 Kbps
>>> Channel(s)                               : 2 channels
>>> Sampling rate                            : 48.0 KHz
>>> Compression mode                         : Lossy
>>> Delay relative to video                  : -858ms
>>> Stream size                              : 58.5 MiB (2%)
>>> Language                                 : nar
>>>
>>> Text #1
>>> ID                                       : 5503 (0x157F)-888
>>> Menu ID                                  : 1 (0x1)
>>> Format                                   : Teletext Subtitle
>>> Language                                 : English
>>>
>>> Text #2
>>> ID                                       : 5504 (0x1580)
>>> Menu ID                                  : 1 (0x1)
>>> Format                                   : DVB Subtitle
>>> Codec ID                                 : 6
>>> Duration                                 : 31mn 55s
>>> Delay relative to video                  : 2s 378ms
>>> Language                                 : English
>>
>>
>>
>> mediainfo shows that you would want Audio #2 for this recording, but the
>> script is using avconv -i for analysis.  Does that give the same order?  Can
>> you switch channels on playback?  The -ac 2 suggests (to me) that both
>> channels would be passed.
>>
>> John P
>
> avconv - gives
> Input #0, mpegts, from '/media/500G/8940_20121113220000.mpg':
>    Duration: 00:31:59.68, start: 22965.154356, bitrate: 14549 kb/s
>    Program 1
>      Stream #0.0[0x157c]: Video: h264 (High), yuv420p, 1920x1080 [PAR
> 1:1 DAR 16:9], 31.59 fps, 25 tbr, 90k tbn, 50 tbc
>      Stream #0.1[0x157e](NAR): Audio: mp2, 48000 Hz, stereo, s16, 256 kb/s
>      Stream #0.2[0x157f](eng): Subtitle: [6][0][0][0] / 0x0006
>      Stream #0.3[0xf06]: Data: [11][0][0][0] / 0x000B
>      Stream #0.4[0xf07]: Data: [11][0][0][0] / 0x000B
>      Stream #0.5[0xf09]: Data: [11][0][0][0] / 0x000B
>      Stream #0.6[0x1580](eng): Subtitle: dvbsub
>      Stream #0.7[0x157d](eng): Audio: ac3, 48000 Hz, stereo, s16, 192 kb/s
>      Stream #0.8[0x1582]: Data: [5][0][0][0] / 0x0005
>      Stream #0.9[0x1583]: Data: [5][0][0][0] / 0x0005
>      Stream #0.10[0xf00]: Data: [5][0][0][0] / 0x0005
>      Stream #0.11[0xf01]: Data: [5][0][0][0] / 0x0005
>      Stream #0.12[0xf02]: Data: [5][0][0][0] / 0x0005
>      Stream #0.13[0xf03]: Data: [5][0][0][0] / 0x0005
>      Stream #0.14[0xf04]: Data: [5][0][0][0] / 0x0005
>      Stream #0.15[0x911]: Data: [5][0][0][0] / 0x0005
>      Stream #0.16[0x912]: Data: [5][0][0][0] / 0x0005
>      Stream #0.17[0x913]: Data: [5][0][0][0] / 0x0005
>
> So I think the order is different which may be the issue?
>
>
> using mediainfo on the output file I only see one audio stream so that
> explains why I can't select another stream in the player on my phone.
>

I've snipped the end of this, and I have no experience of UK DVB-S or 
avconv, but yes, if the output has only one audio stream, and it's the 
wrong one, it suggests that you might want to get -ac 1 into the 
generated command line.

Is this frequent, and still happening?  I use my mythcutprojectx script 
on DVB-T recordings.  It has a facility for selecting audio streams, 
which I thought I needed when I first wrote it; but since then I don't 
recollect an occasion (out of thousands of runs) when I've needed to use 
it.

John P




More information about the mythtv-users mailing list