Batch convert MKV to MP4 with subtitles

Discussion in 'Mac Pro' started by gslrider, Jun 20, 2017.

  1. gslrider macrumors 6502

    gslrider

    Joined:
    Nov 4, 2005
    #1
    I know Handbrake can convert MKV files with subtitles to MP4/M4V. You select the MKV file, go to subtitles, and choose the english version. Pretty simple. But how would I do this with multiple MKV files, without having to keep an eye when one is done, so that I can load the next file. I can't seem to figure out a way to batch convert multiple MKV files while retaining the subtitles for each file. If not Handbrake, is there any other way for me to accomplish this? Pretty tedious with having to do it one at a time in Handbrake. Thanks
     
  2. orph macrumors 6502a

    Joined:
    Dec 12, 2005
    Location:
    UK
    #2
  3. wlossw, Jun 20, 2017
    Last edited: Jun 20, 2017

    wlossw macrumors 6502a

    wlossw

    Joined:
    May 9, 2012
    Location:
    Montreal, Quebec, Canada
    #3
    have you tried subler?
    https://subler.org

    subler is also way faster because it just changes the container around the h264 video rather than transcoding like handbrake...
     
  4. orph macrumors 6502a

    Joined:
    Dec 12, 2005
    Location:
    UK
    #4
    @wlossw ops i missed that, yes if you dont need to re-encode the video and just want to change the container then an app that lets you pass thro the video etc and just change the container is worth a look.
    I think FFmpeg can also do this https://ffmpeg.org/download.html
    lots of hits on google
    looks like for ffmpeg you want something like '-vcodec copy -acodec copy'
     
  5. vasuvasu macrumors newbie

    Joined:
    Aug 8, 2011
    #5
    What you really want to do is copy the h264 video and aac/ac3/dts audio out of a mkv container, into a mp4 container. This is mostly a file duplication operation (apart from audio encoding if needed), and will be MUCH faster than re-encoding the video track.

    http://www.emmgunn.com/mp4tools-home/

    You can batch convert, and it'll copy subs over.
     
  6. h9826790 macrumors 604

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #6
    Yeah, I am also thinking why re-encode everything again, but not simply re-mux (e.g. via Subler) them into MP4. That's few hundred times faster.
     
  7. orph macrumors 6502a

    Joined:
    Dec 12, 2005
    Location:
    UK
    #7
    used to love QuickTime for being able to cut and mess with videos without re encoding in the old days :).
    shame on apple for letting QuickTime just be reduced to more of a video player without an alternative to take up the slack.
     
  8. h9826790 macrumors 604

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #8
    You can still do that with quick time now, as long as the video is playable in quick time.
     
  9. orph macrumors 6502a

    Joined:
    Dec 12, 2005
    Location:
    UK
    #9
    oo ill have to check then, been using quicktime 7 still for most things
     
  10. gslrider thread starter macrumors 6502

    gslrider

    Joined:
    Nov 4, 2005
    #10
    Figured it out. In Handbrake, hit Open Source, and choose the entire folder (not individual files). It will load all the files in that folder. The next steps have to be done manually. Once all the files are loaded, select each one (one at a time) from the source drop down bar. Go to subtitles, and choose the correct subtitle you want to embed. Once that is done, hit Add To Queue. Then follow the same procedure with all the other files. Once you've done that, hit the Queue button, and double check that the subtitles have been accepted (hit the arrow key beside each file and scroll down the bottom of the list. Subtitles should indicate the subtitle you chose. Once you've confirmed, hit the Start button. Go have a coffee, cook, clean, watch tv, and wait. At least you don't have to keep going back for each file.
     
  11. rajsharma714 macrumors newbie

    Joined:
    Jul 25, 2017
    #11
    Hi,

    I have a MKV video, is there a way for me to tell if I can just change the container to MP4, or if I need to transcode the video to MP4?

    Thanks in advance!
     
  12. McScooby macrumors 6502

    Joined:
    Oct 15, 2005
    Location:
    The Paps of Glenn Close, Scotland.
    #12
    Check out Smart Converter (or Pro if you're happy with the results for batch processing) on the MAS, 9/10 times it just works, bought it years ago after tirelessly fighting with handbrake etc, never looked back!:)
     
  13. h9826790 macrumors 604

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #13
    An apps called Mediainfo can tell you what exactly inside the container. Anyway, most MKV files are just H.264 coding inside, 99% can be remux into MP4 in a minute.
     
  14. gslrider thread starter macrumors 6502

    gslrider

    Joined:
    Nov 4, 2005
    #14
    You need to transcode. I use iFFMpeg for all my transcoding. The only container I know you can change to mp4 is m4v. Changing the extension has worked fine for me.
     
  15. rajsharma714 macrumors newbie

    Joined:
    Jul 25, 2017
    #15
    This is the opposite of what @h9826790 has stated. But either way, what's the difference between using iFFMpeg vs Handbrake? Handbrake is free, where as iFFMpeg looks like is a paid software.
     
  16. h9826790, Jul 26, 2017
    Last edited: Jul 26, 2017

    h9826790 macrumors 604

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #17
    ffmpeg is not iFFMpeg, the "i" make a big difference.

    In fact, iFFMpeg is just a software charge the user to provide GUI (basic functions) for FFMpeg. For complicated stuff, still need to enter command in iFFMpeg to finish the job. And I don't think iFFMpeg has GUI for remux.

    Edit: I am sorry for my over react, may be you just want to introduce FFMpeg to him, but not misread iFFMpeg as FFMpeg. Sorry about that.

    And NO, no need to transcode or encode. You can indeed remux it via a free software called Subler (GUI).

    Or FFMpeg (the free one), in terminal with command

    ffmpeg -i source.mkv -c copy destination.mp4

    Do not transcode the video just for changing container unless really required, remux is hundred times faster, and no lost.
    --- Post Merged, Jul 26, 2017 ---
    Change container is NOT rename.

    Yes you can rename M4V into MP4 and still work properly. But you can also change container for a video (e.g. from MKV to MP4) and the video still valid for players. This process called remux, it's a bit more complicated than rename. But no encoding involve, so hundred times faster than transcode.
    --- Post Merged, Jul 26, 2017 ---
    I just made a video to shows how to perform this remux with FFMpeg in command line.

    As you can see in the video, it's super fast. Even the original video is only 13s long, normal transcoding still require few seconds to process. And remux actually finish within half second. And in the video, it actually shows the speed is 365x. That's more than 20000 FPS, way faster than normal transcoding.

    After remux, the new video is in MP4 format, and it's playable with the exact same content as the original video, same bitrate, same resolution, same codec, etc.

     
  17. h9826790 macrumors 604

    h9826790

    Joined:
    Apr 3, 2014
    Location:
    Hong Kong
    #18
    Here is another video to demo how fast remux compare to normal transcode.

    I pick a relative small MP4 video (~400MB, 1hr 21min long) and remux it into MKV this time.

    The speed is > 30000 FPS, finish to "reformat" into MKV in just few seconds.

     
  18. gslrider thread starter macrumors 6502

    gslrider

    Joined:
    Nov 4, 2005
    #19
    I find iFFMpeg much easier to use, especially if your doing a batch. It also works for video to audio.

    But Handbrake works well too (minus video to audio). If you don't want to spend the money, Handbrake will work.
     

Share This Page