PDA

View Full Version : Matroska vfr files


gizmotech
2nd September 2003, 12:59
Heyo,

I hear from rumors and unreliable sources that matroska has the native ability to contain variable frame rate video. I wanted to know if this is true at the moment, and how you would go about creating a variable frame rate file from a series of 30fps and 24fps avi's?

I know this can't be done in vdub(mod) due to vfw, so how is this accomplised. Graphedit? Some tool that I'm unaware of?

Now my other question, once I have created the variable frame rate .mkv file, will I be able to add streams to it in vdubmod, or will I never be able to edit the file again, until we have a video editor which doesn't use vfw?

GizmoTech.

Belgabor
2nd September 2003, 13:15
As far as I know there is currently no 'good' way to create one and its (currently) a one way street. What should work is craeting one of these 120 fps dropped frames mixture avis (Don't ask me how, I don't know) and transmux them to matrsoka with VDubMod. As VDubMod doenst write dropped frames to matrsoka this effectively should give you a vfr video. It might even be possible to reopen that, but you'd have to ask Cyrius (suiryc) to be sure.

Last to your first sentence: To my knowledge matroska itself has no concept of a framerate, only frames with a timecode. The framerate is only kept as a property to allow framerate based apps to edit it.

bond
2nd September 2003, 13:30
there is something coming up here (http://corecodec.org/projects/vfre/)...

spyder
2nd September 2003, 18:00
Originally posted by bond
there is something coming up here (http://corecodec.org/projects/vfre/)...

Gee, I wonder where that came from... ;)

gizmotech
2nd September 2003, 21:39
Hmm... I'm not sure I quite follow you w/ the dropped frame avi?

Is this a special form of avi, or just an avi containning duplicate frames? (And yes I realize you said don't ask, but It's a new concept I've never heard of)

And I've considered trying to make it a 120fps however that would make the encode largely unplayable on any machine less then a ghz.

Gizmo

gizmotech
2nd September 2003, 22:11
An interesting idea was just dicussed by some encoder friends of mine.

Would it be possible to create a tool for mkv which would take in a file (regardless of frame rate) would allow the user to specify frame rates based on frame ranges, and then reencode that avi into mkv?

The reason I ask is I'm thinking of the following situation:
a) I have hybrid 24/30fps material
b) I can apply decimation (via avs) on ranges to the source, resulting in frame count to time sync inacurate source.
c) If I could manually specify which ranges I had changed the frame rate on prior to encoding into mkv I could return the clip to proper frame rates and time counts, without combining multiple files.

I'm not sure if any of you guys had considered something like this, but this would provide the encoder the easiest way (that I can think of) to perform the encode and achienve file size desired.

Gizmo

gizmotech
2nd September 2003, 22:54
Actually I'm looking at this even more, and it actually seems this might be a good idea.

If I understand how this works, when the frame is encoded it is put in a cluster group, and more specifically in one block. Each block contains a time code, and if the default time code base is specified at the segment level, in theory you could just perform a basic encode from avi into mkv, then run a seperate utility with a series of values, which would go through the time codes for the file and change them from 24fps to 30fps.

I'm not quite sure of the mechanics of it all, but is this a possible solution?

GizmoTech

alexnoe
2nd September 2003, 23:10
AVI-Mux GUI can do it. At least it should...

haibane
3rd September 2003, 01:34
when I try to mux a 120FPS avi into matroska........
"mkvmerge -o 120.mkv 120.avi"
the mkvmerge ignores the drop frames, but it keeps the fps....
so during play back.......
the file is playbacked at 120FPS without the drop frames.....
the picture move much faster than the sound........
is there a way to remove the FPS information, so the playback only use the time stamp information.

@gizmotech
search google with 60fps....
you can find a lot information on how to do 120FPS encode......
only problem is that it's most written in japanese......

APF_Gandalf
3rd September 2003, 02:12
iirc, Xvid can write dropped frames, there value you can enter in the debug tab. but I don't really know if the drop ratio will give you a linear drop ou variable one.
then, you'll mux your Xvid un mkv using Vdubmod, but i believe you'll get the same problem than with the 120fps test.
maybe something to try.
the second way to use VFR for me will be simply by encoding separately opening/ending @30fps, the episode @24fps, mux them separately in mkv and then join them.
but I can't remember if there is yet a way to join 2 mkv files :rolleyes:

gizmotech
3rd September 2003, 02:37
I can merge avi files of dif frame rates w/ avi-mux-gui quite well, but unfortunately given the VERY large amount of 30fps content mixed within content which requires 24fps decimation performing mass file cuts becomes some what impractical :(

GizmoTech.

Belgabor
3rd September 2003, 13:00
Originally posted by gizmotech
Hmm... I'm not sure I quite follow you w/ the dropped frame avi?

Is this a special form of avi, or just an avi containning duplicate frames? (And yes I realize you said don't ask, but It's a new concept I've never heard of)

And I've considered trying to make it a 120fps however that would make the encode largely unplayable on any machine less then a ghz.

Gizmo
This is a practice thats been coming up mostly in anime raws afaik. You calculate the lowset common multiple of all involved frame rates and convert all parts using this framerate filling in dropped frames and then simply append them. This gives you a slight overhead, but no real added content => no major increase in filesize.