lisamelton / video_transcoding

Tools to transcode, inspect and convert videos.
MIT License
2.39k stars 160 forks source link

Videos are transcoding with only French stereo track. #323

Closed TronVonDoom closed 3 years ago

TronVonDoom commented 3 years ago

Hello! I am having trouble transcoding the movie Road House. Whenever the transcoding is done, the only audio track is French in stereo. This might be because the original file has five audio tracks, and French is the first one listed. They are listed as follows;

Stereo - [French] Stereo - [Spanish] Stereo - [English] Surround 5.1 - [English] Surround 5.1 - [English]

I don't have any additional audio arguments, so I am unsure why it didn't just pull like it usually does. The default is typically, Surround - [English] & Stereo - [English].

Are there any additional arguments that I could add to ensure that it sticks with "eng" and both the Surround and the Stereo tracks? Maybe, -add-audio eng?

After typing all of this, I've discovered that out of hundred or so transcodings, only four or five others are doing the same thing. If there is no convienient solution to this, it's no big deal, but I'd at least like to try. :)

Road House
lisamelton commented 3 years ago

@TronVonDoom I'm sorry you're having this problem. As you've discovered, transcode-video always selects the first audio track as the main audio track. However, you can easily change this behavior. In the --help output you can find this option detailed:

    --main-audio TRACK[=NAME]|LANGUAGE[=NAME]
                    select main track by number or first with language code
                      assigning it an optional name
                      (default: first track, i.e. 1)
                      (language code must be ISO 639-2 format, e.g.: `eng`)
                      (default output can be two audio tracks,
                        both surround and stereo, i.e. width is `double`)

So I would recommend adding --main-audio eng or a specific track number, e.g. --main-audio 4, to your command line.

Does that help?

TronVonDoom commented 3 years ago

So from my experience, typically, if the first track is English, by default it will output Surround - [English] & Stereo - [English]. If I am not mistaken, the Stereo track is just the Surround track that is mixed down to 2 channels?

My end goal is to keep the default settings of extracting Surround & Stereo, but just for the English tracks. If I use --main-audio eng, it will only pull the first English track in Stereo and not also in Surround.

lisamelton commented 3 years ago

@TronVonDoom Correct. If your input is a surround track then the main audio track will be output as two tracks, one surround and one a mixed-down stereo track.

When you specify a language as an argument to --main-audio, e.g. eng, then it will select the first track in English that it finds. That's why I suggested that you should also consider using a specific track number as an argument, e.g. --main-audio 4.

Your only other choice is to remux your original file to re-order the audio tracks using a tool like mkvmerge.

TronVonDoom commented 3 years ago

I was actually just remuxing the file to include the Surround track as first to test it out. I tend to use batch-transcode for a bunch of files, so checking them and then remuxing them when needed seems to be the best route for me.

Thank you for your super awesome response times, and super awesome program.

lisamelton commented 3 years ago

@TronVonDoom You are very welcome and thanks for using my tools!