mkv conversion question
-
- Joined: Fri Sep 08, 2006 4:44 pm
- Location: Texas
- Contact:
mkv conversion question
I have several mkv files that have sepreate audio and subtitles setting. So every time I tried to convert them to avi using COWON jetaudio I all ways get jap dubed with no subs. So two questions, 1. How can I convert the file with the sub activated and 2. How can I convert the file with a different audio setting (its changing the Desert Punk's audio setting from jap to eng).
“I had my suspicions you were no mere mortal, but I had no idea you were actually a cat... Wait a second, what the hell am I saying–where is that idiot?!?”
-Nicholas D. Wolfwood
-Nicholas D. Wolfwood
- Kionon
- I ♥ the 80's
- Joined: Fri Mar 02, 2001 10:13 pm
- Status: Ayukawa MODoka.
- Location: I wonder if you know how they live in Tokyo... DRIFT, DRIFT, DRIFT
- Contact:
-
- Joined: Fri Sep 08, 2006 4:44 pm
- Location: Texas
- Contact:
i know but the man reason i ask is cause i want to put them on my Zen W but it would be nice to be able to understand whats going on
“I had my suspicions you were no mere mortal, but I had no idea you were actually a cat... Wait a second, what the hell am I saying–where is that idiot?!?”
-Nicholas D. Wolfwood
-Nicholas D. Wolfwood
- Gepetto
- Mr. Poopy Pants
- Joined: Thu Jun 10, 2004 10:11 pm
- Status: Bored to tears
- Location: The Tokyo Settlement
- Contact:
You can't "convert them with the subtitles activated". You have to hardburn the subtitles (stick them to the image instead of storing them in a separate stream). I vaguely remember VobSub doing that in the old days of the Gordian Knot RipPack. Does anyone know if it'll still do?
And God spoke unto the Chicken, and He said: "Thou shalt crosseth the road", and the Chicken did cross the road, and there was much rejoicing.
My DeviantART profile
My DeviantART profile
- Phantasmagoriat
- Joined: Mon Feb 06, 2006 11:26 pm
- Status: ☁SteamPunked≈☂
- Contact:
The way I do it for my iPod is a bit lengthy, but it involves demuxing the video stream, audio stream, and subtitle stream with MKVextract, then recombining everything through an avisynth.avs script that looks like this:
[after extracting your required streams, type that into a .txt file, save, then change the extension from .txt to .avs]
[anything after a # is just instructional, and doesn't need to be typed]
feed that avisynth.avs script to "Videora" or "SUPER ©" and recompress to whatever format you need for your portable device.
it also helps if you get virtualdub(/mod), so you can preview your .avs file to make sure everything works.
you will need
-the cccp
-avisynth
-MKVtoolnix, MKVextract, (likely MKVextractGUI also)
-"SUPER ©" or "Videora"
if your video stream is not an .avi, and variable framerate, make your script look like this:
...anyways, it will always depend on what streams are within the MKV, so it will be a case-by-case basis... but that's generally how I do it...
Code: Select all
# first, set some parameters
LoadPlugin("C:\Program Files\Combined Community Codec Pack\Filters\VSFilter.dll")
video = avisource("Vampire_Hunter_D-Bloodlust_divx_Track1.avi")
audio = directshowsource("Vampire_Hunter_D-Bloodlust_AAC_Track3.mp4")
# combine them into a single clip
AudioDub(video, audio)
# add borders so the subtitles appear in a letterbox below a widescreen movie
addborders(0,20,0,100)
# hardsub the subtitles
textsub("Vampire_Hunter_D-Bloodlust_subs_Track4.srt")
[anything after a # is just instructional, and doesn't need to be typed]
feed that avisynth.avs script to "Videora" or "SUPER ©" and recompress to whatever format you need for your portable device.
it also helps if you get virtualdub(/mod), so you can preview your .avs file to make sure everything works.
you will need
-the cccp
-avisynth
-MKVtoolnix, MKVextract, (likely MKVextractGUI also)
-"SUPER ©" or "Videora"
if your video stream is not an .avi, and variable framerate, make your script look like this:
Code: Select all
LoadPlugin("C:\Program Files\Combined Community Codec Pack\Filters\VSFilter.dll")
video = directshowsource("Video_VFR_Track1.mp4", fps=119.88, convertfps=true)
audio = directshowsource("Audio_AAC_Track3.mp4")
AudioDub(video, audio)
Changefps(23.976)
textsub("Vampire_Hunter_D-Bloodlust_subs_Track4.srt")
PLAY FREEDOOM!! | Phan Picks! | THE424SHOW | YouTube | "Painkiller" | Vanilla MIDI's
"Effort to Understand; Effort to be Understood; to See through Different Eyes."
"Effort to Understand; Effort to be Understood; to See through Different Eyes."
- Gepetto
- Mr. Poopy Pants
- Joined: Thu Jun 10, 2004 10:11 pm
- Status: Bored to tears
- Location: The Tokyo Settlement
- Contact:
Oh right, VobSub changed names now. My bad.
And God spoke unto the Chicken, and He said: "Thou shalt crosseth the road", and the Chicken did cross the road, and there was much rejoicing.
My DeviantART profile
My DeviantART profile
- Qyot27
- Surreptitious fluffy bunny
- Joined: Fri Aug 30, 2002 12:08 pm
- Status: Creepin' between the bullfrogs
- Location: St. Pete, FL
- Contact:
There is never a need to convert the framerate that high. Just use 29.97 and be done with it. Most normal VFR encodes (that don't go up above 30fps, which I've never seen) keep below 29.97 or 30, so there's no reason to insert more than what 29.97 will take. And doing a ChangeFPS(23.976) isn't a good way of getting it back down to Film framerates either.Phantasmagoriat wrote:LoadPlugin("C:\Program Files\Combined Community Codec Pack\Filters\VSFilter.dll")
video = directshowsource("Video_VFR_Track1.mp4", fps=119.88, convertfps=true)
audio = directshowsource("Audio_AAC_Track3.mp4")
AudioDub(video, audio)
Changefps(23.976)
textsub("Vampire_Hunter_D-Bloodlust_subs_Track4.srt")
And just copy VSFilter.dll to C:\Program Files\AviSynth 2.5\plugins so it'll autoload.
As long as it's not VFR, just use FFmpegSource. Trims a lot of that fat off the script.
- Phantasmagoriat
- Joined: Mon Feb 06, 2006 11:26 pm
- Status: ☁SteamPunked≈☂
- Contact:
Yeah, I can't remember where I found out about that, I was just happy that it [seemed to] work; thought it had something to do with 119.88 being the LCD of 23.976 and 29.97, so it would make it easier for Changefps(23.976) to work. Using 29.97fps makes sense to me since all the frames would stay intact, however, the majority of a VFR file is usually run at the lower framerate, so adding extra frames to make it 29.97 seems like a waste of space to me [or would they even take up extra space? I thought that was the point of having variable framerates]
what would be an alternative to ChangeFPS(23.976)?
hehe, autoloading... I somehow forgot about that
I saw your other post on FFmpegSource, but haven't got around to experimenting.
So now I'm curious, I think I know what your saying, but could you outline the way you would hardsub an MKV that isn't [or is] VFR?
what would be an alternative to ChangeFPS(23.976)?
hehe, autoloading... I somehow forgot about that

I saw your other post on FFmpegSource, but haven't got around to experimenting.
So now I'm curious, I think I know what your saying, but could you outline the way you would hardsub an MKV that isn't [or is] VFR?
PLAY FREEDOOM!! | Phan Picks! | THE424SHOW | YouTube | "Painkiller" | Vanilla MIDI's
"Effort to Understand; Effort to be Understood; to See through Different Eyes."
"Effort to Understand; Effort to be Understood; to See through Different Eyes."
- Qyot27
- Surreptitious fluffy bunny
- Joined: Fri Aug 30, 2002 12:08 pm
- Status: Creepin' between the bullfrogs
- Location: St. Pete, FL
- Contact:
1) Demux the subtitle stream with MKVExtract.Phantasmagoriat wrote:So now I'm curious, I think I know what your saying, but could you outline the way you would hardsub an MKV that isn't [or is] VFR?
2a) For CFR:
Code: Select all
FFmpegSource("video.mkv",atrack=-1)
TextSub("script.ass") #or ssa or srt
Code: Select all
DirectShowSource("video.mkv",fps=29.97,convertfps=true)
TextSub("script.ass") #or ssa or srt
TDecimate(mode=1) #if 23.976 is necessary
Trim(0,4592) #replacing 4592 with the actual final frame
The thing about 119fps is that for AVI, which doesn't support VFR, people commonly use the LCR of 23.976 and 29.97 when joining segments together, and those extraneous frames don't have anything in them - in the actual file they can take up to 10 megs or so from reports I've read (when the video itself is standard TV episode length), which is small in comparison to the actual video data, but quite frankly, it's a hack.
The point is, the framerate in a true VFR file fluctuates, but I've never seen a VFR file that peaks way above 29.97 or 30 fps - only the general playback speeds that any other constant framerate file would have for those rates. Therefore, to avoid dropping frames from the segments that are 29.97 or at the very least, higher than 23.976, using fps=29.97, convertfps=true will maintain audio sync by adding frames only in those areas that need it, to bring the whole file truly up to 29.97, thus not dropping any frames, just adding duplicates. It is a relative 'waste' of space to do so (filesize doesn't radically inflate for 29.97 compared to 23.976, provided it's a good encode), but it's the only way to accurately convert the file to a standard framerate whilst preserving both audio sync and motion.
DirectShowSource can load the audio from the file without calling it separately, provided you have a decoder that works through DirectShow - the CCCP should have this ability via ffdshow's audio decoder, otherwise CoreAAC, CoreVorbis, etc. work fine. I doubt this was removed in the newest versions of DirectShowSource, but if it matters, I use an older version of it prior to the change which began requiring Graphedit loading to specify that audio=false even if the graph doesn't link to any audio (thus being audioless when detected anyway; having to specify audio=false is just redundant and would piss me off too much to have to do all the time).
-
- Joined: Fri Sep 08, 2006 4:44 pm
- Location: Texas
- Contact:

“I had my suspicions you were no mere mortal, but I had no idea you were actually a cat... Wait a second, what the hell am I saying–where is that idiot?!?”
-Nicholas D. Wolfwood
-Nicholas D. Wolfwood