Closed hisaac closed 4 years ago
Apologies if this is too "back to basics". In short: MP4 files are more restrictive about the formats supported for video, audio, and subtitles. MKV is more flexible, but less supported in that you often need to install 3rd party software to play them.
Longer version:
A video file can (broadly) be thought of the following parts:
The video stream The audio stream(s) The subtitle stream(s) The container
The container is the file format, mp4 and mkv are 2 example of containers (there's also MOV, AVI, and many others).
Containers have different features, and one of the nice things about the MKV container as compared to MP4 is its broader support for different stream codecs.
On to subtitle codec:
Broadly speaking, there are 2 categories: text-based and image-based. The subtitles on DVDs and Blu-Rays are image-based. In this case, it's a Blu-Ray subtitle (PGS subtitles), and this is not a supported codec in MP4 files. In order to include the subtitles you'll need to use the MKV container
MP4 supports text based subtitles, like .srt
, and I think it supports the DVD image-based subtitle, but I'm not sure.
Thank you for the detailed explanation @samhutchins. I guess for now I'll just use mkv, or I just skip the embedded subtitles and download an .srt file from somewhere instead.
@samhutchins Thanks for that brilliant summary of the issue!
@hisaac Yes, I'm afraid you can't add image-based subtitles to MP4 output. It's a limitation of both the format and ffmpeg
. I'll close this now but feel free to open other issues when you encounter problems.
Hello!
I just used other_video_transcoding for the first time to convert a video. The first pass converted it to mkv, but I'd like to convert the same video to mp4 to compare. Problem is, I get an error message when I try to convert to mp4. Here are the exact commands I'm using:
The working command, converting to mkv:
The non-working command, the only difference here being the addition of the
--mp4
flag:The error message I receive:
I'm not super familiar with video conversion like this, so I'm not sure how to resolve this. Does mp4 not support certain types of subtitles? Any advice?
My environment:
Here's the full shell output if that's helpful: