View Full Version : encoding with divx 5.0.3 best quality with a 45 min movie within 350 megs
DvdKhl
10th February 2003, 20:29
Hi
I have a movie with 45 min 1 audio stream
i want a file under or equal 350 mb
so multi pass is not needed. or is it?
I used the following progs:
Smartripper
FlaskMpeg 0.78.39
Divx 5.0.3
Mp3 codec
The divx prefs i used:
Bitrate: 1536 kbits/s max br: 15360 kbits/s
one pass
change treshold 50 %
qantizer default
keyframe every 50 frames
Qpel
GMC
no crop, resizing, preprocessing, deinterlace
Flask 0.78.39 prefs:
time base 25 pal
deinterlace 20
blend instead interpolate
resize 384x288 (16:9) HQ Bicubic
Reference iDCT
Keep aspect ratio 16:9
1: so now my question is how can i get the best quality within 350 mb?
2: what progs do you use?
3: what about Qpel, GMC and B-Frames?
4: what is change treshold in the divx prefs?
5: what about the quantizer? what would be the best setting for the best quality?
6: what about the quant in one pass?
7: would provide 2 pass better quality?
thx DvdKhl
Hiro2k
10th February 2003, 22:39
1)Depends on what filters you use
2)I use gknot to calculate my bitrate for a 2pass encode, also I use it to give me a compressability test.
3)I don't know if they have fixed Qpel or GMC in the new version but deffinately stick with B-Frames.
4)I don't know, i always used the default threshold
5)I set min 2, max 18
6)I couldn't tell you without more info on the movie, but you should try a pass with a low quantizer like 3 or 4 to see how the size is affected.
7)2 pass would allow the decoder to change the quantizer depending on the frame
bkam
11th February 2003, 18:37
1. Depends totally on how compressible your movie is. For DivX, 1536 kbps is higher than average, but if you have an extraordinarily uncompressible movie then it still might not result in good quality. One of the best ways to figure this out is with Gknot's compressibility check or jonny's DivX5Enc.
2. Use the Gknot suite with or without jonny's prog.
3. Seems the general consensus is no QPel, no GMC, yes B-Frames. However, if you want absolutely best quality and have a movie that compresses well, disable B-Frames also.
4. Scene change threshold sets how much of a change between two frames there has to be to insert a keyframe afaik. Sometimes I lower this if I want to make sure I have a good place to split to two CDs (to 45% usually). This is as much as I know, and even that could be wrong.
5. Quantizers are really what determine your quality. The higher a quantizer in a frame, the more visual information is thrown out. So a quantizer of 31 is terrible, a quantizer of 2 is as perfect as DivX gets. In my opinion, a final average quantizer of right around 2.5 looks good. Note that in the analyze.log it's calculated wrongly, use jonny's DivX5Enc to get a real value. @Hiro2k: IMO 18 is much too high of a quantizer. I usually set the max quantizer depending on my compressibility tests, if I get over 80% I usually set the max quantizer to 4 so I don't get an undersized movie, if I have like over 70% I might do 6, over 60% I might do 8. I don't normally encode under 60%.
6&7. Since you seem to want to hit 350megs, 1-pass quality based mode is probably useless for you. If your movie is very compressible and 1536kbps is way too much, then you can possibly get closer to 350 megs with better quality by using this mode. If you try this and get way over 350 mb, then 2pass is the way to go. By the way, jonny's DivX5Enc, again, has a great tool for predicting final size.
You can get gknot from the download section of this site, and Jonny's prog from here (http://jonny.leffe.dnsalias.com/). Note that I am experienced in 5.02 I'm not sure how much has changed since I haven't had time to play with the new one.
Hiro2k
13th February 2003, 00:10
Originally posted by bkam
@Hiro2k: IMO 18 is much too high of a quantizer. I usually set the max quantizer depending on my compressibility tests, if I get over 80% I usually set the max quantizer to 4 so I don't get an undersized movie, if I have like over 70% I might do 6, over 60% I might do 8. I don't normally encode under 60%.
That 18 was a typo it was supposed to be an 8 Sorry. But your are correct. I don't like going over 8 although in credits im not against using quant 35 :)
bkam
13th February 2003, 00:32
I concur, also with BilinearResize and TemporalSmoother(10) :)
OvERaCiD23
13th February 2003, 00:47
Originally posted by DvdKhl
The divx prefs i used:
Bitrate: 1536 kbits/s max br: 15360 kbits/s
one pass
change treshold 50 %
qantizer default
keyframe every 50 frames
Qpel
GMC
no crop, resizing, preprocessing, deinterlace
Quite a few things wrong here. If you're going for a desired file size, use 2-pass mode. It takes all the bits you allocate to video and distributes them evenly, ensuring constant quality throughout the video. 1-pass mode simply takes the bitrate you specify and uses it consistently throughout the video; it does not take into account low or high motion scenes, thus the quality will be inconsistent. Having a keyframe every 50 frames is overkill; that means, even 2 seconds, a keyframe is being used. A keyframe takes up much more space than the regular frame (sorry, can't rememeber all the I,P, & B frame stuff). Basically, it's degrading quality since you're shooting for a desired size, and giving much of the bitrate to keyframes. A good keyframe interval is 200-300 frames. QPel and GMC do not aid compression, they simply introduce artifacts and/or bugs. I would stay the heck away from those. B-frames should be implemented, as they improve compression by ~20%. As for the scene change threshold, I use ~40%, as this gives good options for splitting the movie onto 2 CDs. 50% just never seems to get the changes right.
Since you're not resizing, I can't recommend a different resize algorithm. However, you might want to stop using Flask, as well, basically, it's horrible. Try out Gordian Knot, and be amazed at the quality difference. You can also implement different noise filters to make the movie more compressible (via AviSynth, if you switch to the Goridan Knot package ~~~> since you're still using Flask, I assume you won't be doing all the AviSynth/VirtualDub manually). Convolution3D and FluxSmooth are two of my favorites, as they remove alot of noise and don't noticeably blur the picture.
As for the audio, use BeSweet to transcode the audio. For 1 CD (or in your case, 350mb), use 128kbps (don't go under for MP3, quality is not too great). You could also use Vorbis audio; however, it's not as popular as MP3 and does require additional filters for playback (it is a better codec, but it's really a personal preference).
So, in summation, change to Gordian Knot. Use 2-pass mode if you're going for a desired filesize; if not, use 1-pass Quality Based Quantizer=2 (this yields maximum quality from the codec). Leave the DivX settings at default, or try the ones I mentioned. Do not use GMC or QPel, only B-frames. Possibly read into some AviSynth filters for aided compression; they can really make a difference. Oh yes, don't use any internal DivX5 filters (resize, noise, deinterlace). They are not of very high quality in comparison to the ones used in AviSynth. Hope this helps.
LeonMcNichol
13th February 2003, 01:13
I've been doing a lot of 45-50 minute OAV episodes of anime lately to the size you wanted. (350mbs) I've been doing 2 audio streams as well as soft subs. (OGM of course.) I use Gordian Knot to calculate the bitrate and keeping my movie within the 512x384 (4:3) size. I use bilinear resize and no filters (except for decomb to IVTC to 23.976, which you would do if your source isn't film). I always encode the audio first to calculate a better bitrate. I do 2@64kbps OGG so 1@128kbps will equal about the same. I check ac3 as audio source for overhead, when it comes to ogm, it gives about the right overhead number. I leave the codec to it's default, 'cept, I lower the keyframe interval to 125 (300 gets kind of grainy) and I turn off b-frames for divx5.0.3, because it gives artifacts in frames. (bug) I always do 2 pass encoding in virtualdub and lately I've been doing 5 passes for my encoding.
So for you, since it's a 16:9, I'd go for 512x288 size (might be able to go a little larger, since it's less area than v384) with bilinear resize. 128kbps audio. Leave the codec to default, 'cept lower keyframes and turn off b-frames. Use forced film in dvd2avi if your movie is film otherwise, IVTC it. (This of course is if your movie is NTSC and not PAL. I've never worked with PAL.)
MediaMage
14th February 2003, 00:02
divx5enc 1.11 from johnny
yv12, 4 pass divx.. and there you go
also take good care of deinterlacing your material and even using some noise filters
(some anime freaks like me use filters alot)
got great results when using some filters on futurama episodes.. episode: 20 minute.. encoding time: 2 hours..
BUT the result looked better than the dvd
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.