VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. I am relatively new to video conversion. I have run across and used a number of GUI apps to do various things, as well as trying to use ffmpeg to understand some of the more intricate details. Obviously I want to use the method(s) that involve the fewest steps, retain the most information, and, not degrade the quality.

    The current problem I have is trying to convert a DVD to an MP4. In this current problem, eventually I want to add a subtitle track to the final MP4. The DVD has multiple titles (trailers, interviews, etc.), chapters in the main title, and, multiple subtitle tracks. Here are the issues I am running into:

    HandBrake - converting and importing a subtitle track file:
    • retains all chapters
    • on its own creates a subtitle track that only shows chapter names as the subtitles (that track cannot be removed by ffmpeg)
    • converts the main title but not the other titles

    WonderFox DVD Converter Pro - converting and importing a subtitle track file:
    • loses all chapters
    • all of the other subtitle tracks are lost
    • able to convert all titles (which is nice in that I may eventually concatenate them to the main title)

    Subtitle Converter - using the "DVD authoring wizard" to import a subtitle track file
    • retains all chapters
    • retains all subtitle track
    • retains all titles
    • ends up with everything I want, but, in a DVD format and not a MP4 format

    It seems that all of the other GUI apps I find do not allow me to import a subtitle track and/or doesn't retain chapters and/or subtitle tracks and/or multiple titles. It would seem that converting a DVD to an MP4 and not lose chapters or subtitles would be an obvious and basic thing to do. What am I not understanding with what I am doing?
    Quote Quote  
  2. Originally Posted by the_steve_randolph View Post
    It would seem that converting a DVD to an MP4 and not lose chapters or subtitles would be an obvious and basic thing to do. What am I not understanding with what I am doing?
    1. DVD video formatting (chapters, subtitles) is often an utterly, completely separate thing from the actual video on the disc. Since these "features" are actually programming specific to the dvd physical disc format, and not embedded in the video, it typically does not carry over when you convert from the physical disc format to portable PC formats like MP4 or MKV. Handbrake kinda sorta manages to carry over chapters, but not always, and can have other issues (like all conversion tools).

    2. MP4 format does not support internal "soft" subtitles at all (being able to turns subs on or off at will, or being able to choose among multiple subs). If you must use MP4 format for a specific reason like compatibility with an older player or TV, you need to compromise in terms of subtitle functionality. You can permanently burn in (aka hard code) one subtitle track, which is convenient and keeps everything in one simple file, but sometimes doesn't look good and doesn't allow turning the sub off.

    Or, you can extract the subtitles from the DVD as separate .srt files and bundle them in a folder with the MP4. This has the advantage of allowing subs to be turned on or off, and ability to choose among multiple subs. The drawback is the sub .srt file must be placed inside a folder with the MP4, and be named exactly the same as the MP4 if you want the sub to be auto-detected and accessible by a TV USB feature or BluRay player. Switching to a different sub is not possible on the fly, because you'd need to re-name the new preferred sub to match the MP4 each time you change to a different sub. The exception would be if you only intend to play the MP4s on a computer: computer software players are more flexible in allowing different subs to be chosen on the fly, and they don't need to be named exactly the same as the MP4 or even kept in the same folder.

    3. If you don't have a specific need for MP4, but do need flexible subtitle control embedded directly in the video file itself, consider converting the DVD to MKV format instead of MP4. Unlike MP4, MKV files can store multiple subtitles internally, which are detected and become selectable by any device capable of playing MKV video files.
    Last edited by orsetto; 31st May 2021 at 00:02.
    Quote Quote  
  3. Thanks for the reply.

    I am finding shortcomings with both MKV and MP4.

    I am still researching an issue where either HandBrake and/or ffmpeg seems to add an extra subtitle track. Not sure at this moment if it is from DVD to MKV or from MKV to MP4. I am also trying to import a chapter file along with a few other things in a single ffmpeg command. That subtitle track seems to be the chapter names, only displaying for a few seconds as the VLC playback moves from one chapter to another. I have not been able to identify/remove this phantom subtitle track with ffmpeg.

    I am finding that MKV does not retain the Windows "frame width" or "frame height" properties. Also, Drax can add chapters to MP4's but not MKV's.

    Also, I do have an MP4 that has a subtitle track in it. So, MP4's can have them, but, I don't know how it is different from other MP4's that I have.

    Basically, I am starting with either a DVD or an MKV that doesn't have all of the information that I want the eventual output file to have, but, can't seem to use a single ffmpeg command to accomplish everything.
    Last edited by the_steve_randolph; 31st May 2021 at 04:55. Reason: typos and removing the link to an app added by the site
    Quote Quote  
  4. I've seen that annoying "phantom sub indicating chapter numbers'' issue in a handful of downloaded files, but could never figure out where it was stored or how to get rid of it.

    Yes, you can occasionally run across AVI or MP4 files with embedded active subtitle features similar to MKV, but they are completely off-spec and non-standard for those formats. Some PC software players will interpret them correctly, but most standalone hardware players will not. On the rare occasions people post about them, its mostly to complain how they won't display properly on anything the user owns.

    Wait a few days, and others more expert in these processes may chime in with specific advice on how to solve the window sizing etc issues you've encountered.
    Quote Quote  
  5. Originally Posted by orsetto View Post
    Wait a few days, and others more expert in these processes may chime in with specific advice on how to solve the window sizing etc issues you've encountered.
    Actually I am not having a "window sizing" issue. If you go into Windows Explorer and add the property columns for "frame height" and "frame width", you will see that most video files show you the dimensions. What I have learned is that this information is in the file metadata and not displayed from the codec information. Obviously it is easier and quicker to view that info in Explorer as opposed to using another app to look at the codec info. My point was that I can set that metadata info in an MP4 but not in a MKV. In trying to achieve a converted file with all of the info that I want, I may have to settle with not converting to an MKV because of that and other issues.
    Quote Quote  
  6. Originally Posted by orsetto View Post
    I've seen that annoying "phantom sub indicating chapter numbers'' issue in a handful of downloaded files, but could never figure out where it was stored or how to get rid of it.
    I have a hint as to what is going on there. In another thread I was asking why a MP4 to MP4 ffmpeg copy was losing subtitles. That problem had to do with me/ffmpeg using the default streaming selection behavior and the subtitle not matching the default encoder text/image-based codec type.

    I looked at the console output from an MP4 with this phantom subtitle track, and, it is labeled as: "Stream #0:3(eng): Data: bin_data (text / 0x74786574)". Also it states that the stream #0:3's "handler_name" is "SubtitleHandler", which is probably why that data stream is shown as a subtitle track in VLC. And, during this conversion, the input file had existing chapters and somehow that got copied into this data stream.

    So, that phantom subtitle track is actually a data stream. But, as of this moment, I have not figured out how to use ffmpeg to remove that stream. That is, the command substring "-map -0:d:0" does not remove it in a command after the conversion. Instead, I get this error message: "Stream map '0:d:0' matches no streams"

    When I use the command substring "-map -0:d", it does not work and generates the error message: "Stream map '0:d' matches no streams"

    So, I need to figure out either how to prevent the creation of that data stream during the conversion or how to remove the data stream in a second ffmpeg command after the conversion command.
    Last edited by the_steve_randolph; 31st May 2021 at 18:22. Reason: clarity and extra info
    Quote Quote  
  7. OK, I am getting closer. I found this command to remove the phantom subtitle track after a conversion:

    Code:
    ffmpeg -i in.mp4 -c:v copy -c:a copy -c:s copy -dn -map_metadata:c -1 out.mp4
    This command removes that phantom subtitle track by removing the data stream. The downside is that originally the chapter names in VLC started with "Chapter 1" and went to "Chapter 12". But, after that command, the chapters are still there, but, they show up in VLC as starting with "Chapter 0" and going to "Chapter 11". When clicking on those chapters in VLC, they work. But, when I look at the output file with Drax, the chapters are missing completely.

    In my research of ffmpeg, I really haven't looked at anything to do with the data or attachment streams. Obviously I can change/add the chapter names with Drax. But, I would prefer a solution that does not completely remove all data streams via "-dn" in case I find a use for the data stream in the future.

    After a little more research, I have discovered that VLC will show an additional subtitle track if it finds an external subtitle file in the same folder and the same O/S name as the video file. In that case, the subtitles will be what are in that external file and not the chapter names. I will have to make a mental note to check for that in the future. But, concerning this problem and the OP, the data stream is the problem/issue/answer here - and not that VLC functionality.
    Last edited by the_steve_randolph; 2nd Jun 2021 at 01:03.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!