lisamelton / other_video_transcoding

Other tools to transcode videos.
MIT License
544 stars 25 forks source link

Possible bug when trans-coding certain files #56

Closed jkowalcz closed 4 years ago

jkowalcz commented 4 years ago

When Trans-coding a file with the following Streams, I have three files that has this setup with the English AAC surround as the last stream:

Stream #0: 0 - Subtitile (forced) Stream #0: 1 - Subtitile Stream #0: 2 - Audio - AC3 surround - French Stream #0: 3 - video - H264 Stream #0: 4 - Audio - AAC surround - English

Both these three command lines failed to add the English Audio: c:\bin\other-transcode.rb --add-audio eng=surround --add-subtitle auto --add-subtitle eng --crop auto --qsv --main-audio 4 ...something....mkv

c:\bin\other-transcode.rb --add-audio eng=surround --add-subtitle auto --add-subtitle eng --crop auto --qsv --main-audio 4=surround ...something....mkv

c:\bin\other-transcode.rb --add-audio 4 --add-subtitle auto --add-subtitle eng --crop auto --qsv --main-audio 4 ...something....mkv

All three give this in the logs

Stream #0:3 -> #0:0 (h264 (native) -> h264 (h264_qsv)) Stream #0:0 -> #0:1 (copy)

The only two streams in the output file are #0, and #3

PS C:\Users\1jkowalczyk> C:\bin\other-transcode.rb --version other-transcode 0.3.1 Copyright (c) 2019-2020 Don Melton

I may be in error on my command line and would like another set of eyes on this error. I have the head of the log files that were produced by ffmpeg if needed.

This command line worked to get output with English, but the French audio is also trans-coded.

c:\bin\other-transcode.rb --add-audio eng=surround --add-subtitle auto --add-subtitle eng --crop auto ...something....mkv

Stream #0:3 -> #0:0 (h264 (native) -> h264 (h264_qsv)) Stream #0:2 -> #0:1 (copy) Stream #0:4 -> #0:2 (aac (native) -> ac3 (native)) Stream #0:0 -> #0:3 (copy)

lisamelton commented 4 years ago

@jkowalcz I'm sorry you're having this problem.

When using the --main-audio option, the track number argument refers to the index of the audio track within your input file. Which in your case would be track number 2 because that would be the second audio track in your input.

You can verify that by using the --scan option, i.e. other-transcode --scan input.mkv and it should help you identify the proper track.

If that doesn't solve the problem then please attach your full .log file to this issue. Thanks.

jkowalcz commented 4 years ago

Thanks Don!

I wanted Stream 4 as the main-audio, and that is the 2 Audio track, since the audio track index starts at 1.

Take away : Stream # <> Track #

You may want to add that fact to the Wiki page as I read that a few times, and just kept translating Track to be Stream, no matter how many time I read it.