Log in

View Full Version : How encoding Xvid with vbr-audio to DivX


The Other One
19th May 2004, 19:19
Hi!

I'm trying to encode an xvid (1.0) file to divx. But the file has vbr-audio so that vdub and vdubmod won't produce a synced divx-file.
Only nandub can open the vbr-audio, but can't encode to divX.

Perhaps someone can help? thx

jimmy basushi
19th May 2004, 23:29
get yourself a copy of the audio, then reencode without it in vdubmod and add the audio back in. did you try that?

celtic_druid
20th May 2004, 00:20
How about just changing the fourCC from XVID to DX50.

GoaTrancer
20th May 2004, 16:12
Why would you want to reencode xvid to divx ?
You`ll just lose some quality, and XviD is better in most cases.
As for the audio isnt it possible to Demux the audio as is with VDubMod then just mux it in the new file ?
I don`t know if this has any effect on a/v sync, so correct me if I`m wrong !

stephanV
20th May 2004, 16:32
Originally posted by celtic_druid
How about just changing the fourCC from XVID to DX50.
how would that help?

Originally posted by GoaTrancer
As for the audio isnt it possible to Demux the audio as is with VDubMod then just mux it in the new file ?
I don`t know if this has any effect on a/v sync, so correct me if I`m wrong !

you are right. when the file is opened in VDubMod a question is asked if it should re-write the header to CBR or not. Answer 'no' and there should be no synch problems.

bond
20th May 2004, 16:39
Originally posted by celtic_druid
How about just changing the fourCC from XVID to DX50exactly, divx5 and xvid are both mpeg-4 codecs, meaning they can interoperate without a problem
problems are only caused by the avi container, for example by the fourcc system, which makes interoperability very hard

Originally posted by stephanV
you are right. when the file is opened in VDubMod a question is asked if it should re-write the header to CBR or not. Answer 'no' and there should be no synch problemsexactly and once again:
variable bitrate (vbr) itself never causes sync issues!

still again the avi container cant handle vbr audio on its own, which means there is a hack needed to be able to place vbr mp3 in avi, a hack which only virtualdubmod and nandub support

GoaTrancer
20th May 2004, 17:22
I prefer OGM or MKV over AVI anytime :)
Avi is just so outdated.

Sylf
20th May 2004, 18:33
Originally posted by The Other One
Hi!

I'm trying to encode an xvid (1.0) file to divx. But the file has vbr-audio so that vdub and vdubmod won't produce a synced divx-file.
Only nandub can open the vbr-audio, but can't encode to divX.

Perhaps someone can help? thx

Have you tried direct stream copy on both video and audio in nandub?

stephanV
20th May 2004, 19:01
Originally posted by bond
exactly, divx5 and xvid are both mpeg-4 codecs, meaning they can interoperate without a problem
problems are only caused by the avi container, for example by the fourcc system, which makes interoperability very hard


changing a fourcc doesnt help anything, you can easily set the DivX decoder up so it decodes XviD. maybe he has one of those XviDs that is incompatible with his standalone player and therefore needs to re-encode. it would be useful if The Other One told us why he is re-encoding.

Originally posted by bond
still again the avi container cant handle vbr audio on its own, which means there is a hack needed to be able to place vbr mp3 in avi, a hack which only virtualdubmod and nandub support

don't forget AVImux GUI and moreover, all players that i know off play it too :) (unless you make some really weird VBR encodes)

The Other One
21st May 2004, 08:55
Thx for the answers.

changing a fourcc doesnt help anything, you can easily set the DivX decoder up so it decodes XviD. maybe he has one of those XviDs that is incompatible with his standalone player and therefore needs to re-encode. it would be useful if The Other One told us why he is re-encoding.
I changed the fourcc but, like youwrote, it had no effect. You guessed right, my standalone won't play the "new" Xvid codec.

get yourself a copy of the audio, then reencode without it in vdubmod and add the audio back in. did you try that?
I opened the file in VDub (no Mod), saved the audio as .wav-file, reencoded the video, and muxed in Nandub, but it was out of sync. But i don`t know if i choosed to rewrite the header or not. I'll try so with VDubMod.

Have you tried direct stream copy on both video and audio in nandub?
But then my file won't change at all, i'd just copy it. Am I Wrong? But i can try and post here.

@Quality:
I was worrying about the Quality of the reencoded file too, but the XVid is a hdtv-capture, and the reencoded file ist still showing a better quality than my cable-tv at home.

cu
The Other One

bond
21st May 2004, 09:08
Originally posted by The Other One
I changed the fourcc but, like youwrote, it had no effect. You guessed right, my standalone won't play the "new" Xvid codec.what does "wont play" mean? it doesnt play it at all, or choppy or...?
and the next question is: what standalone do you have? what chip does it use?

I opened the file in VDub (no Mod), saved the audio as .wav-file, reencoded the video, and muxed in Nandub, but it was out of sync. But i don`t know if i choosed to rewrite the header or not. I'll try so with VDubMod.as i said reencoding vbr audio to cbr or so doesnt make sense, people have to understand what vbr means, its variable bitrate, not something like variable framerate, which could cause problems when used in crappy containers like avi
and the second thing i said is that virtualdub doesnt handle vbr mp3, so why are you making your life hard with insisting on using it? ;)

all you need is virtualdubmod (it uses the code from nandub, therefore its all you need)

The Other One
21st May 2004, 10:22
I got it!

I demuxed the video with VDubMod, re-encoded the video with VDub and muxed with Nandub. just a matter of "what program at which step"...
Now i just have to reproduce the result with the other episodes.

Thx to all of you and greetings from munich

stephanV
21st May 2004, 10:31
Originally posted by The Other One
I got it!

I demuxed the video with VDubMod, re-encoded the video with VDub and muxed with Nandub. just a matter of "what program at which step"...
Now i just have to reproduce the result with the other episodes.


thats 2 programs too much :)

open the file in VDM, press 'no' when asked to re-write to CBR, then choose your divx settings, set video to "fast recompress" (important!) and encode!

sounds easier no? to optimise speed you could also disable the audio in the 1st pass (if you use 2 passes)

bond
21st May 2004, 10:31
Originally posted by The Other One
I demuxed the video with VDubMod, re-encoded the video with VDub and muxed with Nandub. just a matter of "what program at which step"...ok i will try it one more time:
virtualdubmod can do everything virtualdub and nandub can do, therefore all you need is virtualdubmod ;)

The Other One
21st May 2004, 20:36
@bond
sorry, i missed your first reply. won't play means that the player counts the seconds in three-seconds-steps without picture and after some time stops doing this.
the player is a centrum gemini 332 from netonnet(swedish). i don't know the chip it uses but i can find out if you are interested.
i was describing what i did before i opened this thread. sorry for the unclear description (must be the language barrier).
slowly i start understanding vdubMod:rolleyes:

@stephanV
i tried the way you described but vdubmod crashes while reecoding (no matter if full processing, normal- or fast reencode) with some memory access failure error.

perhaps i will find a way to make it run on my other machine...

GoaTrancer
21st May 2004, 22:38
Uhh, not being able to use Fast Recompress is a Bad Thing(tm) !
In most cases it means you can bypass colorspace conversion (if the source is YV12 or something like that I think, and most DivX and XviD is YV12), therefore losing less quality ! The Full Processing Mode might sound like a better quality thing for a n00b but, its Very Evil(tm) !!!! (because it converts the colorspace to RGB something and then the encoders converts to YV12 or something else, just enough colorspace conversion to loose some quality)

stephanV
21st May 2004, 22:53
AFAIK DivX and XviD always use yv12 as internal colorspace. the bright side is, since 1.5.6 normal VDub supports yv12 too wirh fast recompress IIRC. so if VDubMOd crashes, that can be used as back up for encoding.

vijv
22nd May 2004, 12:17
what happens if you demux an mp3 that has a delay. how do you know the delay when you are going to remux it? also how do you read the delay for an ogm?