Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
19th January 2004, 19:23 | #1 | Link |
h4x0r5 0n teh yu0r pC?
Join Date: Nov 2003
Posts: 156
|
MkvSource (?)
Hi guys. I was wondering if it was possible to import directly video files in the container matroska to avisynth.
Is a plugin of that kind too hard to make? It would be very useful for the ppl that use matroska. Yes, i know that DirectShowSource works. But even so, it persists in giving errors and strange crashes with the apps using avisynth. If it wouldn't be asking too much, we'd like a plugin (or even a built-in function, in next ver of avisynth), just to import mkv files for editing. Best Regards |
20th January 2004, 14:43 | #2 | Link |
Registered User
Join Date: Feb 2002
Posts: 407
|
it's not existing yet (afaik), and you would have some problems with matroska VFR files.... Avisynth is based on VFW, so only mkv file created in vfw-compatibility mode will be processed.
imho, as the name says, Avisynth has been created to process avi file, and only that. if your mkv can be processed in avisynth then just transcode it, else, you have to create a "mkvsynth" anyway. |
20th January 2004, 15:13 | #3 | Link |
Registered User
Join Date: Mar 2003
Location: The Corridor of Despair
Posts: 84
|
I agress, a mkvsource() would be very useful for editing .mkv files without using directshow, which in my experience can often create a whole host of seeking and sync problems (although these have been worked on recently afaik)
Although there is the possibilty that .mkv can contain variable frame rate i still have yet to come across one that does, and im sure it could be detected and a warning thrown up "Frame timing imformation has been discarded due to vfw restrictions" of similar. It'd also need switches to select which streams etc to call from the .mkv file but im sure they wouldn't be too hard to implement for some of the talented coders here (Mosu, Sh0dan et al). As for AVIsynth being only for avi, it can already handle several other formats, not least MPEG 1/2 and RealVideo via plugins, theres even been interest in a quicktime source plugin. Plus from what i know both Matroska and AVIsynth developeers use this forum as a base for alot of their discussions so surely this filter would only be appropriate? |
20th January 2004, 17:08 | #4 | Link |
Brain Dead
Join Date: Nov 2003
Posts: 87
|
mkvSynth for VFR the only real way of doing it would be a) undo the VFR or b) add timebased editing to the scripting engine or c) associate timecodes with each frame.
b & c are good options (and basicly the same), probably would be good to have both of them. Having time based would let you cut video half way through a frames time. Having not taken the time to read and understand the AviSynth core but i think it would require a major rewrite. Maybe this would be good to beg the Devs, into adding to AviSynth 3. for MKVSource looks like the only way is to undo VFR by adding frames. Here is a list of funtions that would be good to have in a MKVSource plugin. MKVSource(filename, audiotrack, videotrack, forcedframerate) MKVVFR(clip) MKVInfo(filename) if forcedframerate is not set i think it should auto-detect what this is by reading the timecodes. Also MKVInfo should return the auto-detected framerate along with available streams in the mkv.
__________________
I'll sell my soul for a cabbit. |
20th January 2004, 18:14 | #5 | Link | |
Avisynth 3.0 Developer
Join Date: Jan 2002
Location: France
Posts: 639
|
Quote:
So b) is refused, but c) is still possible. As for functions i'd see: MKVSource(filename, videotrack = 0, audiotrack = 0) no forcedframerate, it just uses the average (users can AssumeFPS after if they want) MKVUndoVFR(filename, videotrack = 0, audiotrack = 0, threshold) scan for an acceptable common framerate and add dupes to fill in the gaps the threshold param controls how close the predicted timecode must be from the real one to be an acceptable match MKVEmuleVFR(filename, videotrack = 0, audiotrack = 0) same as MKVSource, but mark frames with a timecode properties, so filters who want to consider them could. MKVInfo... |
|
20th January 2004, 19:38 | #6 | Link |
Retired AviSynth Dev ;)
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
|
Beside the VFR-problem, it has been discovered that there is no way to do sample-accurate seeking in MKV. This will make it behave very much like DSS is now, so there isn't much to be gained from an MKVsource.
If anything, I consider MKV as a "final" format - not an intermediate one. Don't use it for files you'd like to edit.
__________________
Regards, sh0dan // VoxPod |
22nd January 2004, 07:03 | #7 | Link |
Senior Hater
Join Date: Aug 2002
Location: japan
Posts: 118
|
all these posts, all these good(?) suggestions, but you are all forgetting the easiest one:
.oO ( don't use mkv ) it's that simple, considering how this format was created mainly to "stick the man" and "provide a high-quality media format for BEOS" (i'm not shitting you, thats written right on their homepage). writing directshow filters is on the very bottom of their "todo list". |
22nd January 2004, 09:40 | #8 | Link |
Retired AviSynth Dev ;)
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
|
timecop: Get your facts straight, before you put out flamebait.
This is your LAST warning - if you try to start flamewars once more, you WILL get strikes! Stick to the topic!
__________________
Regards, sh0dan // VoxPod |
22nd January 2004, 12:10 | #9 | Link | ||
Registered User
Join Date: Feb 2002
Posts: 407
|
Quote:
Quote:
|
||
22nd January 2004, 12:33 | #10 | Link |
Retired AviSynth Dev ;)
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
|
The main problem is, that it isn't reliable. Due to the flexibility of the format it cannot guarantee sampleaccurate seeking, and constant framerate.
In the end, using the DirectShow interface is the best way. I doubt a dedicated mkvsource would ever be better than DSS. So my (personal) conclusion is that it would be time wasted, and result much more code to maintain. But anyone is free to make a plugin, and I'd be happy to include in the standard package.
__________________
Regards, sh0dan // VoxPod |
22nd January 2004, 12:39 | #11 | Link |
·
Join Date: Jan 2002
Posts: 1,729
|
Pah. Just write the average framerate of the file to the FPS value, and tag frames with an additional "mkfps" tag in the same way as Decomb hints, describing the framerate of every particular frame. Most filters will ignore it, but special MKV-enabled ones could use the fps hints to their advantage. Problem solved! You could also write a filter that passes the fps tags over to VirtualDubMod through a custom interface (COM?) right before the script return.
|
29th January 2004, 16:56 | #13 | Link |
Captain CommonSense!
Join Date: Jan 2003
Posts: 183
|
@mf.
I've dicussed a similar idea with vdm author concerning modification of exiting vfr files via vdm alone, and he has no way to attach a time code into the muxing of the file from vdm. So it's irrelevent if avisynth can do it, vdm cannot. Gizmo. |
29th January 2004, 19:26 | #14 | Link | |
·
Join Date: Jan 2002
Posts: 1,729
|
Quote:
|
|
|
|