When encoding in Virtualdub, do you ever have to worry about the frame rate of the source file or does Virtualdub always guess the right frame rate?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 29 of 29
Thread
-
-
Usually, your source file contains header information about the frame rate.
Cheers -
WMV-files do not. I've checked with MediaInfo. When disguising it as an .avi using a fake .avs script, Virtualdub automatically encodes these specific WMV-files I want to encode as 25 fps files.
Also, I've never specified the FPS for the files I encode in Virtualdub. I just want to know if Virtualdub always automatically set the correct frame rate for me. -
It's not so likely that your files really don't have FPS information, how else should a player know how to handle them?
If this avisynth script passes the information in the right way I can't confirm (it should), but if in doubt you could also use a Virtualdub version that directly reads WMV:
https://www.videohelp.com/tools/Virtualdub_1.4c-ASF
Cheers -
Originally Posted by FallenAngelII
WMV does specify FPS. Get a copy of "Windows Media ASF View 9 series", a utility that shows the guts and "chunks" of a WMV, just like a RIFF viewer does with AVI.
Scott -
Could people just answer the question I posed: Does Virtualdub always automatically get the FPS rate right?
-
codecpage kind of answered you.
Virtualdub takes its cue from the headers of the AVI. So it's dependent upon the "truth" of what's listed in the headers. It can't guess beyond that.
Now, there are a couple of places in the headers where, if you derive from one place, it might not match what's listed in another. With this possible conflict, I don't know which one Virtualdub chooses as its default. However, there are ways to get it to "assume" it's a particular setting.
Short answer: probably
What are you trying to do? Or are you having problems with a file?
Scott -
Virtualdub states that it does not support WMV (even if you can get a WMV file to open with an avs script) and Virtualdub-MPEG2, although it supports WMV, warns that the audio and video may not be in sync if the files are VFR which a lot of WMV files are.
Your best bet for WMV is TMPGEnc.
Also, I've never specified the FPS for the files I encode in Virtualdub. I just want to know if Virtualdub always automatically set the correct frame rate for me.
To learn more about Virtualdub, visit the Virtualdub forum where you can get answers directly from the creator...
http://forums.virtualdub.org/ -
I've converted many WMV files to AVI via AVISynth and VirtualDubMod or VirtualDub. You may need to add an AssumeFPS() to the script, or add the frame rate and convertfps=true to the DirectShowSource() line:
DirectShowSource("file.wmv", fps=23.976, convertfps=true)
This will handle variable frame rate WMV files. You need to specify the correct nominal frame rate, of course.
If you are frameserving from AVISynth to Virtualdub, VirtualDub has no idea whether the source is WMV, AVI, RMVB or whatever. It simply receives a stream of frames and believes whatever AVISynth tells it about the properties of the video. It's up to the AVISynth script to get the properties right. -
Hi, jagabo
Could you explain please how to write this assumeFPS?
I have a wmv clip that after converting to xvid avi has its audio out of sync.
I tried this script (and many other things) DirectShowSource("clip.wmv",convertfps=true,fps=29 .890,audio=true), but the result is always out of sync.
I wrote 29.890 because is the fps virtualdub says it has.
I wish I could get a sync avi with this assume fps script! -
Originally Posted by Talayero
This is telling AVISynth to forget what it thinks the frame rate is and use 29.97 instead.
Originally Posted by Talayero
I suggest you try 29.97 since that is a common frame rate. Or calculate how far out of sync the audio and video are at the end, then adjust the frame rate based on that calculation. So if the video is 3600 seconds long but the audio ends 30 seconds before the video, the frame rate should be: 29.89 * 3600 / 3570 = 30.14.
When encoding, WMV drops frames and tells the player to continue displaying the last frame when the action gets too intense for the bitrate. So during high action sequences the frame rate is often cut in half. Media Players seem to handle this correctly but AVISynth and VirtualDub don't. The convertfps instruction in DirectShowSource() tells AVISynth to compensate for the variable frame rate.
You can also try using VirtualDubMPEG2 -- it can read WMV files directly. -
Originally Posted by jagabo
May be: DirectShowSource("clip.wmv",convertfps=true,assume fps=29.890,audio=true)?
instead of: DirectShowSource("clip.wmv",convertfps=true,fps=29 .890,audio=true), that is the one that gives me an out of sync avi. -
DirectShowSource doesn't have a named argument, "AssumeFPS". If you want to use AssumeFPS, you'll have to stick it in the body of the script like so:
DirectShowSource("clip.wmv",convertfps=true,fps=29 .890,audio=true)
AssumeFPS(29.97)
You could have figured that out yourself:
http://avisynth.org/DirectShowSource -
Is your audio off by a contant amount for the entire video, or does it start out ok and get more and more out of sync as time progresses?
If the former use VirtualDub's audio skew ability (audio -> interleave...) to shift the audio forward or back.
If the latter, do as I said and calculate how much you need to adjust the frame rate and reencode with the adjusted frame rate. Or just set fps=29.97 because that's probably what it really is.
DirectShowSource("clip.wmv",convertfps=true,fps=29 .97)
Or you could export the audio, use an audio editor to change the duration of the audio, then import (or mux) it back into VirtualDub. -
Thank you both for your explanations.
Sorry if I look like a little bit thik, but wmv is not my cup of tea. I don't master either avisynth scripts.
I can say that the audio starts ok and gets more and more out of synk, and that the script I used [DirectShowSource("clip.wmv",convertfps=true,fps=29 .890,audio=true)] didn't fix it. I also used the same script but with 29.97fps and the result was the same, out of sync.
I read in another thread that adding the assumefps could change things for good. I don't know.
I think I could do two things before giving up:
One, using this script:
DirectShowSource("clip.wmv",convertfps=true,fps=29 .890,audio=true)
AssumeFPS(29.97) or AssumeFPS(29.980) I don't know.
Two, to change the duration of the audio, as jagabo said, using cool edit pro for instance. But I frankly didn't understand which duration I should choose. The duration of the video once has been converted to xvid using some script?
Thank you for your patience. I didn't know that converting wmv to avi was so difficult. I'm experiencing that out of sync issue very often when I try to convert wmv clips. Wmv stinks, I think. -
WMV is always a PITA.
Obviously 29.89 is not the right frame rate. Using AssumeFPS() will not fix things until you find the correct frame rate.
Code:DirectShowSource("clip.wmv",convertfps=true,fps=29.890) AssumeFPS(29.890)
Code:DirectShowSource("clip.wmv",convertfps=true,fps=29.890)
Code:DirectShowSource("clip.wmv",convertfps=true,fps=29.890) AssumeFPS(29.97)
Code:DirectShowSource("clip.wmv",convertfps=true,fps=29.97)
Download and install AVIFRate. Open your out-of-sync AVI file with AVIFRate and change the frame rate to what you estimate it should be. Save the result (the frame rate is just a number near the start of the file so this only takes a microsecond). Open the result and play it with a media player. See if the audio and video are in sync. If they're still off reestimate a new frame rate and repeat.
Once you have the audio and video in sync open the AVI file with VirtualDub. Put both audio and video in Direct Stream Copy mode. Save as AVI. This will remultiplex the audio and video so that the audio packets are right next to the corresponding video frame. This doesn't make much difference for playback from a hard drive, but if you ever try to play from a CD or DVD you'll need it. -
Since the output of DirectShowSource() is specified as 29.89 fps, adding AssumeFPS(29.89) does nothing.
In your first examples, AssumeFPS(29.89) wasn't used. AssumeFPS(29.980) was used. And it does do something. A typo, I think. Your second 2 examples are the correct ones as you can set the desired framerate within DirectShowSource. -
jagabo,
That would work if the OP had an AVI out of sync, but he's got WMV, so AVIFrate won't work with it.
Here's my suggestion.
WMV doesn't really play well with others. OK. So banish it to where it does fine on it's own...
Open the WMV in WMM. Load to timeline, Save MOVIE as DV-AVI NTSC.
Now you got an AVI you can work with...
Yeah, it's an extra step and you've got to have room for the larger file, BUT IT WORKS! I've yet to see WMM have trouble with any NON-DRM WMV file.
Scott -
Originally Posted by Cornucopia
-
I found yesterday a program that converted my wmv clip to xvid mp3 without showing out of sync.
I had tried before all the suggestions I had read in this and other threads and no one worked right, I don't know why, may be because of my specific wmv clip that has a variable fps, resulting of dropping frames. I must say itīs a clip resulting of joining a lot of small wmv files, each one of these with a different fps (29.275,30.698,etc) having the joined file 29.89 fps.
That's what I had tried before: I converted the wmv to dv-avi ntsc with WMM, but the resulting 7GB dv-avi was already out of sync. I tried again those scripts adding assume fps, and the result was out of sync too.
Then I found this program, Replay Converter, that I don't think is a very good program, I must say, because you can't configure almost anything, you can't choose freely the bitrate nor the number of xvid passes, nor the resizing. A pity. But I loaded in it my wmv and after the conversion I had a perfectly sync xvid. Besides, I hadn't realized that it was configured to get a pal avi and my resulting xvid was a 25 fps avi.
So, that program converted my 29.89 fps wmv to a 25 fps xvid avi that was absolutely not out of sync. Perfect. The only and big problem is you can't choose the options of conversion you'd like to. Specific bitrate, specific resize, etc.
I'd like to be able to do the same that this program does but using some script of mine outside of the program. I found in my computer one script used by this Replay Converter: DirectShowSource("d:\clip.wmv",fps=24,convertfps=t rue,pixel_type="RGB"), but I think it doesn't help to know what it really does to accomplish the conversion. It wonders me too that it says 24 fps but at the end I get a 25 fps. -
Originally Posted by Talayero
-
It's what virtualdubmpeg2 says in Video framerate (No change. Current: 29.89 fps)
-
Since VirtualDubMPEG2 cannot produce a file with the audio and video in sync, why would you have any confidence in that number?
I've never had a WMV file that's been pieced together from several smaller files of different frame rates. I'm not sure that AVISynth would handle it correctly. Can you provide a copy of the WMV file so I can try some things out? -
I think the fact of a wmv being divided into several small files is just to make it easier to share, by mail etc. There are programs like ASF tools that split and join wmv files. I don't have many clips with that format but it's true that quiet a few of them have a non standard fps. When I converted them to avi, some were sync and some others out of sync.
I made a research looking for and trying programs that convert wmv to avi and there are an amazing lot of them. Finally I found out that Replay Converter, the only one for the moment that made the conversion without out of sync issues, had some custom options (hard to find at first sight) that enable to choose the wanted bitrate and resizing. There's no option to choose one or two passes, but it doesn't matter to me because the quality of the resulting xvid was good. Besides, one hour to convert a 30 minutes clip with my 3,01 GHz processor, that means two passes or that the program is as slow as a tortoise -
What is the frame rate of your final AVI file with the audio in sync?
Oh, nevermind. You already said it was 25 fps because you accidentally told it you wanted PAL output. -
Yes, I repeated with 25 fps, because it had worked when I chose it accidentally.
But I tried again chosing 30 fps. By the way, the fps options of this program are:10,12,15,20,24,25,30. I don't know why not 29.97 and why yes 10,12,15,20.
Anyway, both the 25 and the 30fps converted xvid avi were in sync and with fluent image. The only curious thing is that Gsopt says: User data/ Metadata: [JUNK] odmldmlh, and I had never seen that before. -
The userdata field is available for whatever information a program wants to put there. You usually see the name and version number of the program or somesuch. It's nothing to worry about.
Similar Threads
-
Newbie question about frame rates.
By MrTorso in forum Video ConversionReplies: 4Last Post: 13th Jul 2011, 22:49 -
Editing and rendering with multiple frame rates?
By vid83 in forum EditingReplies: 12Last Post: 2nd Mar 2011, 03:20 -
Help Aspect Ratios & Frame Rates
By CTP-Crystal in forum Newbie / General discussionsReplies: 21Last Post: 1st May 2009, 18:10 -
Question about Blu-ray frame rates
By Mentasm in forum Authoring (Blu-ray)Replies: 2Last Post: 26th Sep 2008, 11:16 -
Virtuadub shows two different frame rates ?
By vodmare in forum Video ConversionReplies: 8Last Post: 12th May 2008, 18:47