Re: [FFmpeg-user] Extracting forced subtitles from a DVD.

2022-04-30 Thread Michael Mueck via ffmpeg-user
> dvd2concat uncompressed.dvdmedia > file.concat

> ffmpeg -analyzeduration 500M -probesize 500M -forced_subs_only 1 \
> -safe 0 -f concat -protocol_whitelist concat,ffconcat,file,subfile -i 
> file.concat \
> -vsync cfr \
> -map 0:0 -c:v hevc_videotoolbox -disposition:v default \
> -map 0:1 -c:a:0 copy -disposition:a:0 default \
> -map 0:5 -c:s:0 copy -disposition:s:0 default \
> -default_mode passthrough \
> compressed.mkv
> 
> However, when I play that compressed.mkv movie I see English subtitles for 
> EVERYTHING and not for only the forced parts i.e. when only a foreign 
> language is being spoken.
> 
> Could somebody please help me doing this last part so that my final subtitle 
> track only contains the forced subtitles like it does when I start with an 
> MKV instead. Thanks!

I think I found a solution through dumb luck while awaiting a response. I had 
previously been using the dvdsub codec and was told to use the "copy" codec 
instead, so I switched everything over to that. Later, when the dvd2concat 
technique was proposed, I ended up with the above commands, but that still 
didn't work - the final mkv file had English subtitles for everything instead 
of just the desired forced subtitles.

On a whim, I thought I'd try using the "dvdsub" subtitle codec again i.e. these 
commands:

dvd2concat uncompressed.dvdmedia > file.concat

ffmpeg -analyzeduration 500M -probesize 500M -forced_subs_only 1 \
-safe 0 -f concat -protocol_whitelist concat,ffconcat,file,subfile -i 
file.concat \
-vsync cfr \
-map 0:0 -c:v hevc_videotoolbox -disposition:v default \
-map 0:1 -c:a:0 copy -disposition:a:0 default \
-map 0:5 -c:s:0 dvdsub -disposition:s:0 default \
-default_mode passthrough \
compressed.mkv

and this time my final subtitle track was only the forced subtitles!! I'm so 
happy :-). It looks like if you use the dvd2concat method you must the dvdsub 
codec if you want "-forced_subs_only 1" to work.

There is also apparently an error in my earlier posts. I could have sworn when 
I switched everything over to the subtitle "copy" codec that I confirmed I 
still got only the forced subtitles with an MKV input, but I just checked again 
and that's not so. It looks like the only way to get just the forced subtitles 
via "-forced_subs_only 1" with an MKV input is by using the dvdsub codec. 

Regards,

Mick

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Extracting forced subtitles from a DVD.

2022-04-30 Thread Michael Mueck via ffmpeg-user
Hi again,

So I've had time to digest the inputs I've received so far and have my next 
question. Just to recap, I have a decrypted ripped DVD (just the main movie was 
extracted, no menus, no compression etc.) into a folder called 
"uncompressed.dvdmedia" that contains:
ls -R uncompressed.dvdmedia

AUDIO_TSInfo.json   VIDEO_TS

uncompressed.dvdmedia/AUDIO_TS:

uncompressed.dvdmedia/VIDEO_TS:
VIDEO_TS.IFOVTS_01_0.IFOVTS_01_1.VOBVTS_01_2.VOB

 I converted uncompressed.dvdmedia to an MKV file named "uncompressed.mkv" 
using MakeMKV. Here is the relevant English subtitle stream info for that file, 
and note that stream also contains embedded tags for the parts that are forced 
subtitles:

ffmpeg -i uncompressed.mkv
...
  Stream #0:5(eng): Subtitle: dvd_subtitle, 720x480 (default)
Metadata:
  BPS-eng : 3503
  DURATION-eng: 00:46:28.37507
  NUMBER_OF_FRAMES-eng: 372
  NUMBER_OF_BYTES-eng: 1221288
  SOURCE_ID-eng   : 0120BD
  _STATISTICS_WRITING_APP-eng: MakeMKV v1.16.7 darwin(x64-release)
  _STATISTICS_WRITING_DATE_UTC-eng: 2022-04-28 03:45:22
  _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES 
SOURCE_ID

When I do the following command I end up with a movie that displays ONLY the 
forced English subtitles by default (which is exactly what I want):

ffmpeg -forced_subs_only 1 \
-i uncompressed.mkv \
-vsync cfr \
-map 0:0 -c:v hevc_videotoolbox -disposition:v default \
-map 0:1 -c:a:0 copy -disposition:a:0 default \
-map 0:5 -c:s:0 copy -disposition:s:0 default \
-default_mode passthrough \
compressed.mkv

However, I don't want to have to first convert my movie to an MKV because that 
process is prone to introducing A/V sync issues. I was instructed by Nicolas 
George to use dvd2concat and then operate on that output. So here's what I did:

dvd2concat uncompressed.dvdmedia > file.concat

Here's the streams that contains:
ffmpeg -analyzeduration 500M -probesize 500M -safe 0 -f concat 
-protocol_whitelist concat,ffconcat,file,subfile -i file.concat
...
  Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, progressive), 720x480 [SAR 
32:27 DAR 16:9], 29.50 fps, 59.94 tbr, 90k tbn
Side data:
  cpb: bitrate max/min/avg: 760/0/0 buffer size: 1835008 vbv_delay: N/A
  Stream #0:1(en): Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
  Stream #0:2(fr): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
  Stream #0:3(pt): Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
  Stream #0:4(en): Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
  Stream #0:5(en): Subtitle: dvd_subtitle, 720x480
  Stream #0:6(en): Subtitle: dvd_subtitle, 720x480
  Stream #0:7(fr): Subtitle: dvd_subtitle, 720x480
  Stream #0:8(pt): Subtitle: dvd_subtitle, 720x480
  Stream #0:9(es): Subtitle: dvd_subtitle, 720x480
  Stream #0:10(en): Subtitle: dvd_subtitle, 720x480
  Stream #0:11(pt): Subtitle: dvd_subtitle, 720x480
  Stream #0:12(es): Subtitle: dvd_subtitle, 720x480

I have confirmed stream 0:5 is still the correct English subtitle track, so I 
then did:

ffmpeg -analyzeduration 500M -probesize 500M -forced_subs_only 1 \
-safe 0 -f concat -protocol_whitelist concat,ffconcat,file,subfile -i 
file.concat \
-vsync cfr \
-map 0:0 -c:v hevc_videotoolbox -disposition:v default \
-map 0:1 -c:a:0 copy -disposition:a:0 default \
-map 0:5 -c:s:0 copy -disposition:s:0 default \
-default_mode passthrough \
compressed.mkv

However, when I play that compressed.mkv movie I see English subtitles for 
EVERYTHING and not for only the forced parts i.e. when only a foreign language 
is being spoken.

Could somebody please help me doing this last part so that my final subtitle 
track only contains the forced subtitles like it does when I start with an MKV 
instead. Thanks!

Regards,

Mick

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Extracting forced subtitles from a DVD.

2022-04-29 Thread Nicolas George
Michael Mueck via ffmpeg-user (12022-04-28):
> In addition to the question below about the wrong subtitle track
> ending up in the output, I've also been looking into dvd2concat (which
> it looks like you wrote!). I was able to use it to make file.concat,
> but I'm having some trouble figuring out what to do with that file.
> I'd very much appreciate you pointing me in the right direction.
> Thanks!

The script is self-documenting:

NAME
dvd2concat - create a concat script for a DVD title

SYNOPSIS
tools/dvd2concat *path/to/dvd/structure* > *file.concat*

DESCRIPTION
This script uses lsdvd to produce concat script for a DVD title. The
resulting script can be used to play the DVD using ffplay, to transcode
it using ffmpeg or any other similar use.

*path/to/dvd/structure* is the path to the DVD structure hierarchy; it
normally contains a directory named VIDEO_TS. It must not be encrypted
with CSS.

*file.concat* is the output file. It can be used as an input to ffmpeg.
It will require the -safe 0 and -protocol_whitelist file,subfile,concat
options.

Then you need to peruse the documentation about concat scripts:

https://ffmpeg.org/ffmpeg-all.html#concat-1

> > On 2022.0428, at 16:19, Michael Mueck  wrote:

Please remember that top-posting is strictly forbidden on this list.

Regards,

-- 
  Nicolas George


signature.asc
Description: PGP signature
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Extracting forced subtitles from a DVD.

2022-04-28 Thread Michael Mueck via ffmpeg-user
G'day Ferdi,

I added the analyzeduration and probesize options as you suggested (which added 
about 3.5 minutes to the total time for a 48 minute TV episode before encoding 
started) but it didn't change anything. Note that I also had changed the 
subtitle codec from dvdsub to copy. That's not to say it wouldn't have worked, 
because there is a strange issue. Since changing the subtitle codec from dvdsub 
to copy I went from getting an empty subtitle track to now getting the wrong 
subtitle track in the output. I mapped stream 6 (the regular English subtitle 
track that also contains the tagged forced subtitles) but instead I am getting 
stream 7 (the English SDH subtitle track). Stream 7 very likely won't have any 
tagged forced subtitles in it (in which case you'd think you'd end up with an 
empty track given the "-forced_subs_only 1" specification.

This is the command and the output I see at the terminal (with a couple 
comments that I added):

ffmpeg -forced_subs_only 1 -analyzeduration 1000M -probesize 1000M \
-i combined.VOB \
-vsync cfr \
-map 0:1 -c:v hevc_videotoolbox -b:v 1500k -color_primaries:v smpte170m 
-color_trc:v bt709 -colorspace:v smpte170m -metadata:s:v title\= -disposition:v 
default \
-map 0:2 -c:a:0 copy -metadata:s:a:0 title\= -disposition:a:0 default \
-map 0:6 -c:s:0 copy -disposition:s:0 default \
-metadata:g title\= -default_mode passthrough \
-y crap.mkv



Input #0, mpeg, from 'combined.VOB':
  Duration: 00:48:19.62, start: 0.280633, bitrate: 5575 kb/s
  Stream #0:0[0x1bf]: Data: dvd_nav_packet
  Stream #0:1[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, progressive), 
720x480 [SAR 32:27 DAR 16:9], 5000 kb/s, 29.97 fps, 59.94 tbr, 90k tbn
Side data:
  cpb: bitrate max/min/avg: 760/0/0 buffer size: 1835008 vbv_delay: N/A
  Stream #0:2[0x80]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 448 kb/s
  Stream #0:3[0x81]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
  Stream #0:4[0x82]: Audio: ac3, 48000 Hz, 5.1(side), fltp, 384 kb/s
  Stream #0:5[0x83]: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
  Stream #0:6[0x21]: Subtitle: dvd_subtitle> (This is the regular 
English subtitle track that also contains the tagged forced subtitles)
  Stream #0:7[0x25]: Subtitle: dvd_subtitle> (This is the SDH subtitle 
track)
  Stream #0:8[0x26]: Subtitle: dvd_subtitle
  Stream #0:9[0x27]: Subtitle: dvd_subtitle
  Stream #0:10[0x20]: Subtitle: dvd_subtitle
  Stream #0:11[0x22]: Subtitle: dvd_subtitle
  Stream #0:12[0x23]: Subtitle: dvd_subtitle
  Stream #0:13[0x24]: Subtitle: dvd_subtitle
Stream mapping:
  Stream #0:1 -> #0:0 (mpeg2video (native) -> hevc (hevc_videotoolbox))
  Stream #0:2 -> #0:1 (copy)
  Stream #0:6 -> #0:2 (copy)
Press [q] to stop, [?] for help
Output #0, matroska, to 'crap.mkv':
  Metadata:
encoder : Lavf59.16.100
  Stream #0:0: Video: hevc, yuv420p(tv, smpte170m/smpte170m/bt709, 
progressive), 720x480 [SAR 32:27 DAR 16:9], q=2-31, 1500 kb/s, 29.97 fps, 1k 
tbn (default)
Metadata:
  encoder : Lavc59.18.100 hevc_videotoolbox
  Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, 5.1(side), fltp, 448 
kb/s (default)
  Stream #0:2: Subtitle: dvd_subtitle ([255][255][255][255] / 0x) 
(default)
More than 1000 frames duplicated   37888kB time=00:02:44.03 
bitrate=1892.2kbits/s dup=985 drop=0 speed=13.6x
More than 1 frames duplicated 395264kB time=00:27:42.04 
bitrate=1948.2kbits/s dup=9963 drop=0 speed=13.8x
frame=86902 fps=415 q=-0.0 Lsize=  690877kB time=00:48:19.59 
bitrate=1951.9kbits/s dup=17382 drop=0 speed=13.8x
video:529401kB audio:158534kB subtitle:1427kB other streams:0kB global 
headers:0kB muxing overhead: 0.219704%


Regards,

Mick


> On 2022.0428, at 17:50, Ferdi Scholten via ffmpeg-user 
>  wrote:
> 
> 
>> Anybody know what's going on here? How come ffmpeg respects 
>> "-forced_subs_only 1" for an MKV but not for a VOB?
>> 
>> 
>> 
>> ___
>> ffmpeg-user mailing list
>> ffmpeg-user@ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>> 
>> To unsubscribe, visit link above, or email
>> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
> In the VOB structure the subtitle track may begin at the first time where it 
> is needed. When you only have the VOB files, the forced subtitles might not 
> be at the beginning of the structure so will not be found by ffmpeg when it 
> analyzes the first 5 seconds (default) of the VOB file. You can force ffmpeg 
> to analyze a bigger part of the VOB file to find additional streams by adding 
> -analyzeduration and -probesize in your command. Both default to 500 
> meaning it wil scan the first 500 microseconds of the first 500 bytes 
> of the file. Specify large values here to analyze a much bigger part of the 
> file for a longer duration.
> for example:
> 
> ffmpeg -analyzeduration 1000M \
> -probesize 1000M \
> -forced_subs_only 1 \
> -i combined.vob \
> -vsync 

Re: [FFmpeg-user] Extracting forced subtitles from a DVD.

2022-04-28 Thread Michael Mueck via ffmpeg-user
Hi Nicolas,

In addition to the question below about the wrong subtitle track ending up in 
the output, I've also been looking into dvd2concat (which it looks like you 
wrote!). I was able to use it to make file.concat, but I'm having some trouble 
figuring out what to do with that file. I'd very much appreciate you pointing 
me in the right direction. Thanks!

Regards,

Mick


> On 2022.0428, at 16:19, Michael Mueck  wrote:
> 
> Thanks for responding Nicolas.
> 
>> On 2022.0428, at 14:01, Nicolas George  wrote:
>> 
>> Michael Mueck via ffmpeg-user (12022-04-28):
>>> I have decrypted and ripped all of my DVDs into individual VIDEO_TS
>>> structures for just the main movie or an individual TV episode. Each
>>> move or TV episode consists of a VIDEO_TS folder containing the
>>> original uncompressed
>>> VIDEO_TS.IFO,  VTS_01_0.IFO  and  VTS_01_[1->N].VOB  files.
>> 
>> This is already wrong. The VOB files do not map directly to the video
>> parts of the contents. If you do that, you will get also all the menu
>> crap in your resulting file.
> 
> The ripping software that I used dealt with that i.e. all the VOB files are 
> categorically only for the main movie (or a given episode) and there are no 
> menus at all. Notice that all my VOB files reference the same stream and the 
> 1->N part is just the sequentially numbered sequence of 1GB files.
> 
>> Also, the subtitles palette is not in the VOB files.
> 
> Agreed, but for now I'm focusing on just getting the forced subtitles working 
> right.
> 
>> You can generate a concat script to access the DVD hierarchy correctly
>> using the dvd2concat script in the tools directory.
>> 
>> It is entirely possible that doing so would fix your issue.
> 
> do I still need to do this given the above response? (I'll look into 
> dvd2concat after sending this email).
> 
>> Also, do not re-encode the subtitles, use -c copy, it will be more
>> reliable.
> 
> I'm not sure how I latched onto the dvdsub codec, but I did just now try 
> "copy" and I get the same good result when using an MKV as the input. However 
> I get a curiously different result when using the VOB input with the "copy" 
> subtitle codec - instead of an empty subtitle track I now get full-time 
> English subtitles but the subtitle track is for stream 7 instead of stream 6! 
> Stream 6 was the regular English subtitle track (that contained embedded 
> forced subtitles) and Stream 7 is the English SDH subtitle track. That's 
> weird!
> 
> Slightly off-topic: Is it really true that ffmpeg can't handle a standard DVD 
> file structure (especially if everything is decrypted)?
> 
>> 
>> Regards,
>> 
>> -- 
>> Nicolas George
> 

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Extracting forced subtitles from a DVD.

2022-04-28 Thread Ferdi Scholten via ffmpeg-user




Anybody know what's going on here? How come ffmpeg respects "-forced_subs_only 
1" for an MKV but not for a VOB?



___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
In the VOB structure the subtitle track may begin at the first time 
where it is needed. When you only have the VOB files, the forced 
subtitles might not be at the beginning of the structure so will not be 
found by ffmpeg when it analyzes the first 5 seconds (default) of the 
VOB file. You can force ffmpeg to analyze a bigger part of the VOB file 
to find additional streams by adding -analyzeduration and -probesize in 
your command. Both default to 500 meaning it wil scan the first 
500 microseconds of the first 500 bytes of the file. Specify 
large values here to analyze a much bigger part of the file for a longer 
duration.

for example:

ffmpeg -analyzeduration 1000M \
-probesize 1000M \
-forced_subs_only 1 \
-i combined.vob \
-vsync cfr \
-map 0:1 -c:v hevc_videotoolbox -disposition:v default \
-map 0:2 -c:a:0 copy -disposition:a:0 default \
-map 0:6 -c:s:0 dvdsub -disposition:s:0 default \
-default_mode passthrough \
compressed.mkv


Greetings
Ferdi Scholten

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Extracting forced subtitles from a DVD.

2022-04-28 Thread Michael Mueck via ffmpeg-user
Thanks for responding Nicolas.

> On 2022.0428, at 14:01, Nicolas George  wrote:
> 
> Michael Mueck via ffmpeg-user (12022-04-28):
>> I have decrypted and ripped all of my DVDs into individual VIDEO_TS
>> structures for just the main movie or an individual TV episode. Each
>> move or TV episode consists of a VIDEO_TS folder containing the
>> original uncompressed
>>  VIDEO_TS.IFO,  VTS_01_0.IFO  and  VTS_01_[1->N].VOB  files.
> 
> This is already wrong. The VOB files do not map directly to the video
> parts of the contents. If you do that, you will get also all the menu
> crap in your resulting file.

The ripping software that I used dealt with that i.e. all the VOB files are 
categorically only for the main movie (or a given episode) and there are no 
menus at all. Notice that all my VOB files reference the same stream and the 
1->N part is just the sequentially numbered sequence of 1GB files.

> Also, the subtitles palette is not in the VOB files.

Agreed, but for now I'm focusing on just getting the forced subtitles working 
right.

> You can generate a concat script to access the DVD hierarchy correctly
> using the dvd2concat script in the tools directory.
> 
> It is entirely possible that doing so would fix your issue.

do I still need to do this given the above response? (I'll look into dvd2concat 
after sending this email).

> Also, do not re-encode the subtitles, use -c copy, it will be more
> reliable.

I'm not sure how I latched onto the dvdsub codec, but I did just now try "copy" 
and I get the same good result when using an MKV as the input. However I get a 
curiously different result when using the VOB input with the "copy" subtitle 
codec - instead of an empty subtitle track I now get full-time English 
subtitles but the subtitle track is for stream 7 instead of stream 6! Stream 6 
was the regular English subtitle track (that contained embedded forced 
subtitles) and Stream 7 is the English SDH subtitle track. That's weird!

Slightly off-topic: Is it really true that ffmpeg can't handle a standard DVD 
file structure (especially if everything is decrypted)?

> 
> Regards,
> 
> -- 
>  Nicolas George

___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


Re: [FFmpeg-user] Extracting forced subtitles from a DVD.

2022-04-28 Thread Nicolas George
Michael Mueck via ffmpeg-user (12022-04-28):
> I have decrypted and ripped all of my DVDs into individual VIDEO_TS
> structures for just the main movie or an individual TV episode. Each
> move or TV episode consists of a VIDEO_TS folder containing the
> original uncompressed
>   VIDEO_TS.IFO,  VTS_01_0.IFO  and  VTS_01_[1->N].VOB  files.

This is already wrong. The VOB files do not map directly to the video
parts of the contents. If you do that, you will get also all the menu
crap in your resulting file.

Also, the subtitles palette is not in the VOB files.

You can generate a concat script to access the DVD hierarchy correctly
using the dvd2concat script in the tools directory.

It is entirely possible that doing so would fix your issue.

Also, do not re-encode the subtitles, use -c copy, it will be more
reliable.

Regards,

-- 
  Nicolas George
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".


[FFmpeg-user] Extracting forced subtitles from a DVD.

2022-04-28 Thread Michael Mueck via ffmpeg-user
Hi,

First time poster here - please be gentle on me :-).

I have decrypted and ripped all of my DVDs into individual VIDEO_TS structures 
for just the main movie or an individual TV episode. Each move or TV episode 
consists of a VIDEO_TS folder containing the original uncompressed
VIDEO_TS.IFO,  VTS_01_0.IFO  and  VTS_01_[1->N].VOB  files.

The time has finally come for me to COMPRESS everything into MKV files and I 
want to do that using a script calling ffmpeg. My intention is to toss all 
audio streams except English 5.1 (where possible) and only keep one subtitle 
track containing forced English subtitles IF forced subtitles exist. However, 
dealing with forced subtitles has proven to be too much for me :-(. 

I know that forced English subtitles can be authored a couple different ways - 
either as a separate subtitle track or as part of the regular English subtitle 
track in which the forced bits are tagged so they can be identified and 
displayed separately if requested. Irrespective of which technique is employed, 
my DVD player always just works when displaying only forced subtitles. 
Likewise, Apple's DVD Player app also just works (although it won't play MKV 
files). Annoyingly, I haven't found ANY other playing software that will 
reliably play my ripped movies/episodes and only display forced subtitles as 
needed (i.e. AUTOMATICALLY select the right forced subtitle track or 
AUTOMATICALLY only display the forced subtitles within the English subtitle 
track). 

I'd like to start with movies containing forced subtitles are not in their own 
subtitle track but rather tagged within the regular English subtitle track. 

Here's something that works. Using MakeMKV, I first convert the VIDEO_TS 
structure into an MKV file called "uncompressed.mkv". I don't know yet how to 
instruct ffmpeg to specifically pick out only the subtitle track containing the 
embedded forced subtitles, so for now I'll pick it manually and run the 
following ffmpeg command (notably utilizing the "-forced_subs_only 1" option 
and the "dvdsub" codec:

ffmpeg -forced_subs_only 1 \
-i uncompressed.mkv \
-vsync cfr \
-map 0:0 -c:v hevc_videotoolbox -disposition:v default \
-map 0:1 -c:a:0 copy -disposition:a:0 default \
-map 0:5 -c:s:0 dvdsub -disposition:s:0 default \
-default_mode passthrough \
compressed.mkv

That works i.e. when I play "compressed.mkv" I only see English subtitles when 
the non-English stuff is spoken :-).

However, for reliability reasons I'd like to avoid for now, I don't want to 
first convert my movie to MKV i.e. I'd like to have ffmpeg directly operate on 
the original VOB structure. I understand that (to my IMMENSE displeasure) in 
2022 FFmpeg is unable to treat a DVD structure as a single movie - it can only 
deal with ONE VOB file. So I did:
cat *.VOB > combined.vob
and used that as the input to the same ffmpeg command i.e.:
(Please ignore the different stream numbers - MakeMKV removes the VOB's stream 
0:0  and subtracts 1 from each of them)

ffmpeg -forced_subs_only 1 \
-i combined.vob \
-vsync cfr \
-map 0:1 -c:v hevc_videotoolbox -disposition:v default \
-map 0:2 -c:a:0 copy -disposition:a:0 default \
-map 0:6 -c:s:0 dvdsub -disposition:s:0 default \
-default_mode passthrough \
compressed.mkv

That did NOT work because the resultant subtitle track was completely empty! I 
also tried another trick for defining the ffmpeg input using:
-i concat:"$(ls -1 VIDEO_TS/*.VOB | sort | xargs echo | sed 's/ /|/g')"
but it still yielded an empty subtitle track. Same thing when I also tried:
cat VTS_01_0.IFO *.VOB > combined.vob

I've been able to confirm the VOB files contain all of the subtitles, and that 
VIDEO_TS.IFO is irrelevant, but I haven't been able to prove if VTS_01_0.IFO 
contains the tags for the specific forced subtitles (I suspect not, but I don't 
know).

Anybody know what's going on here? How come ffmpeg respects "-forced_subs_only 
1" for an MKV but not for a VOB?

Sorry for the lengthy email - if you've made it this far I'm already thankful!

Regards,

Mick


___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".