Divx Encoding

vbimport

#1

I am not sure if this is the correct place to post this question, if not then please move it.

Ok so I have three questions:

[ol]
[li]Is there any software (or anything) which can help me extract some frames from a video (say 2% - 5% of them) to calculate the file size during Divx 1 pass quality based encoding (quantizer based), similar to something done by AVI2DVD (DVD2SVCD) in 1-pass VBR. [I have to try it with value like 2, 2.5, 3, 3.5 and 4 and that takes some time.][/li][li]Is it better to do a 2-pass encoding (using bitrate encoding) or 1-pass encoding (using quantizer). [At present I use quantizer based (by hit-and-trial) and it produced pretty good results.][/li][li]When we use psychovisual enhancements what is the difference between shaping and masking and which is better, or please give their features.[/li][/ol]


#2

honestly, i would recommend just using XviD ( http://www.free-codecs.com/Koepi_XviD_download.htm ) instead of DivX since it works just as good but it’s FREE with no BS installed in it like DivX pretty much has.

that includes the Encoder/Decoder.

but basically if your converting DVD’s (or pretty much anything with .VOB files) into XviD format i would recommend installing that along with Gordian Knot as it makes quality XviD files that way… but it’s not super easy to use but it’s what i use and it’s not exactly hard once you know some basic’s about using it.

but basically if your converting a dvd movie into xvid format and the movie is about 2 hours long… it takes me about 2 hours to convert it on my AMD Athlon 3500+ (2.2ghz , overclocked to 2409mhz) CPU.

but basically in general some advice… if converting a 2hour+ movie into XviD format i would recommend using the “2 CD’s” (i.e. 1400MB) option… if it’s around 1 hour 30min/1hour 40min or so… then in most cases a 1 CD (i.e. 700MB) will work for it.

and in general if using the 2 CD’s option i would almost always keep the original .ac3 audio file from the dvd instead of converting it to mp3… but if your doing a 700MB route… i would convert it into anywhere from 128kbps-192kbps (usually 128kbps is probably best to keep video quality as high as possible without killing audio quality) VBR MP3 … Gordian Knot does this for you :wink: )

and as for the XviD settings… the defaults are good in most cases but in general if converting a 2hour+ movie into 1400MB i usually use the MPEG setting (sharpens image)… or if 1CD usually use the ‘h.263’ setting (softens image)

if your interested in this… then i might post more details about it. if not, then ill just leave this post as is.

p.s. my primary reason for XviD is so that i can play them back on my TV using my XBox1 console running XBMC (XBox Media Center) … as you can fit between 3 to 6 movies per DVD recordable disc this way with pretty close to dvd like quality to.


#3

hello thanks for the reply. As it is I do not want to use Xvid codec, because due to some strange reason, it does not play Xvid quite well. I really fail to understand why, the screen goes black though the audio plays, even surprising is the fact that it does not even play divx 3 (5 & 6 work). So, although I appreciate it, I really can’t switch back to Xvid. (Actually in the begining I used to use Xvid). And I use divx insane quality, which takes about 2.5 hrs for 1-pass of 1 hr video (works at about 10 frames/sec). Please comment hence on using 1-pass quality based.

One more thing, if doin encoding in virtualdubmod, (I load the avs), is it better to resize the video using the avs script (lancoz) and use fast recompress, or use full recompress and use the resize filter of virtualdubmod, or please say even if there is any difference between them.


#4

XviD is prbably the best encoding method right now,and it plays on every standalone DVD player with DivX capabilities.
As for the number of passes in encoding,I think two-pass encoding is the best way to do things.


#5

As I said, my player doesn’t even seem to play Divx properly, and I do know that Divx and Xvid have nearly the same structure so can be played back on all divx machines. But I was once using Xvid and I had to switch over to Divx. the player is a low quality one of local manufacturer (though performance with DVD is very good), it even has problem in displaying divx subtitles (srt). [I had posted a question related to it on the forum but no answers received yet except the suggestion to buy a new divx player, which I am not going to.] But thanks anyway for your suggestion. And even I believe that Xvid is the best.


#6

Have you tried a bitrate calculator? ‘DivX bitrate calculator’ in Google brings up quite a few.


#7

[QUOTE=soumya1323;2127335]As I said, my player doesn’t even seem to play Divx properly, and I do know that Divx and Xvid have nearly the same structure so can be played back on all divx machines.[/QUOTE]Since you mention earlier the so-called “psycho-visual enhancements”, please check that when you make your encodings, you are [B][I]not[/I][/B] using the features of Quarter Pixel (Qpel) and Global Motion Compensation (GMC). These frequently cause problems with earlier chipsets in cheaper machines. Also don’'t use a packed bitstream for similar reasons (although this can be undone relatively easily).

Another thing: if you can find out the chipset used in your standalone player - e.g. MediaTek (MTK) - then there might be a generic firmware update to improve the performance.

Otherwise, as others have pointed out, the final solution might be to get another machine. Not being able to play XviD or DivX properly makes the current one rather useless.

BTW I am not aware that DivX certified players deliberately inhibit playback of XviD; it’s just that they’re claimed to be more compatible with DivX and allow Video-on demand (VOD) services.


#8

I think I used to use GMC and Qpel, not sure will check and tell, but most probably yes. And how to find the chipset without opening the dvd player box. There is a key combination 5-3-1-9 or 5-1-3-9 or something such which gives a page with information on it, would that tell?

As for Xvid I will try out one or two more as you told and report back, will take some time though. So for the time being please can anyone answer the second question I asked:

if doing encoding in virtualdubmod, (I load the avs), is it better to resize the video using the avs script (lancoz) and use fast recompress, or use full processing mode and use the resize filter of virtualdubmod, or please say even if there is any difference between them.


#9

I found some answers which are helping me. Posting them, would probably help someone like me.

Answer to question no 1.
Is there any process to select sample frames?

Yes, using an avs script with the code:

SelectRangeEvery(24,1,0)

add this to the avs script for selecting 1 frame for every 24 frames starting with frame 0.

basic code is:

SelectRangeEvery(every,length,offset)

Source: http://avisynth.org/mediawiki/SelectEvery


#10

Answer to another question about resizing filters. Hope it would help someone else searching the forum.

For resizing it is better to use the avs script than virtualdubmod filters, as avisynth offers many new resize filters along with the older ones.

Even for lanczos (sorry i typed lancoz earlier :o) avs offers lanczos4 which is sharper

Lanczos4Resize(width,height)

Some more option provided are Spline16, Spline36, Spline64, which are slower, more complex and sharper

Spline64Resize(width,height)

and Gauss which has sharpness control.

P.S: I have not done the test it was posted on their website.

Source: http://avisynth.org/mediawiki/Resize