View Full Version : non-destructive edits in Avisynth?
a1s2d3f4
26th December 2011, 20:11
Working with MOV files taken from my Casio EXZR100 camera, which encodes using .h264.
Is there a way to load them using AviSynth script in such a way that I could then save the new movie without re-compressing if my edits are benign like Trim()?
In other words, I'd like to be able to do what VirtualDub can do, whereby, if it has access to an encoder that matches the one used by the camera, by using "Smart Rendering" it knows to not recompress the parts that were not touched by any "destructive" filter when I Save the AVI.
Thanks.
a1
StainlessS
26th December 2011, 20:57
Avisynth works only with de-compressed Video/Audio, so the answer is no.
There is a quicktime source plugin for VirtualDub which imports MOV files,
perhaps that will work.
EDIT: -
This is the name of the zip on my system, (cant say I've actually used it)
"Quicktime_VD_v0.2.0.0_bin.zip", may not be the latest one.
EDIT: take a look here:-
http://forums.virtualdub.org/index.php?act=ST&f=7&t=19488&
See the FCCHandler link, was updated on 17 Dec 2011.
a1s2d3f4
27th December 2011, 00:59
Yes, VirtualDub would do it, which is how I have been doing it so far (I do have the FCChandler's plugin).
I was wondering about combining the power of AviSynth scripting with the ability to not lose video quality during file export phase.
Maybe if it was somehow possible to "serve" compressed frames (as they are in the file), except for cases where they are "processed" using whatever filters, to virtualdub, from which it would repackage the whole thing as a single movie file. E.g., I might combine multiple h.264 files (MOVs) together into one, and then save as a single AVI file where the original h.264 compression is preserved unchanged.
I have done this using VirtualDub.
But I really prefer to use AViSynth scripts, where I might combine the MOVs with a dissolve filter (so one flows into another, and I am not sure I can do that easily with VDub, although some threads suggest it's possible: http://forum.videohelp.com/threads/304067-VirtualDub-Fade-between-clips-effect )
Keiyakusha
27th December 2011, 03:14
You want to eat sardines without opening the can. Absolutely not possible.
Combining 2 mov's into one avi without reencoding is possible though. But this is a different story. mov and avi are just containers so taking stuff from one and putting into another without any changes to the video itself is possible. However there can be various complications. Not to mention that avi should retire already.
a1s2d3f4
27th December 2011, 08:07
Well, ok, fair enough.
But you do get my point about "wouldn't it be cool if frameserving unchanged frames as they are, without fully uncompressing like AviSynth is doing, was possible.
Also, there is nothing as powerful as VirtualDub that can save as, say, .mkv. So, I don't see how AVI can retire until such tool comes about.
Keiyakusha
27th December 2011, 08:39
Yes I do but you see, you usually applying filters to the whole video or very big parts of it. So every frame will be changed. In case where you need to fix some specific part of the stream without reencoding the whole thing, it is easier just cut it yourself, fix it and replace old segment. Also, while this is not the biggest issue here, frames are coded in groups so if you change one, you have to reencode some frames before and after it. How much - depends on the situation. May be around 60. So the more we think about this selective encoding, the less we see benefits.
mkv is just a container. If some software can't save its output in mkv directly, there is nothing bad in this, it doesn't needs too (including virtual dub), probably noone needs. For creating mkv we have great mkvtoolnix. Actually for advanced users is possible to create mkv in virtual dub, you just need to mess with external encoders thingy.
a1s2d3f4
27th December 2011, 11:11
Yes, I agree on all the points. I was planning on shooting many many single MOV files and then writing a script that would generate a VD or AviSynth text script that simply puts them all together into a one long half hour sequence (or more), adding a nice cross-fade transition between them, and maybe a quick title here and there once in a while, but the bulk of the frames would actually be untouched - thus my idea of trying to not reencode them. i.e. I might have 7-10 second clips with 1sec transitions, leaving 6-9 seconds of untouched footage (except when I add a bit of text). Anyway, yes, all a long shot, but I don't see why not. I mean, look, JPEG images are "compressed", but, there is a rule to how it's done, and there are editors that allow you to edit those, and then export the data unchanged except for the blocks where the edits were made (like you could add some text in one of the quadrants and that quadrant's data would change, but everything else remain the same).
Groups of pictures...well, yes, I don't know how often this Casio puts in a keyframe. If it was every second, all this is feasible, if every 5, less so.
(Basically, I hate recompression artifacts).
Gavino
27th December 2011, 12:42
In a vaguely similar thread some time ago, I wrote this:
Avisynth is a frame server, and as such is designed to deliver uncompressed frames to its client application. Moreover, because a filter graph defined by a script can be arbitrarily complex, the 'back end' does not even know which frames of the final output are original frames or where they came from. Modifying the design to track the provenance of frames would probably involve major surgery.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.