Hi,
I am trying to convert a mkv file using ffmpeg. However, FFMpeg does not read the subtitle correct and automatically include it in the resulting file. I am just wondering if there's a way to add subtitle when converting to MP4 from a mkv file using ffmpeg. I am doing this for my program and would really appreciate if the solution is in the form of command line tool or just special ffmpeg parameter which I did not know about. Thanks!
-
ViciousXUSMC Master Viking NBR Reviewer
Demux the MKV with MKVExtracGUI2(needs MKV Toolnix)
Remux to MP4 with MP4Box (use YAMB Beta)
Since your only changing the container there is no reason to encode anything just need to demux and remux.
As far as automatically include, do you mean it plays the subs no matter what (cant turn them off) or just gives them the default flag so they come on automatically without you manually turning them on.
With MKVMerge (part of mkvtoolnix) you can choose to give default status to any items in the container, not sure if you have the same power with MP4Box when using the .mp4 container.
YAMB Beta
mkvtoolnix
mkvextractgui2
mp4box
You can try plugging the file directly into YAMB and it may do the demux/remux for you but I doubt it. MKVtoolnix is a lot smarter and up to date and it can do that kind of stuff for you if you were going from MP4 to MKV.
Dont forget when muxing raw streams you often need to tell the muxer the proper frame rate. -
Thanks for the reply Vicious. Actually, what I am trying to accomplish is to convert a mkv with subtitle to mp4 for iPod/Andriod devices using FFmpeg but ffmpeg doesn't seems to like mkv's subtitle format and refuse to convert if the tag "-s copy" was used. Programs like EncodeHD doesn't have problem converting mkv into mp4 with subtitle "burned" in (kind of like avi), and I am just wondering how it is able to accomplish this. Thanks again for the detailed reply!
FFMpeg and Subtitles
Discussion in 'Windows OS and Software' started by Pai, Jul 27, 2010.