[mythtv-users] Mythexport choosing wrong audio stream

Stephen Robertson stephengrobertson at gmail.com
Tue Dec 4 11:08:02 UTC 2012


>>> 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.


General
Complete name                            : -The_Thick_of_It--20121013202800.m4v
Format                                   : MPEG-4
Codec ID                                 : M4V
File size                                : 382 MiB
Duration                                 : 31mn 58s
Overall bit rate mode                    : Variable
Overall bit rate                         : 1 670 Kbps
Writing application                      : Lavf53.21.0

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : Baseline at L3.0
Format settings, CABAC                   : No
Format settings, ReFrames                : 3 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 31mn 58s
Bit rate                                 : 1 500 Kbps
Width                                    : 800 pixels
Height                                   : 480 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.156
Stream size                              : 343 MiB (90%)
Writing library                          : x264 core 120 r2151 a3f4407
Encoding settings                        : cabac=0 / ref=3 /
deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=7 / psy=1 /
psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1
/ 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 /
chroma_qp_offset=-2 / threads=3 / sliced_threads=0 / nr=0 / decimate=1
/ interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 /
weightp=0 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0
/ rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=1500 / ratetol=1.0 /
qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / cplxblur=20.0 / qblur=0.5
/ vbv_maxrate=10000 / vbv_bufsize=10000 / nal_hrd=none / ip_ratio=1.25
/ aq=1:1.00

Audio
ID                                       : 2
Format                                   : AAC
Format/Info                              : Advanced Audio Codec
Format profile                           : LC
Codec ID                                 : 40
Duration                                 : 31mn 57s
Bit rate mode                            : Variable
Bit rate                                 : 165 Kbps
Channel(s)                               : 2 channels
Channel positions                        : Front: L R
Sampling rate                            : 48.0 KHz
Compression mode                         : Lossy
Stream size                              : 37.8 MiB (10%)
Language                                 : English

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


More information about the mythtv-users mailing list