Compressing with Avidemux

Avidemux [wiki] is a free video cutting program for Linux, Mac and Windows [download] - available as 32bit and 64bit application. Its functionality is similar to VirtualDub/VirtualDubMod just with more formats support and built-in en-/decoding filters, at least for the Windows' version.

It's by far not flawless and not always stable handling H.264 videostreams when importing MP4, MKV, MOV, FLV. However it is easy to set up for compressing Fraps AVI material to the popular MP4 container containing a H.264 video- and AAC audiostream. Same can be done to other formats but if no valid reasons given MPEG-4 AVC* would be the first choice format.

*Keep in mind that MPEG-4 AVC is the exact same as H.264, and x264 is just an encoder for it - same as XviD is just an encoder for the MPEG-4 ASP standard.
_______________________________________________________________
  1. Load the first file in Avidemux
  2. Append the rest, file by file
  3. Set videostream to MPEG-4 AVC
  4. Config its settings, the only important option you need to alter is encoding method. Set it to CRF (constant rate factor - for a constant video quality) and play with its value. I use 26 for stuff I want to play on my tv. If I upload something to YouTube I use 20. That creates a much larger file with of course much better quality and I only do that because YT re-compresses any uploaded video which means the quality of video and audio will suffer a second time (or even a third time if you don't record your Frapsvideos lossless). I think BluRay quality would be around 18.
  5. Set audiostream to AAC (Faac).
  6. Config its settings. 128 kb/s is enough. I think it's even its standard setting, so you can actually skip this step and not bother with the configuration.
  7. Set container to MP4, save and you're done.
When saving files in Avidemux you need to append the file extension (mp4 in this case). The program won't do it. If you forget no worries as long as you remember what extension the file should have you can add it later via renaming the file in your explorer window.
_______________________________________________________________

If you rather want an AVI file you can choose MPEG-4 ASP for video (a quantizer of 4 does good quality) and MP3 for audio (128 kb/s as usual). Set container to AVI.
Remember that AVC creates a better quality than ASP. But for compatibility issues with old non-avc-supporting hardware a MPEG-4 AVI sometimes cannot be avoided. Don't pack AVC in an AVI container.
_______________________________________________________________

If you have a surround sound and compress to a format that doesn't support this you need to use the stereo-/monomixer from the audio filters before saving. If you forget Avidemux will remember you with an error ;)
_______________________________________________________________

The program comes with filters for cropping (e.g. black borders) resizing, flipping and all the sort. Such filters can only be applied when you want to (re)compress the video.
Avidemux can be used to copystream its content to different containers too. This has nothing to do with Fraps videos - but you could transmux* YouTube FLV files into a MP4 or MKV container without wasting time and quality for encoding.
*transmux = transmultiplexing = pack/copy the unchanged video- and audiostream in a different container (file extension).

Unlike VirtualDub Avidemux has no option to autoload linked clips. It also doesn't offer batch-converting, just a job list like VD.

When loading large files its playback may be choppy which makes cutting a file impossible - however these playback lags won't have an effect on the encoded result.

You can also use it to save the audio from a file. Streamed as a copy or compressed as MP3, AC3, AAC, MP2 or PCM (uncompressed). As with videos you need to add the extension yourself. Audio > Save audio (for compressing you need to set up the audio codec before). I often save songs recorded with Fraps from games or browser that way ^^

Excuse my English, it's not my native language.
 

raffriff

Moderator
Staff member
Site Contributor
Nice work. Thank you for taking the time to post this. I've been experimenting with Avidemux, but since I'm used to VirtualDub I mostly use that. For someone new to both programs, Avidemux might be easier to learn. Your post gives specific instructions for Fraps users, which is much needed. Most tutorials for Avidemux (and all similar programs including V-dub) focus on DVD ripping and the like.

thoughts and questions:
  • I like the "Dynamic Range Compression" feature under Audio->Filters.
  • Any way to mix in a music track? (besides export to Audacity & re-import)
  • Can I add a bitmap overlay for a logo or opening title, etc?
  • Are there additional plugins available? I tried Google but all the hits are Linux related.
  • What is the "External" video filter?
  • I have to say the filter "preview" feature is clumsy (adjust, open/close preview, repeat...)
  • Can I save all my filter settings for future videos?
some comments on your post:

>> x264 encoder settings:
I agree, but I'll add something - make these changes for much faster encoding:
General: Frametype Lookahead=10​
Motion: Motion Estimation slider=1; Weighted Prediction=1 (Weighted References)​
Frame: Maximum Reference Frames=2; Maximum Consecutive B-Frames=2​
Analysis: Mixed References=off​
Advanced 2: Enforce Repeatability=off​
This is equivalent to the "veryfast" preset in other x264 installations. Encoding goes twice as fast, but file size is 5-10% larger.

>> Unlike VirtualDub Avidemux has no option to autoload linked clips
Yes that is unfortunate. Try this "FrapsJoin" script, which renames the files with serial numbers - and has the option to automatically generate Avidemux project (*.js) files.

>> you could transmux* YouTube FLV files into a MP4 or MKV container
Cool trick!
 
Top