1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to edit subs in a MKV file?

Discussion in 'Subtitle help' started by flowerpop, Aug 10, 2008.

  1. flowerpop

    flowerpop Member

    Joined:
    Aug 10, 2008
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    11
    i am wondering how i can easily edit the subtitles in a MKV file (as in edit the text and make the words different). im gonna guess i am gonna have to seperate the subs, video and audio, then edit the subs then recombine them? i am not sure where to start and i am new to this. any help will be appreciated.
     
  2. flowerpop

    flowerpop Member

    Joined:
    Aug 10, 2008
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    11
    actually NM. i figured out how to do it on my own.
     
  3. KajNrig

    KajNrig Regular member

    Joined:
    Oct 28, 2005
    Messages:
    1,457
    Likes Received:
    0
    Trophy Points:
    46
    I've forgotten a bit regarding subtitle editing, but I hope I can help a bit.

    Download MKVExtract and MKVtoolnix. (MKVExtract is an executable that must be placed in the same folder as the MKVtoolnix program folder.)

    These two programs are what you'll use to demux and mux the mkv file. (Demux and mux being "split" and "combine.")

    MKVToolnix: http://www.afterdawn.com/software/video_software/video_tools/mkvtoolnix.cfm

    MKVExtractGUI: http://www.afterdawn.com/software/video_software/video_tools/mkvextractgui.cfm

    You'll also need to download some sort of subtitle editing software. You can just use Notepad if you're working with SRT subtitles and are fine with timing things by hand.

    ...but I figured you're probably not, so there are two programs I know of that work well with subtitles. The first is Subtitle Workshop, and it's the one I've used most recently. I haven't done much with it, though, so I can't vouch for its integrity. The other is Subtitle Processor, and while it seems to be the better program, I haven't used this one much, either, aside from converting subtitle formats.

    Either way, they should both suit your needs just fine.

    Subtitle Workshop: http://www.afterdawn.com/software/video_software/subtitle_tools/subtitle_workshop.cfm

    Subtitle Processor: http://www.afterdawn.com/software/video_software/subtitle_tools/subtitle_processor.cfm

    This is the process I take:

    1.) After installing everything (and putting MKVExtract in the right folder), open up MKVExtract.

    2.) Choose your input file and output folder, and check everything. (There are some files like Chapters and ID Attachments in some mkvs I've seen, but I dunno what they do. Still, better to be safe than sorry.)

    3.) Demux the mkv file.

    4.) Use Subtitle Workshop/Processor to open up your subtitle stream.

    5.) Edit the subtitle as you please, and save it. You can also change its filetype, if you so choose.

    6.) Open up MKVMerge (from MKVtoolnix).

    7.) Input all the demuxed files and mux them into one mkv file again.

    8.) You should now have a new mkv file that is identical to the old one in all ways except the subtitles.

    Hope that helps. If you've got any questions, feel free to ask. I'm not great at explaining these things.
     
  4. flowerpop

    flowerpop Member

    Joined:
    Aug 10, 2008
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    11
    im having some trouble. sometimes when i extract the subtitles, i only get some of it. like, the SRT file doesnt have all the text it should in it when i open it with wordpad. also, sometimes the video will skip ahead 10 minutes and anything before it seems to be corrupted...

    the orginal files play fine though and dont have any issues. i cant see why im having trouble...
     
  5. flowerpop

    flowerpop Member

    Joined:
    Aug 10, 2008
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    11
    ok, i got it to work right by ripping the video and audio seprate then muxing the video + audio with my edited subs back in and it plays fine. but, the subs are out of sync. the only thing i can think of is that i had to change the frames per sec cause MKVmerge couldnt convey the original fps over cuz it was a H264 file. is there anyway i can perhaps join the video and audio together without touching the fps? perhaps some other method? and then have the SRT file seprate and ill just use mpc to load it.

    but i am still having trouble with one MKV file, i cant extract the whole video + subs + audio for some reason (i get like small 12kb files or so...)... only is that one file but i dont get it cuz it plays fine wholey left untouched.
     
  6. KajNrig

    KajNrig Regular member

    Joined:
    Oct 28, 2005
    Messages:
    1,457
    Likes Received:
    0
    Trophy Points:
    46
    If you don't change the video at all, then it will (or should) still be at the same frame rate - I'm guessing it's 23.976?

    Anyway, when you're editing the subtitles, which program are you using? I know that Subtitle Workshop automatically sets the frame rate at 29.997. So if you're using that, you have to manually set it to 23.976 (or whatever your frame rate is).

    As for your earlier problem (the srt not being full), are you waiting for the entire mkv to finish demuxing? That might be part of the problem.
     
  7. flowerpop

    flowerpop Member

    Joined:
    Aug 10, 2008
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    11
    yes, the videos is at 23.976

    ok, i tried demuxing the video, audio and subs and then putting it in a MP4 container. i put both the video and subs at 23.976. the subs are out of sync. it just seems to be by a half-sec/sec, but it still is noticable and delayed. i usually use notepad to edit the SRT, but i did try workshop in my above method and it doesnt work.

    now, that delay problem only happens if i demux the video and audio and then add in subs by making them an MP4. if i do what i usually do, as in just demux the subs, edit them then mux them back in replacing the old subs (still keeping the MKV container), i dont get that issue. BUT this one mkv file gets corrupted video for some reason if i do my usual method. /shrug

    also, i am waiting for mkvextract to demux the sub, i notice that it goes to 5% and pauses then gos right to finish. i thought maybe its just that file, i guess. but the whole file plays perfectly fine, subs and all. so i dont see how it could be corrupted. unless its some technical thing i dont get.

    out of all the mkv vids i tried already, i just got the 1 that gets corrupted video and 1 that wont demux all the SRT file. so, is it possible for those files to be corrupted in a way that they will play fine but get messed up when editing them?

    all iv been trying to do is: demux subtitle file (SRT), edit it then mux it in with the video and 1 of the language tracks (i uncheck the other 2 language tracks since i do not need them, along with the old sub track) all while keeping the MKV container. out of the 4 MKV files i did so far, i got success with 2 of them, the other 2 give me the problems above.

    and i appreciate the help.
     
  8. KajNrig

    KajNrig Regular member

    Joined:
    Oct 28, 2005
    Messages:
    1,457
    Likes Received:
    0
    Trophy Points:
    46
    The only time I've seen this happen is if the mkv is just a partial file. It happened to me once when I partly muxed an mkv and mistakenly demuxed the subs from the partial mkv. It could be that your mkv is not a full mkv.

    I'm not sure about that, but it's a guess.

    So let me just make sure: you have two problems, correct?

    1. One mkv apparently doesn't have all of its subtitles.

    2. Another mkv has corrupted video.

    It seems more and more likely that they're incomplete files to me. But someone else with some actual experience should be trying to help you out, not me. Sorry I can't do more.

    For 1., are all the subs showing up in the video?

    For 2., what's the video format? (avi, mp4, h264, etc.) I'm not sure how that'll help, but it might.
     
  9. flowerpop

    flowerpop Member

    Joined:
    Aug 10, 2008
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    11
    both MKVs are full cuz they do play all the way through fine, including the subs. the other one only gets corrupted video when i demux the subs out, then mux edited ones back in. its fine otherwise.

    yes, both original MKV files play fine. and the video format on them is H264.

    and i thank you for helping again.
     
  10. KajNrig

    KajNrig Regular member

    Joined:
    Oct 28, 2005
    Messages:
    1,457
    Likes Received:
    0
    Trophy Points:
    46
    I just had to make sure, because sometimes a file can play everything perfectly but still be incomplete.

    But besides that, then I'm at a loss. Again, someone else with more experience should be helping you out. Sorry I couldn't do more.
     
  11. flowerpop

    flowerpop Member

    Joined:
    Aug 10, 2008
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    11
    thats ok, i appreciate you helping me.

    thanks!
     

Share This Page