View Full Version : divx -> vcd
Doom9
13th January 2002, 19:44
well.. I had the idea of making a divx -> s/vcd guide. As it looks things work out fine as long as the audio is CBR.. but almost everybody is doing VBR MP3s these days and as written on http://www.virtualdub.org/virtualdub_news these are basically fucked for editing. I tried to extract the audio via Nandub and Graphedit and feed TMPG an avi without audio track and the audio separately.. and it gets progressively asynch. As Avery Lee wrote the only way to make TMPG accept an AVI with VBR MP3 audio track is to let the DirectShow Reader handle it, and indeed, this time it got synch, however the output was really choppy so that's out of the picture, too. Last but not least I tried to uncompress the audio directly in nandub, that is writing a new avi that had uncompressed audio but that avi was invalid and couldn't even be played. Decoding the audio via graphedit to a wav produced an unusable wav.. and decoding the audio to a real wav in virtualdub and using that to encode resulted in a choppy file once again.. so basically I'm out of options.
If anybody sucessfully managed to get this right let me know.
iluminati
13th January 2002, 20:20
hmm, I've never tried to do divx -> s/vcd, but I did a few conversions for a friend of mine who has an outdated comp that cannot handle more than 400 x X resolution. Most of the times I encode my movies with 2 mp3 vbr audio tracks using nandub to mux, but when I have to do the conversion, I run into the same problem.
But using Graphedit works for me. This way I get a decoded wav of one of the two audio streams that can be encoded again (although I know this can degrade quality).
I used your Graphedit & Vob2audio Guide and modified the example you give there. I'll try to attach a screenshot of a graphfile that worked for me.
edit: seems like the attachment thingy doesn't work. So I've put the image here: http://www.rzuser.uni-heidelberg.de/~sbirkman/graph.gif
Doom9
13th January 2002, 22:37
that shot looks familiar.. I made some of 'em myself this afternoon anticipating that I'd get to my goal.. but the thing is.. this works with divx -> divx because.. well.. it's divx and divx has no problem with vbr mp3.. but it's a whole different ballgame when you go to mpeg1/2.. as stated above.. it's either synch and choppy or asynch and fluent.. I have no trouble believing that it works with divx.. hell.. I managed to decode the audio track (turning it into pcm) and keep the avi (some fancy ge stuff ;) and it stayed synch and non choppy.. but tmpg wouldn't even accept the damned file.. but I think I have one last option.. split that particular avi into video and audio and try that again.. not that I have much hope but you never know.
Doom9
14th January 2002, 00:22
now.. this makes absolutely no sense whatsoever. The avi with the cbr mp3 works, but only if I demux the audio first.. otherwise the audio is blank. And the few scenes I checked are all okay.. I do the same with my vbr mp3 movie, and I got my ways to get it properly synch.. but in the middle of the movie the damned thing is choppy.. but in the beginning and in the end it's pefectly fine.
anybdoy ever had a similar problem with tmpg?
sneeky
14th January 2002, 03:57
To extract valid audio from an avi, I have found that GoldWave (ver 4.25) does a good job. I'm not sure about all forms of vbr-mp3, but it manages cbr and most abr forms I commonly use just fine. I don't have any sync issues afterwards when remuxing the extracted audio. To extract, just open the muxed avi in GoldWave. Good luck.
TheWEF
14th January 2002, 06:21
ok, just tried it.
took a divx4-movie i recently encoded with gknot standard settings (abr 128, 25fps).
opened it in nandub -> save wav (=demuxing).
so i got the vbr-mp3 audio file.
converted it to wav with winamp.
then opened the avi in tmpg.
instead of the avi i selected the wav for audio.
and pressed start.
worked like a charm...
;)
wef.
Doom9
14th January 2002, 09:56
well.. I think I just found a bug in tmpg 2.50. did this: I used the very same avi I used for tmpg in cce.. encoded the scene where tmpg always would get choppy.. and it was fluent.
now.. I have to test a couple more files but so far I know this: tmpg will encode a movie that's fluent (and synch.. synch is not my problem here I have that under control, vbr mp3 or not) in the beginning and the end and become really choppy in the middle. Now.. I have to find out where exactly the bug lies and do some more testing but that just seems to be it.
now.. anybody had the same problems with tmpg (using separate no-audio avi sources and wav (raw pcm.. not wavemp3 mp3s) sources?
Doom9
14th January 2002, 12:33
let's do this for real: I have worked with 3 movies, 1 DivX4 with CBR MP3 audio track and 2 DivX3 with VBR MP3 audio track.
TMPG will accept movies with CBR MP3 audio, however, after encoding the audio is mute. So what I did was extract the mp3 (direct stream copy in Vdub 1.4.7) and loaded it as separate audio source. I encoded 10 minutes from the beginnin and the last 10 minutes and everything worked out fine. Later after all my problems I encoded a part in the middle of the movie but I can't really tell if it's alright.. there were no pans just hard cuts and it's mostly during pans where you see the choppyness.
Then for the VBR stuff I created an avi without audio (set audio to none, video to direct stream copy) and save the avi, then set audio to full processing mode and save the audio with save wav... load avi and wav as input in tmpg and encode. I did several clips and they all had the same problem: taken from the beginning or end of the movie everything was fine, taken from the middle it was choppy. So I encoded a whole movie.. and it had the same effect.
Also.. I used the default VCD NTSCFilm profile, and in 2 test clips (from the middle of the movie.. also got choppy) the SVCD NTSCFilm profile. Also.. TMPG version was 2.50. And.. it was no muxing issue because if you demux the video track.. it plays choppy too.
So... the question is.. has anybody had the same kind of problems? I'll of course do some further investigation but it would really help me if some of you could try this procedures too and report their results. I also loaded the avi via avisynth into cce sp2.50 and encoded a sequence from the middle of the movie (twice) and it was both times not choppy.
Further things to check would be: what happens if you use separate avi w/o audio and pcm wav in tmpg from a divx with cbr sound and encode a part in the middle (make sure it has some fast pans in it). what happens if you only do the video in tmpg without any audio?
I truly hope you can help me with this testing... maybe the TMPG default profiles are incorrect.. or maybe TMPG has problems when using separate inputs..
Slyde
14th January 2002, 19:06
I've been trying to do XVCD from DivX files and AVS scripts a few days ago with TMPGenc 12a/12b/2.5. I wasn't even able to get all the source file fully compressed.
TMPGenc was always crashing ("error in module ...") a few minutes only after I started encoding with TMPGenc 2.5 while using AVS/WAV source. TMPGenc 12a/b only crashed at half of the file.
My cel 900 runs @ 1200 (1.95v) but is rock stable anywhere else (BurnMMX/P6/P5/BX - 3Dmark2001 - Divx encoding - Winstone - SuperPI 32 M - Quicktech 98 extented are all ok after many hours, no errors AT ALL). So I'm thinking AVIsynth or TMPGenc (even if I never had problem while using .vdr and a less stable processor with TMPGenc 12a/b by the past) might be the problem, but I shall do further experiments first.
To prevent any problem with ABR/VBR mp3 streams, i've always been doing like TheWEF and converted them to WAV before starting. However, most of the time my audio streams are CBR fraunhaufer mp3 so I don't often use lame-encoded MP3. I didn't have any problem selecting a range of frames in the middle of the video with separate AVI/AVS and WAV files too.
Doom9
14th January 2002, 20:09
now dig this.. today I can load ANY DivX (no matter what audio format)... I tried at least 10 different discs and it works just fine. However, if I start encoding from the beginning it gives me some crap about can't decode audio.. but if I start encoding a little further it works.... without audio though (but I had that before).. then one movie with cbr mp3 track.. there I got audio.. but it was slightly choppy.
And now for the most interesting part.. what did I change on the system... downloaded the latest logi mouse driver and realtek nic driver from windowsupdate and what I think makes the difference: late last night I installed divx3 since cce wouldn't accept my divx3 files otherwise.
sarahjh69
14th January 2002, 20:21
i thought the nero plugin did this for you
you just drag and drop the divx file into
the nero window!
Doom9
14th January 2002, 21:06
I don't want no friggin nero.. I want tmpg.
but anyways.. I finally got tmpg.. that cbr thing only was choppy because I forgot the source was actually pal.. now off to check for synch in the end of the movies
Doom9
14th January 2002, 23:57
well.. finally I did it.. guide coming up soon now
tateu
15th January 2002, 02:29
I see that you've already got a working solution, but I've succesfully converted quite a few divx movies to svcd so I thought I'd mention my way. DVD2SVCD is what got me started along this path. I wrote a program for personal use (it's probably too crude for the general masses) that is, in a very basic way, similar to DVD2SVCD. You load your avi, select a few options and press GO. It calls AVI2WAVCMD.exe which extracts the audio to a wav file (still in mp3 format), L3DEC.exe to convert the (mp3) wav to an uncompressed pcm wav, SSRC.exe to downsample to 44.1 KHz, TOOLAME.exe to encode to mp2, an AVISynth script is created to scale and crop the avi to 480x480, CCE encodes the avs file, PULLDOWN.exe adds the rff flags to the video, and BBMpeg muxes the audio and video.
Without the simple GUI I have for this, it's probably way too many steps to take, and your method sounds much simpler. I just like this way because I can get it all done in one step and walk away for a couple of hours and return to a completed svcd mpeg file.
mean
15th January 2002, 09:58
Some thoughts about your guide :
- Why no use of avisynth to get rid of the DS filter problem ? I.e. DirectShowSource("xxxx.xxx") ?
That way you are sure to have postprocessing activated on divx3 hassle-free + you remove the sound. It will also work with CCE. (Latest version of avisynth has problem apparently when it comes to such operations)
- Your guide assumes that the incoming divx is "perfect".
That is there's no framerate such as 23.950 or 25.020 sometimes found on old divx because that was a way to correct async problems (caused by flask mainly).
On such a case i would suggest to resynchronize the divx first (using WMLA for example) and encode afterward.
- Film<->Pal conversion, i would suggest changing the framerate using avisynth and changing the audio duration with wla. It will make smooth video playback.
Else tmpg will duplicate/remove frames to make the video and audio match. That will cause jerkiness.
( the assumefps command of avisynth or indicate the fps in the directshow source).
Just my 0.02 $
Slyde
15th January 2002, 11:32
Has anyone a fix for my TMPGenc crashing problem ? I'm running W2k sp1. Before I was running Win 98 and got no problems...
DSPguru
15th January 2002, 11:38
Originally posted by mean
- Film<->Pal conversion, i would suggest changing the framerate using avisynth and changing the audio duration with wla. It will make smooth video playback.
BeSweet is implementing a much-higher HQ algorithm for FRC (frame-rate-conversion), wla implements the worst algorithm possible (it simply throws the fIrst X samples out of Y samlpes in a block. not taking care of aliasing, not randomizing. nothing!)
i usually not trying to convince users to use my program. choose for yourself.
but this time, come-on man, you're SOOO wrong!
Doom9 is damn right, guiding (http://doom9.org/mpg/avi2svcd.htm) to use BeSweet for FRC purpose.
Doom9
15th January 2002, 12:03
avisynth's directshowsource gives no audio in many many cases.. I can also load the vbr avi using the directshow reader.. but I don't really trust it.. there's a reason why that plugin is so low in the priority list.
and as for the other framerates.. if you have em you should know how to fix it.. I really can't take care of every gazillionth case, can I? the guide is big enough.. the more info you put into it the higher the probability less experienced users will no longer be able to distinguish what part of the guide concerns them and what doesn't.
and last but not least.. the guide makes very clear what I think of such conversions.. don't do them.. but it's been asked here so many times that I still had to write something other than that.
mean
15th January 2002, 13:17
"avisynth's directshowsource gives no audio in many many cases.. "
Yes, that's what we want.
I said + you remove the sound
The audio is better encoded separately as you said.
Most of the problems are coming from the audio track.
On the incorrect avi, i will drop the subject.
Concerning the format conversion, i'm not very fond of that either but, for example, playback of VCD-FILM (which is a legit format) is often choppy on dvd player, so converting it to VCD-PAL is a good idea.
You got two ways of doing it:
Altering video so that it matches audio.
Altering audio so that it matches video.
I understand from the guide that you let the audio unchanged and ask tsunami to alter video by loading a pal profile (for example).
So tsunami will drop/duplicate frames-->choppinness.
The other way, which is according to me is better, is to alter the audio by speeding it up a bit/slowing it down a bit.
Concerning the use of besweet compared to wla, that's a good idea. I trust you on the fact that is much better at doing the job than wla. Will try it next time.
My main point was :alter audio rather than video.
Doom9
15th January 2002, 19:05
actually.. you didn't read the guide properly.. but I have to admit that there's a problem in it.
so.. currently it states to load the pal profile which gives you the right resolution and framerate, and change the audio length using besweet. So now, actually the audio length is okay but tmpg indeed created a choppy output (didn't notice that but I didn't check much, and it seems to be out of synch too).. btw.. there's a whole lot of people having DVD players that have never heard of PAL so your statement isn't really correct)... but we can easily fix that by adjusting the framerate of the source AVI (there's a tool specifically made for that operation)... then tmpg will not screw up (i assumed it would just speed up the video but apparently it doesn't).. so we speed up the video to 25fps, we adjust the length of the audio file, and our pal vcd should be perfect. There's really no need for avisynth here (only if you want to encode in cce.. I'll eventually handle avi2svcd using cce in dvd2svcd but for VCD that's best done in TMPG as it's free and CCE isn't).
mean
15th January 2002, 20:08
"actually.. you didn't read the guide properly.."
Yes i admit it, i read too quickly the part about audio encoding. My excuses to you & Dspguru.
I still think that avisynth is a good idea, as :
- DirectShow filter problem. I'm not sure that the DLL would not be picked first
because the default priorities are OpenDML>Direct Show, and i think vdub/nandub generates openDML avi. With avisynth you are sure the direct show filter is picked first.
- Framerate. You have to only write 1 line of text, instead of creating a new avi file or altering the one you got. Ok that applies only on people living in the PAL world that do conversion.
- I also do the resize in avs, you can add black border (invisible on screen due to TV overscan) that reduces the bitrate consumed for nothing. -->Fitcd .
- You can check that the audio and video are synced before feeding them to tsunami with virtual dub. That is true especially when playing with framerate. Normally if it is synced in, it will be synced out.
- It is compatible with both CCE and tsunami.
I totally agree with you on the fact that tmpgenc is better for VCD (and animes :) ) and is free.
I will stop my posts on that subject here, as i have the feeling that they are not taken for what they are for, that is helping you to enhance your guide.
Bye.
Doom9
15th January 2002, 20:26
I don't quite get you.. you adjust the audio as I do (but I encode it to mp2 at the same time.. using the best audio encoder there is : toolame).. and then I adjust the video fps which you do too, just by another way. I know all about what you can do in avisynth.. but as I said.. cce will be supported once the dvd2svcd version supporting it is out, not before. I perfectly know how to create the avisynth scripts (hell.. I did them.. and I tested that out).. but tmpg is easier and ppl doing these conversion are often not so skilled and would only get confused by avisynth scripts.. you have to look at the big picture here... you're doing this for your own.. I'm writing this for a couple 1000 people who all have their different background.
so.. with your method.. you adjust your audio lenght.. then you have a wav.. do you load that as external audio source in cce? I can tell you that many (especially amd users) have problems with audio encoding in cce (basically it doesn't work.. doesn't work on my 2 pcs as well).. otherwise you have to encode separately which gives my method the edge back. Or do you load the wav file via avisynth? once again here.. cce doesn't accept that either.. if I activate audio encoding cce crashes upon starting to encode (that is the main reason why I don't want to involve cce at this point).
then.. neither vdub nor nandub write opendml avis.. we work with regular avis here.
oh.. and you can actually adjust the audio length of different fps AVIs.. that's all part of BeSweet (will prolly be in the updated guide I'm preparing now).. and I can report that I got it all synch and non-choppy after changing the fps on the AVI file (at this point you get to see the actual frame rate so you can adjust the audio length properly too).
mean
15th January 2002, 20:59
I use toolame too, always :).
No audio in the avisynth script (or only for CCE, but in that case audio encoding is disabled)
Basically the same method as you concerning audio.
I was using WLA, but that's mainly because i had not looked deep enought into besweet which is newer that wla.
The point where our opinions differ is the video.
If i do
xxd dummy.avi | more
at one point i got
0002180: 0000 0000 0000 4c49 5354 0401 0000 6f64 ......LIST....od
0002190: 6d6c 646d 6c68 f800 0000 e0ea 0100 0000 mldmlh..........
00021a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00021b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
Which looks like an openDML extension chunk.
I'm not sure, but before using the avisynth trick i had average quality mpeg2 from good looking avi
After doing a bit of head scratching i concluded that the dll was used instead of the direct show.
I may be wrong, but i would suggest the following test on a (very) short video which has a lot of apparent macroblocks when postproccessing is disabled.
Do no resize, use big bitrate value.
Do it your way and do it my way.
Have a look.
On VCD i may not be as visible due to the size reduction.
I may be wrong, i repeat, but it's worth a look.
Mean.
Doom9
16th January 2002, 00:31
what you're saying would basically mean that whenever we use an avi we're getting screwed... that simply can't be. imagine vfapi unfiltered? my avis being unfiltered that I load into vdub (there I actually tried and compared because the avisynth way was costing me so much time.. if you set up vdub the right way there's no diff.. and my svcd files definitely show no sign of such an effect (at svcd bitrate you'd expect me to be able to see it).
mean
16th January 2002, 09:13
You may be right.
Could you explain the part "if you set up vdub right" ?
I was under the impression that vdub could only use the vfw codecs. Correct me if i'm wrong.
There's no difference for div4 movie or div3 decoded by div4, on that i totally agree.
Actually there is an two other solution than altering the frame rate of source avi or using avisynth. One is to use pulldown to change the framerate after encoding, but is more relevant for SVCD-film encoded with CCE.
The other, for tmpg, is to Select the "Do not frame rate conversion" option box.
mean
Doom9
16th January 2002, 11:35
how to set up vdub: options -> enable direct show acceleration, then options -> preferences -> output color depth: match display depth.
mean
16th January 2002, 11:39
Thanks.
Tessai
21st January 2002, 10:03
Just thought I would point this out: Avery Lee has written an interesting article on Directshow filters on the VirtualDub page. Without going into the details of the article, basically he says (please excuse the paraphrasing if it is incorrect): 'If you are encoding any avi files with VBR MP3, they are virtually uneditable.'
This is quite interesting as it would explain Doom9's problem of DivX->SVCD conversion problem (or at least part of it). It seems that Nandub has an interesting "quirk" in it that may possibly be fixed in the next release (??).
Doom9
21st January 2002, 18:37
and these were my problems initially.. but as you can see.. the problem can be overcome.. it's not as simple as handling an avi with cbr soundtrack but the point is it can be done..
legman
22nd January 2002, 02:33
Remember the cast away controversy? lol
People have been converting vbrmp3 to svcd for sometime.
It must be that tmpgenc has that bug you mentioned.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.