PDA

View Full Version : MP3 VBR in AVI's - a method worth checking out


Venom_IL
25th September 2003, 12:18
OK, after a nice moderator on the Xvid forum simply closed my thread instead of moving it to wherever it belongs (shoot me if i know where that is, could be tmpg, xvid, divx, here, general discussion, ...), I post it here again hoping that either this is the right place or a mod could be a tad more considerate and move it to the appropriate section. Thanks.


Notice - If you dont want to read my babblings - just skip to the bold "To make a long story short" part which tells you how to convert "problematic" MP3 VBR AVI files to S/VCD.

I have spent hours reading every possible thread in this forum searching for a way to convert AVI files w/ MP3 VBR to S/VCD. Yet none of the solutions offered in any of them that didnt include manually synching (a serious ordeal, which wouldnt produce 100% perfect results anyway) would work for certain files that i have. EXCEPT ONE, WHICH WAS SOMEHOW OVERLOOKED, DONT ASK ME HOW. it was a solution suggested by the user AceOvArts, whose only post in these forums up until today was this:


from http://forum.doom9.org/showthread.p...vbr+%2Async%2A:

There is a little tool that comes with AVI2VCD called decompress that will decompress your audio to uncompressed PCM and write out an avi file with the decompressed audio muxed, this can then be used to convert to svcd. Ive had 100% sucess rate using this method, although now, after reinstalling my system and codecs I never get out of sync audio. So I guess its a codec problem.

This tool is the ONLY WAY that doesn't involve manual synching to encode to S/VCD certain movies while keeping sync. and i say this with utmost certainty, because i have tried pretty much every other method suggested in all the related threads in here - demuxing / saving to wav with nandub / vdub / vdubmod / vdub mp3 while doing everything remotely suggested, to no avail. Thermopyle's method hasn't worked as well - http://forum.doom9.org/showthread.php?s=&threadid=51496 even when attempted on vdubmod / nandub etc with all kinds of changes. Ive also searched on google, but no cigar. to further strengthen my point, I will also mention that in the end of many of those threads, the original author was not able to convert the AVI well despite all the efforts and was left with the only option of manual sync. search for "mp3 vbr *sync*" and see for yourselves.

Anyway, here is a way which I believe would work for all mp3 vbr files, and even if not - it is for sure the ONLY way to convert *SOME* MP3 VBR AVI's :


To make a long story short

0. Get AVI2VCD here
http://www.divx-digest.com/software/avi2vcd.html
or here (official site)
http://home.cogeco.ca/~avi2vcd/
decompress.exe is inside the package

1. Run decompress.exe and decompress your avi
suppose you had a file named 1.avi w/ MP3 VBR support, so now you have a file named 1_pcm.avi which is exactly the same only with uncompressed pcm audio. the synching hasn't changed in a millisecond.

2. Open the decompressed avi file (1_pcm.avi in our example) in TMPGenc and encode to the desired format

a solution so simple to one of the most annoying problems in S/VCD encoding

Again, ALL CREDIT goes to AceOvArts.

Please reply here and voice your experience with the program.. if many ppl find it useful as I do, maybe this method should be put in some FAQ / guide / sticky or something

BTW - there's something very strange about the "decompressed" file.. if you open it in vdub / vdubmod etc and save it with both direct stream audio and video you get an unsynchronized AVI.. for that matter, it would give you all the problems an mp3 vbr file would give you, only this file can be opened in TMPGenc. frameserving thru vdub would also destroy sync :/ also, if you try the AVI2SVCD component of DVD2SVCD on the decompressed file the same thing happens (i assume this happens because it seperates the audio)

All of this is pretty strange considering the fact that the "file information" on vdub shows perfectly normal PCM audio. .

Anyone have any thoughts on the matter ? I mean, TMPGenc w/o manual sync is better IMO than manual sync w/AVI2SVCD, but AVI2SVCD w/o manual sync is even better :D


And a last note - After a little testing, I know now that Mainconcept, CCE, TMPGenc and ProCoder either don't support mp3 vbr or produce unsynched results when given the mp3 vbr avi directly. however, EO Video seemd to handle it pretty well and the result is syched well.. but who uses EO Video anyway? :p

Oh and i do realise that the second a TMPGenc version that supports MP3 VBR is out this whole thread is obsolete, but that might not be the case if the decompressed avi could be rid somehow of its problems - that would mean an easy, generic way of handling MP3 VBR AVI's .. maybe it'd be easier to "fix" the decompressed file rather than the MP3 VBR one :confused:

scharfis_brain
25th September 2003, 12:42
why all these complicated thing for encoding a MP3-VBR-AVI to MPEG?

just use AVIsynth and frameserve the Video to TMPGenc!
There is no need to extract the MP3 to a PCM-Wav!

Venom_IL
25th September 2003, 13:17
TMPGenc doesn't support MP3 VBR audio. You'd just get a file without sound.

sillKotscha
25th September 2003, 13:35
that's why you should use avisynth as mentioned by scharfi ;)

Venom_IL
25th September 2003, 13:46
Originally posted by sillKotscha
that's why you should use avisynth as mentioned by scharfi ;)

what are you talking about ? how's avisynth gonna solve anything?

here'e a quote by YOU about the matter, taken from here http://forum.doom9.org/showthread.php?s=&threadid=54579&highlight=mp3+vbr+%2Async%2A+clean+hack

Ok, I understood VBR audio is bad, so what do I do when I want to edit AVIs containing VBR audio?
Clean solutions:

Transmux the whole file to a container format supporting vbr audio and edit that (eg Matroska, OGM).

Save AVI with uncompressed audio, do your editting, recompress audio

Demux audio, recompress to cbr mp3, remux, do your editting

Hack solution:

Use NanDub or VDubMod (NanDub compatibility mode). I heard its a bad idea to try to recompress audio on the fly using this option.


The second simply doesn't work for some files. the first one, im 99% sure takes the audio out of synch. but tell me exactly how to "transmux" it and ill give you a 100% answer (sorry, im not an expert in these things :sly: )

btw ive tried frameserving to tmpg but it doesnt accept the audio, like i said.. just though id mention that

scharfis_brain
25th September 2003, 13:51
btw ive tried frameserving to tmpg but it doesnt accept the audio, like i said..
Please post the complete error-message!
Please post your script!

I am using avisynth all the time to frameserve to the Encoder.
with avisynth it doesn't matter which type the Audio was, becaus AVIsynth decompresses it internally.

Venom_IL
25th September 2003, 14:05
Originally posted by scharfis_brain
Please post the complete error-message!
Please post your script!

I am using avisynth all the time to frameserve to the Encoder.
with avisynth it doesn't matter which type the Audio was, becaus AVIsynth decompresses it internally.

I said Frameserving, not Avisynth. I don't have any script. so u say avisynth decompresses the audio? I'll upload a little avi file later so u could try it and see if it keeps synch, if you have the time

Venom_IL
25th September 2003, 14:46
http://members.lycos.co.uk/yosi123/d.avi
you might need to go to http://members.lycos.co.uk/yosi123 first and download it off there, or set the HTTP referer as http://members.lycos.co.uk/yosi123, or something. if you have any problems tell me and ill use another host

the file is Xvid w/ MP3 VBR audio and should be synched well in windows media player.. however, as soon as you put it in virtualdub its already out of synch (you can see it in the preview) so i doubt avisynth will be able to solve that , but you never know until you try do you? :sly:

you can use this oppurtunity to check out decompress.exe and see how well it works with this file :cool:

echooff
25th September 2003, 15:31
I guess I'm confused. Why is the audio always out of sync. I never have this problem. When I open a xvid movie with vbr audio in Vdub a warning window pops open complaining about the audio and ask if it's ok to rewrite the header. If I click ok I have a sync problem. When I just close the box, I don't. I can then save as wav and run it through BeSweet adjusting for framerate as necessary. Encode the video portion and off to my authoring tool. I have also used dvdpatcher to rewrite the headers on a standard svcd and change the width to 352 and it works (audio changed to 48000).

My question is; What am I doing wrong. I know my method is kind of convoluted but, my files always work in all three of my standalone dvd players (different makes.) I try to help people here on the forum and I certainly don't want to put out bum dope. I don't use avisynth because I don't understand the script. I would love to use it if someone could be kind enough to post a workable script.

scharfis_brain
25th September 2003, 15:51
an avisynth script for only frameserving a video without manipulateing it is VERY simple (only one line!)

AVIsource("X:\Path\video.avi")

save this file as *.avs

an then open this avs-file in your favourite encoding application instead of the video.avi!

Venom_IL
25th September 2003, 15:54
Originally posted by echooff
[B]I guess I'm confused. Why is the audio always out of sync. I never have this problem.

It's an EVIL file :sly: :sly: :sly:

:devil:

scharfis_brain - can you please download the file i posted and tell me if you can use avisynth to fix the synch issue ? its only 1 meg or something

scharfis_brain
25th September 2003, 16:01
Originally posted by Venom_IL
It's an EVIL file :sly: :sly: :sly:

Yes it is.

Someone must have done a lot of garabage with this video....

It's out of sync with avisynth...

I've never seen this before!

Venom_IL
25th September 2003, 16:38
Originally posted by scharfis_brain
Yes it is.

Someone must have done a lot of garabage with this video....

It's out of sync with avisynth...

I've never seen this before!

Buahahahah ! I WIN LOL :D

try decompres.exe -> TMPG
I want to know if it really works or its some fluke on my system :sly:

BTW the encoders were the infamous LOL and this screwed up mp3 audio seems to be a theme in their encodes :angry:

(If the group LOL is considered illegal here please edit them out of my post, mods - thx )

scharfis_brain
25th September 2003, 16:46
but don't think, that VBR-MP3 is always out of sync with AVIsynth!

Gernerally, it works pretty well!

Venom_IL
25th September 2003, 16:57
Originally posted by scharfis_brain
but don't think, that VBR-MP3 is always out of sync with AVIsynth!

Gernerally, it works pretty well!

I agree. The sole purpose of this post is to provide an answer to those few files that do have synch issues, no matter what. After all, anyone can run into such a file sooner or later and I believe it's always good to be prepared for anything ;)

I mean for this method to be a small note in a faq somewhere, that's all. No need to revolutionize the audio decoding world :D

alexnoe
25th September 2003, 23:45
OK, after a nice moderator on the Xvid forum simply closed my thread instead of moving it to wherever it belongs <sarcasm> strange....you did not mention 'mkv' anywhere </sarcasm>

dragongodz
26th September 2003, 06:55
"The sole purpose of this post is to provide an answer to those few files that do have synch issues, no matter what"

here is the BEST solution. DONT USE VBR IN AVI. sorry to shout but how many time do people have to be hit over th head with this ? avi does not support vbr audio period. to make vbr work you are hacking the format. so if you have any problems with files then its your own fault and people(especially newbies) should NOT be encouraged to use it ever. instead try using MKV container if you must use vbr audio.

Venom_IL
27th September 2003, 00:01
Originally posted by dragongodz
"The sole purpose of this post is to provide an answer to those few files that do have synch issues, no matter what"

here is the BEST solution. DONT USE VBR IN AVI. sorry to shout but how many time do people have to be hit over th head with this ? avi does not support vbr audio period. to make vbr work you are hacking the format. so if you have any problems with files then its your own fault and people(especially newbies) should NOT be encouraged to use it ever. instead try using MKV container if you must use vbr audio.

Where the hell did I ever say it was my choice ?
I even wrote specifically the encoders were the group "LOL"

The point is, if you already HAVE a files and let's take it to the extreme - can't download a better version (which is my case with this file), you have to deal with the situation at hand.. so here i am offering a solution to that situation while agreeing wholehartedly with you - this format SHOULD NOT be used, and yet, people still use it. so if there's a solution i think it should be known..

after a very extensive search, I have found exactly 2 places on the internet that recommend using decompress.exe, one of them is the post i referred to here, and the second is a similar post in vcdhelp.

IMHO, this should at least be a small note in some faq, somewhere

Danzel
27th September 2003, 00:23
well another good way to fix vbr mp3 in avi is to stop downloading illegal copies of movies and do your own backups!

Danzel.

Venom_IL
27th September 2003, 00:26
Originally posted by Danzel
well another good way to fix vbr mp3 in avi is to stop downloading illegal copies of movies and do your own backups!

Danzel.

Well, that's an episode I already watched many times on cable TV (for which I pay), so I couldve recorded it myself and make my own backup and be perfectly OK with the law... so I don't see how different this is...

alexnoe
27th September 2003, 00:44
Well, that's an episode I already watched many times on cable TV (for which I pay), so I couldve recorded it myself and make my own backup and be perfectly OK with the law... so I don't see how different this is... From the moral point of view (pay for what you get), it is no difference. But where is the connection between moral / reasonability on the one hand, and obfuscated legal systems on the other hand? :scared:

Venom_IL
27th September 2003, 02:22
Originally posted by alexnoe
From the moral point of view (pay for what you get), it is no difference. But where is the connection between moral / reasonability on the one hand, and obfuscated legal systems on the other hand? :scared:

I dunno, but it sure doesn't matter because I actually download copyrighted materail anyway

And mp3 vbr in Avi's is the price I pay... :sly:

pacohaas
27th September 2003, 03:11
i'm locking this thread before it gets out of hand.