View Full Version : Considerations for high-quality editing
fvisagie
11th August 2009, 17:10
Hi All,
I'm working on a 3-hour DV AVI. It was produced by Movie Maker and contains unattractive audio glitches at many scene changes, which I hope to remove with AVS.
I hope to avoid making more time-costly mistakes with some pointers from you on source filter quality and seeking accuracy.
The footage is fairly high quality, which I'd like to preserve as much as possible. Previously I've used the DirectShowSource filter for subbing with Aegisub and also for encoding with older versions of ffmpeg. So far it's performed well. However, I can convert between DV Types 1 and 2 if needed, meaning OpenDMLSource and AVIFileSource are available as alternatives.
Which of these 3 filters produces the best decoding and processing (trimming only) of DV AVI? Any caveats and/or special colour space conversions required for the source filter you recommend?
Looking at the actual editing, at most 1 or maybe 2 frames need to be clipped out at each affected scene change. If the wrong frame gets dumped, matters would just get worse. Also, because of the number of scene changes I hope to use a GUI during scripting. Assuming that the same source filter is used then, it will have to maintain frame accuracy during a lot of back and forth (and of course during frame serving too). Which of these filters provides the most frame-accurate seeking, and are there any caveats involved here?
Many thanks in advance,
Francois
JohannesL
11th August 2009, 19:07
DirectShowSource is not frame accurate and should be avoided whenever possible.
Gavino
11th August 2009, 19:18
For DV, I use AviSource with the (free) Cedocida codec.
The codec can be configured to deliver whatever colorspace you choose.
fvisagie
12th August 2009, 10:28
For DV, I use AviSource with the (free) Cedocida codec.
The codec can be configured to deliver whatever colorspace you choose.
Thanks.
If I understand correctly, Cedocida is a VfW codec and under the bonnet AviSource invokes either the VfW AVIFile handler or OpenDML. So I can understand the AVIFile handler working with the Cedocida codec.
However, my AVI clip is 36GB, meaning the OpenDML handler will need to be used (either implicitly or explicitly). I'm not too clear on the relationship between handlers and codecs - will OpenDML be able to make use of the installed VfW DV codec too?
Coincidentally, just yesterday I myself got VirtualDub set up to work with Cedocida and I'm quite impressed. According to VirtualDub it only supports colour depths of 24 and 32, though. As I understand it the native PAL DV colour space is YV12, which would then necessitate some conversion/calculation, even when copying straight from the decoder to the encoder? Which would then be a slight pity.
Gavino
12th August 2009, 12:38
Yes, the OpenDML file handler will still use the installed VfW codec.
Re VirtualDub, in Direct Stream Copy mode there is no conversion involved, the compressed DV stream (or the selected part of it) is simply copied to the output file as is.
Ghitulescu
12th August 2009, 13:27
Maybe I got it wrong, but why do you need to reencode the video if the audio has glitches?
Solution 1: redo, if possible, the whole project with a better video editor, there is plenty of bundled software with any new PC or piece of equipment (my FireWire came with Ulead VideoStudio + DVD plugin, for instance) or free versions coming with various PC/video magazines, free LE/SE versions and so on.
Solution 2: if the audio was not compressed by MovieMaker (I don't know how it works) then save/demux the WAV alone in Vdub[mod], load it in any decent audio editor (audacity) and fix by hand that glitches (hope there are not so many), and finally remux the whole thing together again. If the audio was compressed, then you have to use "Full processing" (it might be the case that a particular editor knows that audio compression you don't need full processing just a normal save/demux).
PS: are you sure that the glitches are due to bad editing and not present in the original footage (the audio on consumer DV gear is unlocked!!!)
fvisagie
12th August 2009, 13:32
@Gavino: Thanks, you've been very helpful, in other threads too.
@JohannesL: From the number of times that statement's been made, it certainly must have been true at some point :-). Is it something that is still being repeated merely because everyone else says so, or do you know for a fact that it's still the case?
Just to structure my future work - if that statement still holds, do MS applications like Windows Movie Maker use the DirectShow interface, and therefore by definition provide inferior frame-level editing? (I realise it isn't the best editor around, but for me everything else pales in comparison to frame accuracy)
fvisagie
12th August 2009, 14:19
Solution 1: redo, if possible, the whole project with a better video editor, there is plenty of bundled software with any new PC or piece of equipment (my FireWire came with Ulead VideoStudio + DVD plugin, for instance) or free versions coming with various PC/video magazines, free LE/SE versions and so on.
I did consider that, very briefly! But there are 1563 scene cuts, numerous photos and pictures, text pages, transitions, etc. and the finished project is almost 3 hours long. And then all the subtitle processing after that: dialogue subtitles that need to be retimed, DATECODE subtitles... this project took months and re-editing it would break my spirit! So I'd rather just make an attempt at touching up the rendered DV AVI.
Solution 2: if the audio was not compressed by MovieMaker (I don't know how it works) then save/demux the WAV alone in Vdub[mod], load it in any decent audio editor (audacity) and fix by hand that glitches (hope there are not so many), and finally remux the whole thing together again. If the audio was compressed, then you have to use "Full processing" (it might be the case that a particular editor knows that audio compression you don't need full processing just a normal save/demux).
The audio is still straight PCM. That idea also crossed my mind and I haven't completely discarded it yet. What counts against it at this point: many of the audio glitches are in the form of silence for just that frame (very noticable and annoying click) so to avoid desyncing I'd have to fudge some audio duplication; many scene transitions also have video glitches - although they are less noticable, trimming scene transitions would clean up those too. I'll think about your suggestion a bit though, perhaps I can use something like audacity to fade out a few frames preceding the silent one and then fade in again afterwards. Although looking at this it still seems more straightforward to just cut out the damaged frames, video and all.
PS: are you sure that the glitches are due to bad editing and not present in the original footage (the audio on consumer DV gear is unlocked!!!)
Yes, I'm sure. The original footage is contained in DV AVI files downloaded from my DV camera and sounds perfect. The whole issue is caused by Movie Maker allowing itself to use non-frame-aligned values when seeking, creating cuts, durations etc. When you cut or trim a 25fps clip it might come out at 12.73s for example, and there's not much you can do about it. So when the encoder tries to pack this into 0.04s frames, things get strange. Of course I only discovered this after performing enough edits to make 1563 clips ;-).
Ghitulescu
12th August 2009, 14:40
Yes, I'm sure. The original footage is contained in DV AVI files downloaded from my DV camera and sounds perfect. The whole issue is caused by Movie Maker allowing itself to use non-frame-aligned values when seeking, creating cuts, durations etc. When you cut or trim a 25fps clip it might come out at 12.73s for example, and there's not much you can do about it. So when the encoder tries to pack this into 0.04s frames, things get strange. Of course I only discovered this after performing enough edits to make 1563 clips ;-).
I was unclear: I was talking about the beginning of each clip. Unlocked audio means that the audio does not flow at the same cadence as the video but it is actually allowed to be fluctuate around a fixed position.
For PAL, 625/50 video, locked audio provides exactly the same number of samples per video frame with either 32 or 48kHz audio, but for NTSC, 525/59.94 video, the 48kHz "audio frame" is 5 video frames: locked audio will provide exactly the same number of audio samples for every five video frames, though not every frame within that 5-frame sequence has an equal number of audio samples. 32kHz locked "audio frames" cover a whopping 15 video frames!.
The total amount of sync slippage allowed in unlocked audio is +/- 1/3 frame
So it may happen that you'll have a glitch (pause in audio) if you simply join 2 clips, or if the software is so dumb that it cannot take this into account. It's like recreating a CD with no pauses (like The Wall of Pink Floyd or many albums of JMJarre) from separate MP3 - you'll hear the glitches.
fvisagie
12th August 2009, 15:07
Clearly I should not have overlooked the fact that I was unfamiliar with the term "unlocked", and thanks for explaining.
It would be hard for me to tell whether Movie Maker takes (un)locked audio into account or not, so this may or not be an additional cause for the glitches I hear.
What is certain though, is that the strange alignments I mentioned are contributing to scene change glitches. It's visible in the video too.
The bottom line seems to be, however Movie Maker exactly caused these glitches despite careful editing work, they are there. And I certainly don't see myself either re-editing this project in a new editor, or doing another project in this editor ;-).
In my previous post I neglected to thank you for so carefully considering additional possibilities. Thank you :-).
mavinashbabu
12th August 2009, 16:15
DirectShowSource is not frame accurate and should be avoided whenever possible.
Sorry for asking in this thread, but you guys can suggest an alternate for DirectShowSource() to open .MKV/.MP4 files. I am on Avisynth 2.5.8
Thanks in Advance.
Avinash
JohannesL
12th August 2009, 16:27
ffvideosource
Ghitulescu
13th August 2009, 09:01
What is certain though, is that the strange alignments I mentioned are contributing to scene change glitches. It's visible in the video too.
There is one more issue I overlooked: you said you had video glitches - that means probably that the very first frame of each clip was not ok, which make me wonder why you didn't cut it out during scene editing. The very first frames of a clip are usually broken (it can happen also to its bigger brothers DVCAM and DVCpro), due to synch issues (firewire transfer) or tape issues (normally a normal camcorder should pay attention where the last record stops, a record spreads over 10 or 12 tracks, if it doesn't, then parts of the last frame of the previous record might be overwritten by the new frame - this mix-frame belongs to both records now and may cause problems). That's the recomandation of letting the camcorder run for at least 1 second before and after a scene (even more if you plan transitions).
fvisagie
13th August 2009, 09:19
There is one more issue I overlooked: you said you had video glitches - that means probably that the very first frame of each clip was not ok, which make me wonder why you didn't cut it out during scene editing. The very first frames of a clip are usually broken (it can happen also to its bigger brothers DVCAM and DVCpro), due to synch issues (firewire transfer) or tape issues (normally a normal camcorder should pay attention where the last record stops, a record spreads over 10 or 12 tracks, if it doesn't, then parts of the last frame of the previous record might be overwritten by the new frame - this mix-frame belongs to both records now and may cause problems).
The symptoms I'm getting are very much similar to what you describe, although the cause(s) is/are different. The clip boundaries downloaded from the video camera are beautifully clean. Fortunately I don't struggle with that too.
Rarely do those clips end up in the finished project unaltered, though. In most cases the final clips are created or modified through editing, which is where Movie Maker weaves its dark magic. In addition to other things, often it then corrupts the last frame or two of the preceding clip's video, especially if you start a text overlay exactly at the start of the new clip. Without the text overlay starting at this position, this doesn't happen.
You mention cutting out glitches. Bear in mind that these are introduced by Movie Maker, and are usually not apparent until the project is rendered and played in an external player. Of course one could now list all glitches in the output file and go back to Movie Maker to do some trimming again around their locations. Two problems with this. 1) results still aren't assured (because of the inaccuracies which introduced the glitches in the first place, and 2) fudging in Movie Maker like this often seems to make matters worse - Movie Maker seems to store editing changes cumulatively, with the project file growing and growing and output results getting more and more unpredictable. Even Save As doesn't seem to create a clean consolidated project file.
That's the recomandation of letting the camcorder run for at least 1 second before and after a scene (even more if you plan transitions).
I've discovered that's good practice for other reasons too :-). E.g. leaving enough time to display dialog subtitle text, which becomes difficult with fast speech close to the clip's end.
Thanks for another thoughtful observation.
Ghitulescu
13th August 2009, 09:32
Why don't you upload a sample of that?
I strongly recommend to redo the project again in another editor. Consider the time spent with MSMM as a learning curve.
fvisagie
13th August 2009, 09:40
How would I do that? Bear in mind that I haven't yet found a way to do ftp PASV through the company firewall if that would be required.
In terms of quality of results I agree with your suggestion. Taking into account other priorities and considering other options, touching up with VirtualDub and Cedocida seems to be the way forward for this current project. I did a quick test on a short clip last night and it's just so straight-forward. Of course ;-).
Yes, I have resigned myself to the fact that Movie Maker was an investment into learning what not to use and what to look out for ;-).
Gavino
13th August 2009, 10:16
You mention cutting out glitches. Bear in mind that these are introduced by Movie Maker, and are usually not apparent until the project is rendered and played in an external player.
That's why I much prefer to use Avisynth/AvsP for editing. Instant viewing of results and what you see is exactly what you get. No 'project files' either, the script itself is your project file, so you know exactly what you've done and can change any part of it.
The benefit of using a frameserver is you don't even have to render the output to a file until needed (possibly never). The script itself can just be used for playing (unless you have used slow filters).
smok3
13th August 2009, 10:21
dunno about windows movie maker, but any half-decent editor should allow you to export only audio tracks, the ortodox method that always work (say you have 3 stereo tracks):
1. mute 3456, export stereo pair 1
2. mute 1256, export stereo pair 2
3. mute 1234, export stereo pair 3
now fire up audacitiy, or any other multitrack audio editor and clean the thingy, then just paste that new mix back to your video footage (vdub should do losslessly)
Ghitulescu
13th August 2009, 10:22
Glad to hear you solved the problem :)
fvisagie
13th August 2009, 12:15
now fire up audacitiy, or any other multitrack audio editor and clean the thingy, then just paste that new mix back to your video footage (vdub should do losslessly)
I did consider that (if I understand you correctly), but in this case that wouldn't come without complications of its own. See the post above (http://forum.doom9.org/showthread.php?p=1313894#post1313894). So all things considered, in this case just cutting out the affected frames seems to be the cleanest solution. Literally and figuratively ;-).
fvisagie
13th August 2009, 12:18
That's why I much prefer to use Avisynth/AvsP for editing.
I've posted some questions about AVS editing methodology (http://forum.doom9.org/showthread.php?p=1314322#post1314322), if you'd like to kindly make some contribution :-). Thanks.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.