View Full Version : improper VBR audio encoding
Martin Wagner
30th September 2002, 10:11
Hi there,
I started using Gordian Knot several months ago and encoded quite a lot of movies since then. Now I´m starting to experiment with Virtuel Dub and I´m experiencing some difficulties. When I try to process the Divx 5.02 avis I encoded with virtual Dub (always using the way described in the manual) I get the followong VirtualDub error message:
"VirtualDub has detected an improper VBR audio encoding in the source AVI file and will rewrite the audio header with standard CBR values during processing for better compatibility. This may introduce up to 6336 ms of skew from the video stream. If this is unacceptable, decompress the *entire* audio stream to an uncompressed WAV file and recompress with a constant bitrate encoder. (bitrate: 118.1 + 18.8 kbps)"
When I continue an re-encode the movie, the sound gets desynched. Whats the reason for this error? Do I have to set a constant bitrate (128?) in the Gordian knot Audio Source Menu? Is there another way to work around this problem (decompressing everything to WAV is quite an effort).
Quite a few questions, thanks in advance for any help.
mw
Swede
30th September 2002, 12:05
Short answer: vDub can't handle VBR audio. Use Nandub for this.
Martin Wagner
30th September 2002, 13:41
Well I already tried that. I only came by this problem while playing around with vDub and editing scenes for my PDA/IPAQ. I also used nandub but on the IPAQ the result showed quite a few greenish artifacts all over the picture. But nevermind, watching vid on pdas is a waste of time anyway.
Just one last question - If VDub doesnt support VBR and so forth is it better to work with Nandub if all I want to do is edit my Divx AVIs or maybe capture some stuff from my Videocamera and compress it using Divx? Are there major disadvantages in Nandub?
Sorry again for these rather basic questions, but any help would be apreciated
greetings
m
Swede
30th September 2002, 13:57
Nandub is ONLY for DivX 3 and adding VBR audio, so it's *not* an option if you use DivX-anything-else or Xvid.
So, when fiddling around, use vDub for everything except adding the audio and as your last step you add the VBR-track using Nandub.
Rgds
jggimi
30th September 2002, 14:44
You don't have to re-compress the audio. From Nandub, you can "Save WAV File" from the FILE menu, and the audio will be saved it it's current format. Just pick an .mp3 file name for mp3 audio.
Gknot 0.26.1 uses the following procedure with DivX 5, if you're doing a single track of audio in .mp3 format:[list=1] Transcode .ac3 to abr .mp3 using BeSweet (using Azid/Lame under BeSweet).
(Optional) End credits in single pass, quality-based encoding, using Vdub.
Vdub for first pass.
Vdub for 2nd pass.
Nandub to (optionally append end-credits and) mux the audio.[/list=1]Nandub is used to mux all sorts of audio types. It supports, as you know, abr/vbr .mp3, but also .ac3, ogg/vorbis, as well as cbr .mp3 and .wav files. It can manipulate .avi video done in any codec, as long as video is set to "Direct Stream Copy." However, the only encoding it can do is SBC: DivX 3.11 Alpha.
Martin Wagner
30th September 2002, 15:23
Thx jggimi for the advice. I have to ask one last (stupid) question. Does it make any sense or, better put, does it work to create an avi with cbr mp3 audio, so I can use VDub without adding sound later? Whats the advantage of vbr over cbr?`
Rgds
m
jggimi
30th September 2002, 16:24
The advantage is that bits get placed to the best advantage.
In scenes with little audio, only a few bits are used, in scenes with lots of sound, lots of bits are used. You end up with an average bitrate across the entire soundtrack.
If you work in .mp3, you'll be happier with the outcome using abr/vbr over cbr.
Nandub isn't difficult to use for this purpose; you'll need it also to split larger .avi files; Doom9 has plenty of guides to show you how to use it for either purpose.
Amerzone
30th September 2002, 20:02
@ Martin --> You may refer to this thread http://forum.doom9.org/showthread.php?s=&threadid=29121 for some further reading, if you wish...
jmes
17th February 2003, 21:24
I've read every thread that resulted from an "improper vbr" search and I still am having a problem. I have a couple of AVI files that when I open in VirtualDub I get that familar "... improper vbr .... This may introduce XXXXX ms of skew ..." My goal is to at some point use TMPGEnc to convert these (corrected) AVI's to MPG's. Based upon what people have said, I've DL'd "VirtualDubMod" and "Nandub." If I try to open either of the files in "VirtualDubMod" I get the same error. If I open in "Nandub," no problem. I used Nandub to save to a new AVI file via "Save as AVI." The resulting file plays perfectly, but I still get the error when openned in VirtualDub. I've tried saving the audio ("Save WAV") and mixing and matching every conceivable AVI/WAV combination via VirtualDub and/or TMPGEnc. The sound is always out of sync.
What am I doing wrong? Please be specific.
Thanks in advance,
Jim
Belgabor
18th February 2003, 10:16
Which version of VDubMod were you using? Try the latest CVS release (VirtualDubMod_310103.zip).
It has a more user friendly way of handling this (see ChangeLog).
jmes
18th February 2003, 19:01
Thank you for responding ...
I DL'd VDubMod yesterday (Monday). The file name is "VirtualDubMod_1_4_13_1.zip". VDubMod "About" -> 1.4.13 build 14328. Let me tell you what I've tried:
I took the original AVI w/ sound in sync and saved the sound as a WAV. I saved the sound three times using each of the 3 programs - VDubMod, VDub and NanDub. Both of the VDub* programs complained about the "Improper VBR." The resulting 3 WAV files were identical in size, so for the remainder of these experiments I used the WAV created by NanDub.
I then took the original AVI and substituted the sound. I used the appropriate method for including a WAV file since each of the 3 programs has a little bit different menu. I did this "substitution" using each of the 3 programs: VDubMod, VDub and NanDub. (I had read that NanDub was more forgiving with VBR sound. When the resulting AVI file sound was out of sync, tried it with the other programs just for grins. In all cases, the resulting AVI had sound out of sync.)
I'm suspecting that I'm missing something between saving the WAV and substituting - some form of conversion. (Or perhaps I'm missing a setting somewhere OR perhaps I'm just screwed and it can't be done :o )
Thanks again for your time .. any help would be GREATLY appreciated.
Jim
PS: In the past I have split the audio & video and then used TMPGEnc to merge them - worked fine - could be that the skew was small enough not to notice lips not matching sound ...
PPS: While I know how to do video captures/edits/repairs/etc., I'm painfully weak on the proper terminology. What does CVS stand for?
Asmodian
18th February 2003, 20:32
about vdubmod and vbr mp3, there is a check box on the open file screen for using nandub type vbr audio compatibility. Though I don't think it would help it would make you not need to use nandub at all, and might be useful in the future. Sorry I can't be of any real help with the sync issues, maybe re-encoding the audio with the lame ACM (and direct stream copy the video) in vdubmod with nandub vbr compatibility enabled when opening the source avi?
Belgabor
19th February 2003, 01:15
CVS has nothing to do with video editing, it stands for (iirc) 'concurrent version system' and is a way to store source code on a central server so several people can work on it more conveniently.
We recently started to do prereleases (called CVS releases) mostly to quick-fix some bugs, but also to test some new features. You can find them on the very bottom of our download page on sf (see my signature). Be careful to get the right file (see my last post). These zip files only contain the exe file, none of the other needed stuff. Just copy the exe over the one of the full release.
jmes
19th February 2003, 19:08
Thanks again your your posts. Perhaps I am being dense, but I am not getting it. I have DL'd all the files like suggested. I have also read the VirtualDubMod FAQ - no help. Under VDM Help there is a option to read "ChangeLog..." and "VirtualDubMod Change log" - both of these return that the appropriate "Changes[_MOD]" files cannot be found. I have read the "changes" posted on the website via clicking on the "version number". There is a section written by "Cyrius" that states -> "MP3 VBR handling (a la Nandub) is now a preference setting (and so can be saved). See the 'AVI' section in the 'Preferences' window. Each time a VBR stream is found inside an AVI the VBR warning will be shown (like in VirtualDub) and you will be asked if default setting must be applied or not for this stream." - this seems to imply that it will automatically save the corrected file if the proper switches are set ..
I have opened the AVI, got the message about the "improper VBR" and said it would rewrite the header with standard CBR, but may introduce 43680 ms of skew ..." If unacceptable, decompress ... and recompress with constant bitrate encoder ..." I answer YES to the popup "Do I want to rewrite the header." I have saved the AVI -> out of sync. I have saved the audio and tried to merge -> still out of sync. I have tried a bunch of different things -> still out of sync.
I have played with "Preferences->AVI->By deault try processing MP3 VBR streams like Nandub ..", "AVI->Audio->Direct Stream Copy" vs "Full Processing", and a couple other settings with no success - I am kinda at wits end ...
Could someone please be very specific what I need to do. Please tell me what programs with what options/switches need to be set in order to achieve the audio/video sync to a new AVI file. I'm sure it is very simple once you know how, but I am not understanding the steps necessary.
Thanks in advance,
Jim
ajctc
23rd February 2003, 22:33
Please check here. Maybe This can help you.
http://www.dvdrhelp.com/forum/viewtopic.php?t=142521&highlight=frames
jmes
26th February 2003, 04:28
Thank you so very much. After searching thru the forum you suggested, I found the answer (which I will add here). The steps to converting an AVI with VBR problems to a MPG is straight forward and are as follows -
1) Use VirtualDub to open and save the audio as a WAV. This appears to work with any VirtualDub/NanDub/VirtualDubMod.
2) Use either Nero Wave Editor or CoolEdit to open the WAV and then "Save as" a PCM WAV. (I suspect that any other audio editor with PCM output would work)
3) Use the TMPGEnc Project Wizard to "merge" the original AVI video and the PCM WAV file.
You now have an MPG file with sync'd audio. I suspect that if you used VirtualDub and merged the original AVI with the PCM WAV you could save to a new, synched AVI (but I havent tried it yet)
Jim
ajctc
28th February 2003, 11:23
Hi jmes
Before step 1), you should scan the video for bad frames with virtualdub, check direct copy for audio and video and than save as avi.Bad frames causes audio desynch.
You can skip step 2) and load the wav file as the audio source in Tmpgenc. Be sure to input in Tmpgenc the audio skew reported by virtualdub in file properties.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.