mythtranscode downgrading audio to stereo

For discussion of topics specific to MythTV on linux
Post Reply
jp.briggs
Newcomer
Posts: 14
Joined: Tue Apr 12, 2016 3:59 pm
United States of America

mythtranscode downgrading audio to stereo

Post by jp.briggs » Tue Apr 12, 2016 4:10 pm

I'm trying to use mythtranscode from the command line. I generated and saved a cutlist, and am transcoding by:

Code: Select all

mythtranscode --chanid 1577 --starttime 20160327135900 --mpeg2 --honorcutlist -o ~/tmp/myrecording.mpg
It all runs fine, but look at the media info of the newly transcoded file:

Code: Select all

$ mediainfo ~/tmp/myrecording.mpg
...output truncated...
Audio #1
ID                                       : 189 (0xBD)-128 (0x80)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Mode extension                           : CM (complete main)
Format settings, Endianness              : Big
Muxing mode                              : DVD-Video
Duration                                 : 24mn 29s
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                  : 8ms
Stream size                              : 33.6 MiB (1%)
...output truncated...

vs. the original:

Code: Select all

$ mediainfo /media/recordings/jp/1577_20160327135900.mpg
...output truncated...
Audio #1
ID                                       : 6302 (0x189E)
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                                 : 35mn 58s
Bit rate mode                            : Constant
Bit rate                                 : 384 Kbps
Channel(s)                               : 6 channels
Channel positions                        : Front: L C R, Side: L R, LFE
Sampling rate                            : 48.0 KHz
Bit depth                                : 16 bits
Compression mode                         : Lossy
Delay relative to video                  : -562ms
Stream size                              : 98.8 MiB (2%)
Language                                 : English
...output truncated...
Are there other CLI flags I need to be including to get the 6 channel audio to come through in the transcode?
- JP Briggs

MythTV Version : v0.28-2-g15cf421

User avatar
dekarl
Developer
Posts: 228
Joined: Thu Feb 06, 2014 11:01 pm
Germany

Re: mythtranscode downgrading audio to stereo

Post by dekarl » Wed Apr 13, 2016 2:29 pm

Does this sample only have one audio stream?
The common conversion from MPEG2-TS to MPEG2-PS leads to loss of metadata, like audio language, so you may automatically end up listening to a different audio stream without doing anything different.

Also, do you keep all audio streams?
I had a situation where I ended up with only the "descriptive audio stream" left after transcoding for a movie that I cared about. You may want to keep all audio streams as a workaround. (that option is also available in fixes/0.27)

jp.briggs
Newcomer
Posts: 14
Joined: Tue Apr 12, 2016 3:59 pm
United States of America

Re: mythtranscode downgrading audio to stereo

Post by jp.briggs » Wed Apr 13, 2016 4:03 pm

The transcoded file retains both of the 2 audio tracks from the original. I transcoded to MPEG2-TS (-e ts), which retains the language identifier, and Audio #1 stays as English (5.1 on original, 2.0 on transcoded), and Audio #2 stays as Spanish (2.0 on original, 2.0 on transcoded).

I've tried --passthrough with the same outcome. I've tried selecting --audiotrack to only select the English, yet both streams appear on the resultant .mpg.

I tried going through the Myth menus, and changing all the transcoding profiles to check the 'lossless' box, but the CLI mythtranscode result is the same.

It seems I cannot transcode and retain 6 channel audio :/
- JP Briggs

MythTV Version : v0.28-2-g15cf421

User avatar
dekarl
Developer
Posts: 228
Joined: Thu Feb 06, 2014 11:01 pm
Germany

Re: mythtranscode downgrading audio to stereo

Post by dekarl » Thu Apr 14, 2016 8:59 am

Hmm, that sounds like a bug then. One last thing to verify would be if it is just the signaling in the container (and the audio playing back is still 5.1) or if the actual audio stream is converted to stereo.

I could not find a ticket for this issue, can you file one? (please include the version)
https://code.mythtv.org/trac/wiki/Ticke ... ingaTicket

daraden
Senior
Posts: 169
Joined: Tue Feb 23, 2016 7:33 am
United States of America

Re: mythtranscode downgrading audio to stereo

Post by daraden » Thu Apr 14, 2016 11:21 am

try ffprobe instead of mediainfo, i had an issue with mediainfo reporting stereo when audio was still 5.1.

jp.briggs
Newcomer
Posts: 14
Joined: Tue Apr 12, 2016 3:59 pm
United States of America

Re: mythtranscode downgrading audio to stereo

Post by jp.briggs » Thu Apr 14, 2016 5:27 pm

dekarl wrote:Hmm, that sounds like a bug then. One last thing to verify would be if it is just the signaling in the container (and the audio playing back is still 5.1) or if the actual audio stream is converted to stereo.

I could not find a ticket for this issue, can you file one? (please include the version)
https://code.mythtv.org/trac/wiki/Ticke ... ingaTicket
Oh WOW!
I played the transcoded file with VLC. Sure enough, the codec info shows:

Code: Select all

Codec: A52 Audio (aka AC3)(a52 )
Language: English
Channels: 3F2R/LFE
Sample rate: 48000 Hz
Bitrate: 384 kb/s
So it IS 6 channel! Must be a bug in mythtranscode then, that puts in erroneous info:

Code: Select all

Audio #1
ID                                       : 4301 (0x10CD)
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                                 : 24mn 29s
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                  : 8ms
Stream size                              : 33.6 MiB (1%)
Language                                 : English
Weird!
And as a result, however, if I want to encode it with HandBrake, I cannot make the encoded file 6 channel. Handbrake sees the original (transcoded) as stereo, and so cannot make the output file 6 channel.

Frustrating!
- JP Briggs

MythTV Version : v0.28-2-g15cf421

jp.briggs
Newcomer
Posts: 14
Joined: Tue Apr 12, 2016 3:59 pm
United States of America

Re: mythtranscode downgrading audio to stereo

Post by jp.briggs » Thu Apr 14, 2016 7:24 pm

Opened ticket 12728
- JP Briggs

MythTV Version : v0.28-2-g15cf421

jp.briggs
Newcomer
Posts: 14
Joined: Tue Apr 12, 2016 3:59 pm
United States of America

Re: mythtranscode downgrading audio to stereo

Post by jp.briggs » Wed May 04, 2016 6:15 pm

So I opened the ticket about 3 weeks ago. Anyone know what the turnaround time is for movement on a ticket like this?
- JP Briggs

MythTV Version : v0.28-2-g15cf421

Post Reply