The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    FFMpeg and Subtitles

    Discussion in 'Windows OS and Software' started by Pai, Jul 27, 2010.

  1. Pai

    Pai Notebook Evangelist

    Reputations:
    464
    Messages:
    657
    Likes Received:
    0
    Trophy Points:
    30
    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!
     
  2. ViciousXUSMC

    ViciousXUSMC Master Viking NBR Reviewer

    Reputations:
    11,461
    Messages:
    16,824
    Likes Received:
    76
    Trophy Points:
    466
    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.
     
  3. Pai

    Pai Notebook Evangelist

    Reputations:
    464
    Messages:
    657
    Likes Received:
    0
    Trophy Points:
    30
    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!