Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30

Thread: Combine MKV file with SRT file?

  1. #21
    Join Date
    Apr 2008
    Location
    USA
    Beans
    1,073
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Combine MKV file with SRT file?

    Results:

    Code:
    shadius@shadius-phantom:~$ ffmpeg -i JTHJ.mkv -i JTHJ.srt -map 0 -map 1 -acodec copy -vcodec copy -scodec copy JTHJ.mkv
    ffmpeg version 0.8.5-4:0.8.5-0ubuntu0.12.04.1, Copyright (c) 2000-2012 the Libav developers
      built on Jan 24 2013 18:01:36 with gcc 4.6.3
    *** THIS PROGRAM IS DEPRECATED ***
    This program is only provided for compatibility and will be removed in a future release. Please use avconv instead.
    [matroska,webm @ 0x64a9a0] Estimating duration from bitrate, this may be inaccurate
    Input #0, matroska,webm, from 'JTHJ.mkv':
      Duration: 02:56:01.50, start: 0.000000, bitrate: 320 kb/s
        Stream #0.0: Video: h264 (High), yuv420p, 1280x544 [PAR 40001:40000 DAR 2353:1000], PAR 1:1 DAR 40:17, 24 fps, 24 tbr, 1k tbn, 48 tbc (default)
        Stream #0.1(hin): Audio: ac3, 48000 Hz, 5.1, s16, 320 kb/s (default)
        Metadata:
          title           : rvarun7777
    [mp3 @ 0x64f900] Format detected only with low score of 1, misdetection possible!
    [mp3 @ 0x64f900] Estimating duration from bitrate, this may be inaccurate
    Input #1, mp3, from 'JTHJ.srt':
      Duration: 00:00:23.12, start: 0.000000, bitrate: 95 kb/s
        Stream #1.0: Audio: mp1, 44100 Hz, stereo, s16, 96 kb/s
    File 'JTHJ.mkv' already exists. Overwrite ? [y/N] y
    [matroska @ 0x6507e0] No wav codec ID found.
    Output #0, matroska, to 'JTHJ.mkv':
      Metadata:
        encoder         : Lavf53.21.1
        Stream #0.0: Video: libx264, yuv420p, 1280x544 [PAR 1:1 DAR 40:17], q=2-31, 1k tbn, 24 tbc (default)
        Stream #0.1: Audio: [0][0][0][0] / 0x0000, 44100 Hz, stereo, 96 kb/s
    Stream mapping:
      Stream #0.0 -> #0.0
      Stream #1.0 -> #0.1
    Could not write header for output file #0 (incorrect codec parameters ?)
    shadius@shadius-phantom:~$
    Question Everything

  2. #22
    Join Date
    Apr 2008
    Location
    USA
    Beans
    1,073
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Combine MKV file with SRT file?

    Also, when it prompts me whether to overwrite anything, am I supposed to say yes?
    Question Everything

  3. #23
    Join Date
    Mar 2007
    Location
    Portsmouth, UK
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Combine MKV file with SRT file?

    I'll leave the ffmpeg questions to evilsoup, as I have limited experience. As for the overwriting, generally no, but especially not when you're unsure what's being over-written.

    If you're simply replacing a failed encode with another attempt, it's fine - just keep an eye on what is being overwritten!

  4. #24
    Join Date
    Apr 2007
    Beans
    2,578
    Distro
    Ubuntu

    Re: Combine MKV file with SRT file?

    mkvmerge GUI can be installed through software center and may provide an easier way to combine a subtitle file into an MKV video, of you only need to do that occasionally.

    When combining a subtitle into the MKV, realize that many hardwareplayers will not support the embedded subtitle file. For this reason, it can be handy to keep the subtitles also around as a separate file. If you lost the external file, nothing is lost, though, as you can extract the embedded subtitle file at any time using mkvextract (there is no GUI for that command as fas as I am aware).

    About ffmpeg is "depreciated". You should nowadays use avconv instead, which (as far as i know) currently still uses the same syntax. Indeed, this is an alternative possibility to embed the subtitles.

  5. #25
    Join Date
    Apr 2008
    Location
    USA
    Beans
    1,073
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Combine MKV file with SRT file?

    Success! Many thanks to all of you! By using mkvmerge I was able to merge the subtitles file with the video file.

    Vanadium,

    By hardware players, you mean DVD players? Say I was to now make this combined video file with the subtitles into an ISO I can use to burn onto a DVD, it won't play on a DVD player?
    Question Everything

  6. #26
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    9,041
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Combine MKV file with SRT file?

    Quote Originally Posted by Shadius View Post
    By hardware players, you mean DVD players? Say I was to now make this combined video file with the subtitles into an ISO I can use to burn onto a DVD, it won't play on a DVD player?
    No. You need to use a DVD authoring program like DeVeDe. DVDs have very specific formats and limitations on the types of codecs supported. Your video is encoded with the H.264 codec, a much more recent invention than the MPEG4 encoding used on DVDs. DeVeDe should handle all the transcoding for you. You might want to start with the raw movie and SRT files, too, rather than trying to re-encode the file you just made.

    Regular DVD players also cannot handle soft subtitles like a Matroska file can. So the subtitles will need to be burned into the video image (so-called "hard" subtitles). DeVeDe handles that, too, as I recall.
    If you ask for help, please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  7. #27
    Join Date
    Apr 2012
    Beans
    150
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: Combine MKV file with SRT file?

    You can get the latest mkvtoolnix (mkvmerge + GUI) from here:
    http://www.bunkus.org/videotools/mkv...downloads.html
    (Section "Debian Packages").

  8. #28
    Join Date
    Apr 2007
    Beans
    2,578
    Distro
    Ubuntu

    Re: Combine MKV file with SRT file?

    Quote Originally Posted by Shadius View Post
    By hardware players, you mean DVD players? Say I was to now make this combined video file with the subtitles into an ISO I can use to burn onto a DVD, it won't play on a DVD player?
    I was referring to media players that support computer video files such as MKV files directly. Their MKV support tends to be basic: no support embedded subtitles, no chapter support, no support for the mkv audio delay tag.

  9. #29
    Join Date
    Mar 2007
    Location
    Portsmouth, UK
    Beans
    Hidden!
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Combine MKV file with SRT file?

    Most of the new stuff has pretty decent support, but it obviously doesn't come close to that of a decent software media centre.

  10. #30
    Join Date
    Jan 2009
    Location
    ::1
    Beans
    2,464

    Re: Combine MKV file with SRT file?

    Quote Originally Posted by evilsoup View Post
    Code:
    mkvmerge -o output.mkv input.mkv subtitle.srt
    Wow ... it only took 39 seconds to merge in the subtitles:

    Code:
    The file 'output.mkv' has been opened for writing.
    Progress: 100%
    The cue entries (the index) are being written...
    Muxing took 39 seconds.
    Thank you very much!

Page 3 of 3 FirstFirst 123

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •