Re: [FFmpeg-user] Extracting forced subtitles from a DVD.
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.
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.
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.
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.
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.
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".
[FFmpeg-user] Multichannel audio live streaming problem
Hi all, Due to bandwidth problems I'm trying to do a sigle rtmp stream to pass 1 video stream with 6 audio mono audio channels to another computer over the internet to recompose it later. I'm successfully doing it but my 4th channel results in very goofy sound being lowcutted and highpassed. ffmpeg is guessing a 5.1 channel layout so the 4th channel is seen as LFE, but in every configuration I've tried I was unable to prevent this kind of behaviour. Is there a way to live stream with 6 channels of mono audio without eq filtering being applied? ___ 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".