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?
+ Reply to Thread
Results 1 to 7 of 7
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.
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
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.
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
OK, I am getting closer. I found this command to remove the phantom subtitle track after a conversion:
ffmpeg -i in.mp4 -c:v copy -c:a copy -c:s copy -dn -map_metadata:c -1 out.mp4
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.