Log in

View Full Version : [MKV] Working with xvid VFR [wich tools to use to reencode ?]


HappyUser
17th February 2005, 11:04
Hi. I'm new here, and I just begin with xvid/mkv vfr workout.

I get some high sized .mkv/VFR encoded using xvid 1.1.0 beta (450 megs for 15 mins...)

I wanted to reencode it, keeping the vfr/mkv settings, but I didn't found no software that could handle it. Either FAQ or other posts did not help me...

Or, is there a way that avisynth uses timecodes to properly reencode the video ??

I want to reduce its size, and use filters with it. It's anime related.

Dunno if you understood me, as it's not my native language.

Thanx for your help :)

If I missed something evident, gently send me a PM and close / delete this topic...

Manao
17th February 2005, 13:28
AVISynth isn't VFR, and neither is virtual deub, so if you use one of them, you'll have to drop the VFR.

You might try mencoder, since it has some filtering options.

iapir
17th February 2005, 15:29
Use the search feature of this forum. Or check this thread (http://forum.doom9.org/showthread.php?s=&threadid=64314&highlight=VFR)...

Manao
17th February 2005, 15:51
That thread only partially answer his question : his source isn't a mpeg file, but an mkv one, and there's no way he's gonna get the telecide work with a DirectShowSource("file.mkv").

So, indeed, avisynth could be use only if he succeeded in getting the timestamp out of the mkv, saving them in a file, and using them when merging back the whole, after filtering & encoding, in an mkv.

bond
17th February 2005, 21:25
maybe the following tool is interesting for you:
mkv2vfr from haali: http://haali.cs.msu.ru/mkv/

FalconX
19th February 2005, 08:44
Demuxxing the .mkv to get the video in a .avi for re-encoding is simple, i assume you know how to do that. The hard part is getting a vfr timecodes file so after you re-encode the video you can recreate a new mkv with the same timing.

I remember some people talking about such a tool (timecodes extractor) but I can't find anything on it right now.

tritical
19th February 2005, 10:05
I remember some people talking about such a tool (timecodes extractor) but I can't find anything on it right now. Isn't that what bond linked too?

Anyways, I tried mkv2vfr on a few vfr mkv files with parts at 29.970 and some at 23.976. However, instead of outputting a timecodes file with the ranges at the different framerates, it always outputs a timecodes file with only one range that covers the entire clip at what appears to be the average framerate. mp_rel on the otherhand outputs a timecodes file with the different ranges at the correct rates (or very close). Anyone else get this?

HeadlessCow
21st February 2005, 21:17
Yeah, using an MKV file that I have laying around, with mp_rel I get a timecodes


Assume 23.976
0,1319,23.9760
1320,4014,29.9701
4015,4098,23.9760
4099,5434,59.9399
5435,33227,23.9760
33228,35925,29.9701
35926,36644,23.9759


On the same clip, with mkv2vfr I get


Assume 23.976
0,36643,25.2727
36644,36644,24.0964


I didn't create the original, so I'm not certain that all the segments are correct, but I know for certain that there's a 60fps section in the clip which only mp_rel picks up on.

Sakuya
24th February 2005, 04:10
What are the timecodes for?

FalconX
24th February 2005, 19:35
The timecodes file tells the matroska muxer what framerate to use for ranges of frames. In most VFR files you have portions that are 23.976fps and others that are 29.97fps. Since you want to re-encode the video, you would extract the video from the mkv as an avi likely to use it with virtualdub or whatever tool. Then after you've re-encoded the video you would use matroska muxer with the video, audio, etc. you demuxxed from the original mkv to create a new mkv. Since the original was VFR to retain that, you also extract the timecodes using the utilities mentioned above, and then specify this timecodes file when making the new mkv.

Sakuya
24th February 2005, 20:17
Do I have to mux to make a new MKV since what I want is the AVI which I need to convert to MPEG-2 in TMPGEnc. :confused:

HappyUser
25th February 2005, 10:52
Originally posted by Sakuya
Do I have to mux to make a new MKV since what I want is the AVI which I need to convert to MPEG-2 in TMPGEnc. :confused:

Thanx for your responses, it helps me a lot.
But that's not a pleasure a pleasure to reencode, since I have subtitles that are timed by ..secondes, not frames/sec.

I extracted portions of the mkv file, each portion that are same fps (23.976, 25 29.9967, 59.9 etc), then I make an avs for each section that is after the minima (23.976 in my mkv) :

---
loadplugin(vsfilter)
avisource("Video[FPS].avi")
AssumeFPS(FPS)
ChangeFPS(23.976)
textsub(SubtitlePart.ssa)
---

Then I merge all parts in the mkv, but I lost all the advantage of MKV since I reencoded all parts @ same FPS....

I hope you understood me =)

darkavatar1470
27th February 2005, 07:50
use original FPS for each section,
SSA is time-based so it can be done at any FPS.
But if you're going to use mkv as your final format,
then why are you hard subbing it?

mkvmerge accepts AVIs with different FPS and SSA files.

HeadlessCow
28th February 2005, 01:20
Many machines can't render much more than staticly positioned subs in realtime. Karaoke, movement and other such effects need to be hard subbed to work.

HappyUser
28th February 2005, 13:17
Originally posted by HeadlessCow
Many machines can't render much more than staticly positioned subs in realtime. Karaoke, movement and other such effects need to be hard subbed to work.

That's precisely why, and timing is done on the sound time, not video time.

Hardsub also avoids subtitle stealing (Unless mkv implements subtitle crypting ^^, but software = crack enabled automagically =) ).

I didn't found any software that can properly (ie natively) handle gnu formats, so I use mkv just to say "I use it, don't fuck with me" ><

darkavatar1470
1st March 2005, 03:51
Originally posted by HeadlessCow
Many machines can't render much more than staticly positioned subs in realtime. Karaoke, movement and other such effects need to be hard subbed to work.
you're right, I missed that...
Originally posted by HappyUser
Hardsub also avoids subtitle stealing (Unless mkv implements subtitle crypting ^^, but software = crack enabled automagically =) ).

I didn't found any software that can properly (ie natively) handle gnu formats, so I use mkv just to say "I use it, don't fuck with me" >

ya, I worry about that sometimes...
it would be even better if they can't rip the Video/Audio tracks...
don't quite get what you mean on the last sentence..

HappyUser
1st March 2005, 13:20
Originally posted by darkavatar1470
you're right, I missed that...

ya, I worry about that sometimes...
it would be even better if they can't rip the Video/Audio tracks...
don't quite get what you mean on the last sentence..

What I mean is that I didn't found any software like premiere or final cut (big softwares, but virtual dub is not excluded from that list :) ) who can handle natively ogm, mkv or mp4 new containers (those under public licensing).

I eard that cormmercials formats/containers are closed ones (allright I agree with that), but I think public containers / video formats are way much more closed, because when the public community makes such software (for editing "new" containers / formats), formats / containers are a little obsolete.


Sorry but I'm very bad in english (gomen gomen gomen).

iapir
2nd March 2005, 10:44
Well, give time to the free alternatives. AVI and MPEG have been around for so long ! And they are very easy compared to all the possibilities given by new containers. And since coders are lazy...