You are not logged in.
Pages: 1
I have several .avi files with respective .srt subtitle files. I understand that the .mkv container is able to hold the video as well as subtitles. Is there any programme out there which can combine a .avi video file and a .srt subtitle file into one .mkv video+subtitle file?
Last edited by tony5429 (2008-05-23 12:01:00)
Offline
Install mkvtoolnix (in Extra) and use the mkvmerge command. It should be as simple as 'mkvmerge -o out.mkv in.avi in.srt'.
Offline
The GUI is in the package too. Start mmg
Offline
What could I use if I want to render the subtitles directly on the video track?
Offline
sorry for the intrusion, but what app to do an avi from an mkv file?
Dell XPS 1530: Core 2 Duo T7500@2,2ghz, 2gb, HD 200gb@7200rpm, 8600GT 256mb, Monitor 15,4"@1680x1050, WiFi N, Bluetooth, D-Link DNS-323 with 2x WD CAVIAR SE 500 GB, D-Link DSL-2740B
Offline
Why would you want to do that? mkv is a superior format, damned divx players
you can use ffmpeg
First you have to extract the audio and video tracks from the mkv container and then remux them with ffmpeg
mkvextract tracks FILE.mkv 1:temp_video 2:temp_audio
ffmpeg -i temp_video -i temp_video -vcodec copy FILE.avi
Remember that the name of the tracks might change, so you should check it with mkvmerge -i FILE.mkv before.
Remember that avi isn't fit to store the h264 codec.
Offline
Why would you want to do that? mkv is a superior format, damned divx players
you can use ffmpeg
First you have to extract the audio and video tracks from the mkv container and then remux them with ffmpegmkvextract tracks FILE.mkv 1:temp_video 2:temp_audio ffmpeg -i temp_video -i temp_video -vcodec copy FILE.avi
Remember that the name of the tracks might change, so you should check it with mkvmerge -i FILE.mkv before.
Remember that avi isn't fit to store the h264 codec.
you say it! damned divx player!
btw, thanks! i'll try!
Dell XPS 1530: Core 2 Duo T7500@2,2ghz, 2gb, HD 200gb@7200rpm, 8600GT 256mb, Monitor 15,4"@1680x1050, WiFi N, Bluetooth, D-Link DNS-323 with 2x WD CAVIAR SE 500 GB, D-Link DSL-2740B
Offline
What could I use if I want to render the subtitles directly on the video track?
mencoder does that but only supports srt subtitles, and mplayer developers plan to scratch it and write better code which will share more mplayer code. There are some patches to support ass subtitles I believe.
avidemux supports ass subtitles rendering
Offline
I just done this but it doesn't quite work with them all and is very much work in progress. I just have it as a bash function but would work as a script.
mkvmerge -i "$1" | grep Track
echo "Which Track for Subtitles"
read track
mkvextract tracks "$1" "$track":temp_subs
out="nosub"
mencoder "$1" -oac copy -ovc copy -o $out
echo "New Title for $1"
read title
transcode -i "$out" -x mplayer="-sub temp_subs" -o $title.avi -y xvid
It's the transcode line that does the magic.
Thanks go to this thread much was inspired by this thread.
Last edited by FeatherMonkey (2008-05-14 23:55:54)
Offline
Hrm... For some reason mkvmerge is working alright (I'm using mmg) except... when I open any mkv files made with the software and try to fast forward on VLC, VLC can't seem to do it - the video freezes up... Any ideas anyone? Is it a VLC issue or mkvtoolnix bug?
Offline
Hrm... For some reason mkvmerge is working alright (I'm using mmg) except... when I open any mkv files made with the software and try to fast forward on VLC, VLC can't seem to do it - the video freezes up... Any ideas anyone? Is it a VLC issue or mkvtoolnix bug?
I've seen VLC (using git version ATM) crash every single time when using << or >> on a .mkv file. However, I have no idea about the tool that had been used to create this .mkv (yes I have only one). FTR, the same file works OK with mplayer.
Offline
I have several .avi files with respective .srt subtitle files. I understand that the .mkv container is able to hold the video as well as subtitles. Is there any programme out there which can combine a .avi video file and a .srt subtitle file into one .mkv video+subtitle file?
FFmpeg can do it provided that the version is new enough. I don't know if the one in the repos is:
ffmpeg -map 0:0 -map 1:0 -i <your_video> -i <your_subtitle> -vcodec copy -acodec copy -scodec copy <your_output>.mkv
Also, GPAC (available in AUR) may also be a usable solution. It's far easier than other command line options once you get to know it, but it's also far more limited in it's abilities.
Last edited by skottish (2008-05-17 07:05:53)
Offline
Well, since the last update of VLC, it seems that VLC is correctly playing the mkv files I've created with mkvtoolnix (fast forwarding is working fine) with one exception: namely, my subtitles are not showing up. I happen to have an mkv file which I did not create with mkvtoolnix (I do not know what program it was created with) and the subtitles on it work fine in VLC. VLC also seems to display subtitles on ISO DVD images with no problem. Has anyone else had this problem? I have also never been able to play an AVI file in VLC with subtitles from an SRT file by drag-and-dropping the subtitle file onto the player as I have been able to using the Windows build of VLC.
Last edited by tony5429 (2008-05-23 11:54:48)
Offline
Actually, I will start a new post as this seems to be a VLC issue and change this discussion's title to [solved].
Offline
tony5429 wrote:I have several .avi files with respective .srt subtitle files. I understand that the .mkv container is able to hold the video as well as subtitles. Is there any programme out there which can combine a .avi video file and a .srt subtitle file into one .mkv video+subtitle file?
FFmpeg can do it provided that the version is new enough. I don't know if the one in the repos is:
ffmpeg -map 0:0 -map 1:0 -i <your_video> -i <your_subtitle> -vcodec copy -acodec copy -scodec copy <your_output>.mkv
Also, GPAC (available in AUR) may also be a usable solution. It's far easier than other command line options once you get to know it, but it's also far more limited in it's abilities.
When i try to do this with a .srt subtitle ffmpeg outputs:
[avi @ 0xb7f776f4]non-interleaved AVI
Input #0, avi, from 'Ghost_in_the_Shell.avi':
Duration: 01:22:49.75, start: 0.000000, bitrate: 2145 kb/s
Stream #0.0: Video: h264, yuv420p, 1920x1040 [PAR 13312:13311 DAR 8192:4437], 23.98 tb(r)
Stream #0.1: Audio: mp3, 48000 Hz, stereo, 128 kb/s
Ghost_in_the_Shell.srt: Unknown format
and i found that, (if i do it with mkvmerge) if the subtitle has non english letters, say ñ or á,é,í,ó,ú the subtitle doesn't display correctly when played from the mkv
Last edited by leo2501 (2008-08-30 14:59:55)
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery
Offline
Pages: 1