lisamelton / other_video_transcoding

Other tools to transcode videos.
MIT License
543 stars 24 forks source link

--add-subtitle with '=forced' #146

Closed weaverm closed 2 years ago

weaverm commented 2 years ago

I was about to open a bug to report than when using =forced with --add-subtitle that other-transcode was dropping that subtitle and not adding it into the resulting .mkv file. Then, however, I realized that what wasn't working was --add-subtitle name=forced, which is exactly what the documentation says. Apparently it only works as --add-subtitle 1=forced, which I failed to realize.

However, when trying to add a subtitle with a name and set it =forced, other-transcode seems to silently drop the subtitle track in question from the output all together. Is that intentional? I would've expected the subtitle would be added by name but just not have the forced flag set in the output.

lisamelton commented 2 years ago

@weaverm I'm sorry you're having this problem but, honestly, I don't know what you mean. Please include here the exact set of options you're using for other-transcode and, more importantly, the output from other-transcode.bat --scan on your input or the output from MediaInfo on that input. Thanks.

weaverm commented 2 years ago

Here's the mediainfo output for my input file:

Complete name                            : movie.mkv
Format                                   : Matroska
Format version                           : Version 2
File size                                : 26.6 GiB
Duration                                 : 2 h 4 min
Overall bit rate mode                    : Variable
Overall bit rate                         : 30.5 Mb/s
Movie name                               : Movie Name
Encoded date                             : UTC 2020-11-29 07:55:32
Writing application                      : MakeMKV v1.15.3 darwin(x64-release)
Writing library                          : libmakemkv v1.15.3 (1.3.10/1.5.2) darwin(x64-release)

Video
ID                                       : 1
ID in the original source medium         : 4113 (0x1011)
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L4.1
Format settings                          : CABAC / 2 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 2 frames
Codec ID                                 : V_MPEG4/ISO/AVC
Duration                                 : 2 h 4 min
Bit rate mode                            : Variable
Bit rate                                 : 27.8 Mb/s
Width                                    : 1 920 pixels
Height                                   : 1 080 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.558
Stream size                              : 24.2 GiB (91%)
Language                                 : English
Default                                  : No
Forced                                   : No
Original source medium                   : Blu-ray

Audio #1
ID                                       : 2
ID in the original source medium         : 4352 (0x1100)
Format                                   : MLP FBA
Format/Info                              : Meridian Lossless Packing FBA
Commercial name                          : Dolby TrueHD
Codec ID                                 : A_TRUEHD
Duration                                 : 2 h 4 min
Bit rate mode                            : Variable
Bit rate                                 : 1 876 kb/s
Maximum bit rate                         : 3 762 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 1 200.000 FPS (40 SPF)
Bit depth                                : 24 bits
Compression mode                         : Lossless
Stream size                              : 1.63 GiB (6%)
Title                                    : Surround 5.1
Language                                 : English
Default                                  : Yes
Forced                                   : No
Original source medium                   : Blu-ray

Audio #2
ID                                       : 3
ID in the original source medium         : 4352 (0x1100)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Codec ID                                 : A_AC3
Duration                                 : 2 h 4 min
Bit rate mode                            : Constant
Bit rate                                 : 640 kb/s
Channel(s)                               : 6 channels
Channel layout                           : L R C LFE Ls Rs
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 570 MiB (2%)
Title                                    : Surround 5.1
Language                                 : English
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No
Original source medium                   : Blu-ray

Audio #3
ID                                       : 4
ID in the original source medium         : 4354 (0x1102)
Format                                   : AC-3
Format/Info                              : Audio Coding 3
Commercial name                          : Dolby Digital
Format settings                          : Dolby Surround
Codec ID                                 : A_AC3
Duration                                 : 2 h 4 min
Bit rate mode                            : Constant
Bit rate                                 : 192 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 31.250 FPS (1536 SPF)
Compression mode                         : Lossy
Stream size                              : 171 MiB (1%)
Title                                    : Director+ Commentary
Language                                 : English
Service kind                             : Complete Main
Default                                  : No
Forced                                   : No
Original source medium                   : Blu-ray

Text #1
ID                                       : 5
ID in the original source medium         : 4608 (0x1200)
Format                                   : PGS
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 53 min
Bit rate                                 : 31.4 kb/s
Count of elements                        : 2478
Stream size                              : 25.5 MiB (0%)
Language                                 : English
Default                                  : No
Forced                                   : No
Original source medium                   : Blu-ray

Text #2
ID                                       : 6
ID in the original source medium         : 4608 (0x1200)
Format                                   : PGS
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 1 h 17 min
Bit rate                                 : 1 297 b/s
Count of elements                        : 108
Stream size                              : 737 KiB (0%)
Title                                    : Forced Subtitles
Language                                 : English
Default                                  : Yes
Forced                                   : Yes
Original source medium                   : Blu-ray

Text #3
ID                                       : 7
ID in the original source medium         : 4609 (0x1201)
Format                                   : PGS
Codec ID                                 : S_HDMV/PGS
Codec ID/Info                            : Picture based subtitle format used on BDs/HD-DVDs
Duration                                 : 2 h 0 min
Bit rate                                 : 23.4 kb/s
Count of elements                        : 2802
Stream size                              : 20.2 MiB (0%)
Title                                    : SDH Subtitles
Language                                 : English
Default                                  : No
Forced                                   : No
Original source medium                   : Blu-ray

Menu
00:00:00.000                             : en:Chapter 01
00:08:47.026                             : en:Chapter 02
00:21:13.939                             : en:Chapter 03
00:25:37.244                             : en:Chapter 04
00:35:01.057                             : en:Chapter 05
00:43:01.996                             : en:Chapter 06
00:49:27.547                             : en:Chapter 07
00:57:50.675                             : en:Chapter 08
01:04:01.170                             : en:Chapter 09
01:08:45.037                             : en:Chapter 10
01:13:34.618                             : en:Chapter 11
01:20:35.664                             : en:Chapter 12
01:26:32.228                             : en:Chapter 13
01:35:53.122                             : en:Chapter 14
01:44:31.431                             : en:Chapter 15
01:50:07.267                             : en:Chapter 16

When I use this command line (on my Mac) other-transcode --x265 --main-audio 2 --add-audio Commentary --add-subtitle Forced=forced --add-subtitle SDH /path/to/movie.mkv

The resulting output does not contain the subtitle track named Forced Subtitles. It only contains SDH Subtitles.

When I use this command other-transcode --x265 --main-audio 2 --add-audio Commentary --add-subtitle Forced --add-subtitle SDH /path/to/movie.mkv I get an output file with both subtitle tracks.

lisamelton commented 2 years ago

@weaverm Thanks! I understand what you're doing now. You're trying to add a subtitle by track name and at the same time set the forced disposition. But that's not allowed. The --help output explains that setting forced disposition requires that the track must be added by number. The reason why it's not allowed is because specifying the track by name could result in multiple tracks being selected. And that won't work because only one track should ever have the forced disposition set.

Does that explain the behavior?

weaverm commented 2 years ago

Thanks for the clarification on the reasons. However, is not including the subtitle track at all the intention? I would’ve expected the subtitle(s) to be in the output, just without the forced flag set.

-Matt

On Mar 13, 2022, at 6:02 PM, Don Melton @.***> wrote:

 @weaverm Thanks! I understand what you're doing now. You're trying to add a subtitle by track name and at the same time set the forced disposition. But that's not allowed. The --help output explains that setting forced disposition requires that the track must be added by number. The reason why it's not allowed is because specifying the track by name could result in multiple tracks being selected. And that won't work because only one track should ever have the forced disposition set.

Does that explain the behavior?

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you were mentioned.

lisamelton commented 2 years ago

@weaverm When the argument to --add-subtitle didn't begin with a number then the entire argument was interpreted as a track name. And since there was no track named "Forced=forced" then nothing was included. That's actually a feature and not a bug. :)

weaverm commented 2 years ago

Ahh… I understand. Thanks.