VirtualDub procedures

Frameserving from VirtualDub

First you need to enable the frameserver. Run the auxsetup.exe file in your VirtualDub directory and select Install handler. From now on encoding programs should be able to read .dvr project files created by VirtualDub. 

Then load your video file (Control - o), apply any filters you might need, and set video to direct stream copy when you don't use any filters - otherwise it has to be on full processing mode. If your AVI has no included soundtrack, load one as WAV file (Audio - WAV audio), apply any audio compression and conversion as desired. 

>> Read more about
AUDIO OPTIONS

Then start the frame server with File - start frame server.. You'll be asked to provide a filename for the frameserved file. Then try to load the file in your encoding program. If it fails, try to rename the .dvr file to .avi. Under some circumstances the frameserver of the latest VirtualDub will not work. In that case execute the proxyon.reg file in the aviproxy subdirectory of VirtualDub. If that doesn't help try to switch back to VirtualDub 1.3c. 

>> BACK

Audio options

Video OptionsAudio Options



Open your video. Then select your audio file and of course, we're going to compress it - would be an awful waste of space if we didn't, so make sure to select an audio compression and set audio to full processing move. Since the video is already compressed, we're just going to copy it, so select direct stream copy for video. 
If you used FlaskMpeg and have enabled audio processing then you'll have to select AVI audio rather than WAV audio. 

Select your audio file and of course, we're going to compress it, since we don't want to waste more than a Gigabyte for audio.

Convert audio to 44.1khz if you want to use the DivX Audio codec or if your soundcard is not 48khz capable.



Select your audio codec here - don't go higher than the selected value in DivX Audio. Alternatively select MPEG Layer-3 just make sure that you have the right sampling rate. 



Then launch the process by pressing F7. After 10minutes to 2 hours you'll get a (hopefully synch) movie.

>> Read more about
ASYNCH


>>  BACK

Manual Synching

When you're experiencing asynch movies here's what you can do. You may want to take a look at the alternative method, which should be a bit easier but needs additional programs. 

Step 1: Selecting the range

First of all select Video - Frame Range. The following window will appear

Here you can select the length of your movie. So for instance if you need to find the correct Source displacement (read below) you can select the length to a couple 1000 frames instead of encoding the whole movie and then find out that your settings were wrong. Also make sure you select a fast audio compression codec (DivX audio or uncompressed PCM since mp3 will take too long for testing)

 

 

 

Step 2: Source displacement

Let's talk a bit about Interleaving: Press CTRL-I to see this dialog. If the video was asynch from the very beginning (otherwise go directly to step 3)you need to find the correct Source displacement. If the video is before avi (say you see James Bond move his lips but you hear "My name is Bond, James Bond" later) that means that you have to move the audio to the "left" - or apply a negative Source displacement. If the audio is before video you need a positive value. This is a real trial and error operation - I can't give you any specific hints. Just one thing: Sometime setting Interleave audio every 500ms instead of every frame helps. If you think you found the right value go to step 3. 

Before I forget: It's possible that adding source displacement already gets rid of your synch problems. In that case there's no need to follow these instructions any further.



Step3: Changing the framerate

Press CTRL - R to display Framerate options. 

In Video frame rate control you can change the speed of your video (audio speed is unchanged). Since your movie is gradually getting asynch (you followed step 1 and 2 I hope) we need to speed up/down the video so that it matches the audio speed. If the video is faster than the audio (a scene is happening on screen before you hear the corresponding sound) you have to decrease the framerate by manually setting a lower framerate (or increase the framerate if the audio is faster than video). Now this is a dangerous operation and I suggest you change the framerate only in very small steps (like 0.002 or so fps). Once again using a fast audio codec is greatly helping since mp3 compression takes a long time. If you can't get the movie synch changing the framerate you're screwed. But till now I've always been able to synch a movie using only source displacement and I don't believe there's any unsynchable movies.

Of course after that you need to save your avi again. Make sure you have both video and audio set to Direct Stream Copy. 

Alternative way - this program can be got in the download section.

FrameRateChanger imageSelect your avi by clicking on the folder icon. Then enter the desired framerate in the uppermost text field, or select a framerate from the dropdown list. Then press apply.


Alternative Method

This method was suggested by JD_80 in the FlaskMpeg group in Delphi.

First of all you need to get this little program, and a wave editor. Many times such an editor is already included in the software that came with your soundcard, if not I suggest you get CoolEdit or a similar software. Since there's lots of different tools to do this operation I can't supply any pictures on wave editors since it would only help a small percentage of you.

Then you will need to find to spots in the video where you can 'see' audio. Using VirtualDub find points such as doors shutting, scene changes that don't fade, or any other sudden audio changes. One spot should be as close to the beginning as possible and the other should be as close to the end as possible. Note the times in the video of these spots. We'll call these V1 and V2.

Use buttons 1 to go forward/backward frame by frame in VirtualDub, and buttons 2 to move around by keyframes. You can see the exact position in the movie in the left corner at the bottom. The numbers in brackets represent the current position in the movie, for instance 0:02:21.236 means 0 hours, 2 minutes, 21 seconds and 236 milliseconds. Make sure that you got the positions right, the more exact they are, the more exact will the synch be in the end.

Now start up a wave editor, load the wav file and find the corresponding spots. These will be called A1 and A2. Also note the total audio length, called Ae. Finally go back to VirtualDub and seek to the end of the video. Note the time here, let's call it Ve (for end).

ALL OF THESE NUMBERS SHOULD BE CONVERTED TO SECONDS!
ex. 15042.847

Once you have all these numbers, start up a command prompt, launch Synch.exe and enter the values you've calculated above separated by a space. Add as much silence to your wav as the tool tells you or cut the audio when told to do so. Use your wave editor to get this done.

Finally, after the audio is saved, follow the instructions for VirtualDub with one exception: After everything has been set up, press Control-R and select "Change so video and audio durations match".

Even though this may sound complicated, once you do it once it is really easy and always perfect synch (unless you make imprecise measurements on the audio or video).

>> BACK

Splitting AVIs

If you prefer to operate with sliders go here.. 

Load your movie VirtualDub. Select Video, then Select Range: 

Range Selection DialogThere's no way to make sure how large the resulting file will get so you basically have to guess. If your whole movie is 1300MB cut at about half of the total length (divide the length by 2, then enter that value in the Length field... I prefer to operate by frames but you can of course use Time if you prefer). You can select a length by offset (an start offset of 1000 would mean the video would start at frame 1000, an end offset of 2000 means that your video will end at frame 2000) or by length in number of frames/milliseconds. The latter is obviously easier to use, but it will only work for the first part. So select Start offset 0, Length as desired, then press ok and save the movie. Verify that the size is what you wanted, if not go back and select another length. For the 2nd part of your movie, copy the End offset that's currently being indicated in the corresponding text field to the start offset text field, set a length again (if you're splitting to 3 or more parts) or set End offset 0 (meaning the file will include everything from Start offset till the end. Make also sure that you split by a keyframe, not just any frame - otherwise you might lose some frames and it'll be impossible the remerge the files if needed.

Attention: Make sure that you've set both Video and Audio to Direct Stream Copy. Generally when you start VirtualDub audio is already set to Direct Stream Copy but Video is not. If you don't change this it takes hours and it'll decompress and recompress the whole movie - not a smart thing to do.

The following slider can be used to go from one position to another quickly. The buttons marked (1) can be used to go forward/backward frame by frame, the buttons marked (2) can be used to go forward/backward by keyframe. 

VirtualDub controlbar

Alternatively you can use the navigation controls to select the range directly. During these operations it's important that whenever you move the slider you press down the Shift button on your keyboard which will make sure that your positions are at a keyframe. Move the slider to the desired starting position, then press the Home button on your keyboard. Then move the slider to the desired end position and press the End button on your keyboard. Then save the movie (F7). Now press Home again which will make the current position the start position and move your slider again (while pressing down Shift, of course). Repeat the process until you have splitted the AVI into however parts you may want. 

>> BACK

Joining two DivX files

I must admit that I got the initial idea about this from Nick Page's guide over at the DivX Digest. But since he "stole" the low-mo high-mo combo from me I think that should be okay.

So let's assume that you have 2 DivX files, called movie1.avi and movie2.avi. Load the first one in VirtualDub. Then set both Video and Audio to Direct Stream Copy (Video - Direct Stream Copy, Audio - Direct Stream Copy). After that press Video - Select Range:

Now enter a small value in the End offset field - in the Frames section. Then save the file under another name, say movie1-2.avi. Then load the avi you've just created in VirtualDub. Then append the second file to the first one:
Then save the avi and play it. Hopefully everything plays fine.

Now we're going to make an even more dangerous stunt: Let's assume that you've done a movie in DivX but at some point you had to abort or whatever. Then later on you started again but at the position you quit. Of course you have to chose a position before the position where you ended the first run, otherwise you'll miss a part of the movie. Check the FlaskMpeg guide on how to set a starting position other than the first frame in FlaskMpeg. So let's assume that you've done all necessary preparations and you're ready to go. You have two avi files, one called movie1.avi and one movie2.avi.

Load avi1.avi into VirtualDub. Start a second copy of VirtualDub and load movie2.avi into it. Now you have to find out a suitable position where the transition will take place. I've found out that if you append the 2nd file starting with a keyframe you're all set. So what you have to do now is to watch the end of movie1.avi closely. Use VirtualDub's control buttons to advance frame by frame (1) or keyframe by keyframe (2).

Now here's the tricky part: Go to movie2.avi, look at the very first keyframe and try to find the exact same frame in movie1.avi. Or if it's too hard to find try to find the position of the 2nd, 3rd or whatever keyframe of movie2.avi in movie1.avi. I've found that people who use subs have a real advantage here... When you're sure that you've found the right position select Video - Select Range in movie1.avi, enter 0 as start offset and the position of the frame you've been looking for in the last 30 minutes <g> in the Length field (once again I'm talking Frames here, not Time). Then save the avi under a different name, say movie1-2.avi . Then, provided you've not selected the first keyframe in movie2.avi, save the 2nd avi, but before saving set Range to process as follows: Start offset: the selected Keyframe and End offset 0. After that load movie1-2.avi into VirtualDub, then select File - Append video segment as shown in the picture above and append the modified version of movie2.avi or movie2.avi if you haven't changed it. That should get you a perfect avi, not a single frame dropped and completely synch and all - provided the avis were synch of course... 

If it doesn't play fine or if one of the parts to join didn't play fine already here's what you can do, maybe it'll help you. 

>> BACK

Redo Keyframe settings

Open the Avi File in VirtualDub, but check the Popup extended open options at the bottom of the window.

Then check the Re-derive keyframe flags as shown on the left. I don't really know if this works, I've been told it would but since I never had any problems I never had to use this option.

 

 

 

 

>> BACK



Delaying an audio track

Delay audio track by XY ms is what you're looking for...

 

 

 

 

>> BACK



IVTC

Load your AVI or avs. Press Control-R

Enable Inverse telecine and select Reconstruct from fields - adaptive. You can also try the other options but most the adaptive algorithm is the most likely to succeed. 

 

 

>> BACK

 

Resizing & SVCD subs

Load the VFAPI AVI or .avs. Then press Control-F, configure the subtitle filter, and add the resize filter.

>> Read more about
CONFIGURE SUBTITLE FILTER
VFAPI



Then configure the resize filter.

In case of an .avs file you can simply resize to the desired resolution. In case of a VFAPI AVI output of DVD2AVI we'll have to do the correct letterboxing. Here's the values you have to enter in the with and height section for specific aspect ratios:

NTSC: 480x364, check expand frame and letterbox and set it's size to 480x480.

PAL: 480x432, check expand frame and letterbox and set it's size to 480x576.

Note that these values are only for 16:9 movies (anamorphic widescreen), in case of 4:3 movies you simply resize to the right height and you won't have to worry about letterboxing.

 

You may also want to load your WAV track into VirtualDub (Audio - WAV audio) but set audio to direct stream copy (default value) for better speed. Video has to be set to full processing mode. Then start the Frameserver and load the .dvr file into your encoder.

>> Read more about
FRAMESERVING

>> BACK

Сайт создан в системе uCoz