Quick Encoding Guide/Intro

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • [USAC]S|Cpl.TinFoil
    Member
    • Nov 2007
    • 136

    #1

    Quick Encoding Guide/Intro

    Alright, since seeing people doing unnecessary 3 hour uploads on videos, I pity the fools. So, here's a little guide to compressing hugeass videos inside little AVIs! Although I despise WMVs, they work just as well (but way too damn slow to encode) as a good Xvid video.

    So here TinFoil explains how to turn this, a 640x360 video recorded in FRAPS (half-size, 25 FPS - eg: NTSC/Euro TV resolution and framerate)


    into this, encoded into Xvid.


    or this, encoded into h264.


    Applications and Codecs

    Applications Used
    meGUI: http://sourceforge.net/project/showf...roup_id=156112
    Avisynth 2.5: http://sourceforge.net/project/showf...group_id=57023

    Codecs
    ffdshow-tryouts (stable): http://sourceforge.net/project/showf...roup_id=173941
    Everything's in ffdshow. Seriously. Just use it.


    The Procedure

    1. First off, edit your video with the thingy of your choice, whether it be Avisynth (GODLY), Virtualdub (common sense editing), Adobe Premiere/After Effects (money out ze arse), or Windows Movie Maker (lrn2edit).

    2. Just run the Avisynth, meGUI and ffdshow setups IN THAT ORDER. Import and download EVERYTHING for meGUI. Restart your computer if needed.

    3. Make a file on your desktop named video.avs and open it with Notepad/Wordpad/Notepad++/nano/gedit...
    4. Inside, put in
    DirectShowSource("C:\This\Is\The\Directory\Of Your Video\This Also Supports Spaces\video.video")
    This can be anything you can open in Windows Media Player, whether it be a .avi, .wmv, .mkv, whatever. In my case, it's
    DirectShowSource("C:\Fraps\Movies\XR_3DA 2007-10-19 18-05-34-24.avi")


    5. Open meGUI! Now select everything for update. It'll take a few.
    6. Press the "..." next to "AviSynth Script" on the page you pop up on. Find your avisynth script.
    7. Edit the "Video Output" to your preference. This is where it goes after it's done.
    8. Here's where you have to decide stuff. Should you use XviD or x264?
    - Youtube, fast encoding speed, and everybody that doesn't know indepth video with XviD, - or for the smallest size, slow encoding speed, and highest quality possible with H264? Here's a link for you to look at.


    9. Did you want XviD? If so, click on this. Did you select h264? If so, click on this instead.
    10. Alright, here's that hard part. What bitrate? Press Ctrl+B. Now, follow the substeps.
    (1) Check that everything checks out. Framerate should be... whatever it is on the video.
    (2) Pick one, filesize or bitrate. Bitrate's a bit technically inclined, so you probably shouldn't do 2b. 800-1500kb/s is “safe” for h264 and Xvid videos at 640x360, 30FPS.
    (3) AudioTrack 1: 128 on top, Type = Ogg


    11. Back? Good. Now set stuff to this picture. Select the same AVS as the video. You don't have to create a new profile if you don't want to. For the .MP3 guys, the picture is in the spoiler.

    Note: Q=1.5-2 should be good if you have a 128kbps MP3 source, or want it to have the same quality as one. 3 would be a 192kbps to 224kbps MP3.


    [spoil]
    The lower the Quality #, the higher the actual quality. Don't ask.[/spoil]
    12. Press both "Enqueue" buttons in Video and Audio.
    13. Go to the middle tab, “Queue".
    14. On the bottom right, press “Start.” Now wait util all 3 are done.

    Okay, you opened the video. Noticed there’s no sound when you remove the .ogg/mp3 from the folder? We’ll fix that now by muxing the two together

    15. Open what’s in the picture. Did you save it as an .avi? Press the AVI muxer. Save it as an .mkv/MP4? Press the MKV/MP4 muxer.


    16. In all cases, they look the same. They are all self explanatory with the text.
    "Video Input" = video file
    "Audio Input" = audio file.
    "Muxed Output" = The result video + audio file. You can delete the originals after the job's done, but make sure there aren't any errors in the muxed video.

    17. Go back to the “Queue” tab. Press start and do the muxing!

    17. Both formats are 1500kb/s. Compare and decide. Should convince ya. It's a PNG, so no bias here!


    Notes to self: rewrite the ref links. Xvid done, do H264.
  • [USAC]S|Cpl.TinFoil
    Member
    • Nov 2007
    • 136

    #2
    So you've chosen Xvid. Click the drop-down menu for Video Profile, and you'll find that there are multiple "Xvid '>xx% comp. check (HQ)' options. Here's a bit of a miniature guide for you to choose which one to use. The most important parts (ie: need instructions only) are underlined.

    How do I choose the correct preset?
    The preset names are based on a compressibility-check with Enc which should take only 10 minutes or something. Yes, that's the big setback; you have to perform this comp. check BEFORE you encode and choose your preset according to the percentage result Enc gives you. This should give you accurate 2nd-pass filesizes (in most cases...). Everything else would be a shot in the dark.

    In detail you need to do this: Start up Enc, select your .avs, choose 'compressibility check' and enter the filesize you're aiming for in kilobytes. Also you better choose the 'extended' method for the test. Then you have to configure XviD. Set it to single-pass, constant quantizer=3. Load the SixOfNine (non-VHS!) CQM and set b-frames to max=2, ratio=1.62, offset=0, ME-precision to 4, VHQ=off, Trellis=on, Turbo=on, no packed bitstream and no other switches at all. (That means, it'll go damn fast...) Then press 'start'. The result Enc gives you will be a percentage figure.

    BTW, a general hint for high quality encoding: it's a good idea to try and keep the full resolution of your source if possible. No sense in encoding 320x at the 90%-preset
    For further reading about Xvid presets and what they are, click here. (source quote is also in link)

    Think this is too hard or too complicated and would rather take longer at the actual encoding process? If so, then try the H264 Step 9 guide.

    Comment

    • [USAC]S|Cpl.TinFoil
      Member
      • Nov 2007
      • 136

      #3
      So you've chosen H264. Good man. This method is the most straightforward and returns the highest quality, but is also slow to encode. Here are the instructions for using H264 in MeGUI.



      That's it; then you're off to step 10. Want a faster encode and don't mind filesize, but take longer learning how to exactly do it? If so, try the Xvid Step 9 guide instead.

      Comment

      • M3D1C

        #4
        !!!! My head hurts...

        Comment

        • pennywise

          #5
          Nice work skid, I'll be trying this sometime.

          Comment

          Working...