You are here
Video editing with avidemux and audacity
Not too long ago I explored free software video editing tools for a video demo production I was working on. I was finding it impossible to shoot the whole video in one take without major goofs in a reasonable amount of time while also narrating what I was doing. As usual, I was having trouble because I was trying to do too many things at once, without willing to compromise on quality. When I realized this I decided to be practical and break down my production into bite sized chunks. I'd shoot each section of the video as a separate "take", and stitch together the best cuts into a single video. Then I'd edit out the goofs, accelerate the boring parts and add narration. That was the plan anyhow.
After surveying the various free software video editing tools (most sucked) available I selected the following for my video editing toolkit:
- avidemux: for video editing and encoding/decoding
- audacity: for audio capture and editing
- ffmpeg: for complimentary transcoding (I used the latest version compiled from source)
Digital video terminology
A few basic video editing terms and definitions before we get started:
-
FPS: frames per second
-
Codec: COmpression DECompression algorithm for audio or video which can be lossy (some information lost during compression) or lossless (decompressed is bit-for-bit identical with original input).
Examples:
- video codecs:
- lossy: H.264, MP4 ASP
- lossless: HuffYuv, FFV1
- audio codecs:
- lossy; MPEG 1 audio layer 3 (MP3), AAC
- lossless: PCM (AKA WAV) FLAC
- video codecs:
-
Container format: Often confused with codecs, and sometimes even called by the same name but not the same thing. These are file formats that can contain streams of video, audio and subtitles / data.
Examples: AVI, ASF (Microsoft), MOV (quicktime), FLV (flash video)
Audio video editing tools
Best free software audio editing tool: Audacity
This was an easy one: just use Audacity. It's an excellent piece of open source software with a rich feature set that was pretty easy learn how to use - even for an audio novice like me.
If you're just doing basic voice narration and don't want to invest in a good microphone, the next best thing would be to use the noise removal and normalization plugins to clean up voice capture from a simple microphone.
Best free software video editing: Avidemux
For video editing I recommend Avidemux: again, I explored lots of programs to do this on Linux but discovered that the state of video editing on Linux to be somewhat dismal currently. Avidemux sucked the least. It won't win any usability awards but it is a simple, no-frills video editor that gets the job done.
Features:
-
playback
-
very basic video editing (delete, copy, paste)
Salient points:
- There are two markers A and B and all operations work on what's in between (including save!)
- Watch out: cut doesn't actually work like you would expect. It's equivalent to delete (you need to remember to copy first)
- When you paste a video segment it is inserted at the current cursor position.
- You can't copy paste between different video files, but you can simulate this by appending a video and then copy/cut/pasting it into the desired position.
-
encoding (easier to use and configure than ffmpeg)
- You can save the existing audio track to a separate file
- You can remove or add an audio track from an external file
-
Video filters: written as modules and sort of Unixish in how they are used. You add one filter after the other in a pipeline and configure how each will transform the video.
A source of frustration for me when I started exploring Avidemux was that it is a low level program that assumes you know exactly what you are doing and does exactly what you say, not necessarily what you mean. It doesn't coddle you.
If you're not a video/audio expert many things don't work as you would expect. For example, if you've loaded a video compressed with an infra-frame codec (I.e., a codec that saves space by calculates each frame in reference to a preceding key frame) the video cursor will move between key frames rather than between frames. Converting to a codec more suited for editing (HuffYuv) solves this problem.
By working within the limitations of this simple tool and combining the available primitives cleverly you can get pretty far though.
It's not easy as it could be but you still have it pretty good when you consider that in the old days video cutting used to be done by manually cutting and stitching together 35mm film. Or worse - magnetic tape (where you can't even see the frames). If you're interested in this bit of technological history read the Wikipedia article on "linear video editing".
I recommend experimenting extensively on short 30 second clips until you understand how to perform the operations you want.
Encoding your video for streaming over the web
If you're going to host your creation on one of the many popular streaming video sites (e.g., YouTube) upload the highest possible quality the site supports. Most sites will send your video to a transcoding pipeline, which re-encodes the video in whatever selection of formats the site supports. Re-encoding is unfortunately a lossy operation so for best results try uploading the highest possible quality.
If you're hosting the video yourself you'll most likely want to encode your file in Flash Video (FLV). Though HTML5 video may one day obsolete Flash, currently Flash Video is still the most commonly supported format.
Newer versions of Flash support H.264 as a video codec but it's a relatively new development so I encountered trouble getting avidemux to encode H.264 stream into an FLV file directly. The workaround I used was to save the video in a different container format and then use a relatively new version of FFmpeg to repackage the video into FLV:
ffmpeg -i path/to/h264-input.avi -vcodec copy path/to/h264-output.flv
Unfortunately H.264 inside Flash Video was new enough a combination that many programs on my system (e.g., vlc, avidemux) didn't support playing it back at time of writing.
One thing to keep in mind if you're thinking of hosting your own video content is that flash video doesn't play itself. You need a Flash Video player. Video hosting sites such as YouTube have their own flash players. If you're hosting your own FLVs (or testing streaming locally) you'll need to pick a Flash player first. To test the result of my video transcoding voodoo I downloaded the Longtail Flash video player and embedded my video in a local HTML file. There are many other Flash players besides Longtail though, including a few free software ones.
Video streaming sites
Of the major video sites I took a look at (e.g., YouTube, Vimeo) blip.tv seems to be the only one that allows you to bypass their transcoders and upload an FLV you encoded directly, with no loss of quality.
This allows you to encode at much higher quality if you know what you're doing and bypass lengthy waiting times waiting for your video to pass through the waiting queue for the transcoders (which can take hours on other sites - cough, Vimeo, cough).
Blip.tv also provides full control over your content, so you can delete it, edit it, monetize with advertisements (50/50 split with blip.tv), etc. They're even generous enough to let you opt your videos out of their advertisement program if you want.
Comments
Lightworks looks great!
I wish I had come across Lightworks before. It looks fantastic. Unfortunately they haven't actually open sourced it yet, just declared their intention to do some in the undefined future.
Pages
Add new comment