Whats the best bitrate for compressing my videos in xvid?

Discussion in 'General Off-Topic Chat' started by test84, Apr 9, 2009.

  1. test84
    OP

    Member test84 GBAtemp's last ninja 2.

    Joined:
    Sep 8, 2006
    Messages:
    3,685
    Location:
    Iran, Tehran.
    Country:
    Iran
    Hi,

    I have some home videos which are:

    320 x 240
    30 fps
    data rate ~5900

    I think they are standard VCD.

    I want to compress them to xvid but I'm lost for optimal bitrate of quality and size, I tried 1500 and 800 but hence I couldnt tell the difference, I was scared to lose any quality that would be visible otherwise.

    Thanks in advance.

    p.s. for audio I'm using LAME Mp3 of 128 kbps, that would suffice.
     
  2. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,738
    Country:
    United Kingdom
    320 x 240 - a bit for my liking but if that is what you are working with so be it.
    30 fps - I do not know how/where they were made and could say without looking but Iran used PAL or SECAM for the longest time which run at 25 FPS which usually means some form of frame rate change occurred. Generally this would be a pulldown of some form which I would be inclined to reverse.

    data rate ~5900
    Standard VCD would make them MPEG1 and even at that low a resolution that existing rate probably caused some blocking and other fun artifacts. I only mention this as any extra subsequent encoding will have to account for it (blocking makes for a fairly radical shift in the picture which means the new encoder will have to up the bitrate for that section to account for it).

    To answer your question there is no real optimal data rate (action takes more space to encode well, "talking heads" far less), you appear to want quality though without much regard for size so can I instead suggest quantising instead (might be called CQ or constant quant something like that).
    http://www.100fps.com/divx_quantizer_0_to_100_100.htm (to get an idea, pay no attention to the percentages as low numbers are higher quality (runs from 2.0 to 31 by standard) for the xvid options). I suggest finding a nice high action section if there is one and testing it out with different rates.

    As for the audio for plain voices and the like then it will be OK, music not so much. MP2 audio is actually pretty good when you get to the higher bitrates and VCD rubs shoulders with them.

    A final thing, I occasionally do get called in to fix up home videos. While you can just encode you might want to fix things up a bit, this means getting into video properly and understanding some of the underlying ideas behind video encoding theory.
    It also means you can do things that you otherwise could not do in real time on anything less than a monster computer.
    If you are interested in this sort of thing I can run you through it, if you want to do some reading beforehand I suggest anime encoding websites as anime is some of the nastiest stuff to encode and the good people there really know their game.
    Something like this is a good start:
    http://www.techimo.com/articles/index.pl?photo=35

    It will all involve avisynth at some stage, if you do want serious filters then
    http://forum.doom9.org/forumdisplay.php?s=...mp;daysprune=-1
    and
    http://forum.doom9.org/forumdisplay.php?s=...mp;daysprune=-1
     
  3. Linkiboy

    Member Linkiboy GBAtemp Testing Area

    Joined:
    May 14, 2006
    Messages:
    4,888
    Country:
    United States
    At 320x240, you're not gonna see (too much) quality gain with 600kbps bitrate and more.
     
  4. test84
    OP

    Member test84 GBAtemp's last ninja 2.

    Joined:
    Sep 8, 2006
    Messages:
    3,685
    Location:
    Iran, Tehran.
    Country:
    Iran
    Thanks, I used 800, even though it has differences with 1500.
    Where is quantizing section in xvid options? where can I learn about it?
     
  5. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,738
    Country:
    United Kingdom
    I tend to use the xvid options of megui, avidemux or on rare occasion the xvid options of FFDShow's encoder if I am using xvid and I have no idea which encoder/frontend you are using, common names are CQ, percentage quality, constant quant or something similar, quality. You may have to switch from two pass or CBR to find it.
    Some links anyway:
    http://www.geocities.com/atreya2011/Xvid-F...-04-03-2004.pdf
    http://forum.doom9.org/forumdisplay.php?f=52

    As for more you will have to be wary when searching, quant is also a term used in quantisation matrices* (different parts of the picture are encoded at different levels of quality if it is necessary, to make one generally requires knowledge of psychology, video compression theory from the ground up and can vary between videos so stick with what you can find at first), input paremeters for encoders (as well as matrices you can also set max/min, average for varying frame types and more).

    *many slightly older standalone encoders will not support custom matrices for whatever reason, hence the scene rule. Most newer players and computers will have no problem though so grab them if a much anticipated release gets nuked for it as you can more than likely use it without issue.
     

Share This Page