Note: This answer was posted before FFmpeg gained the capability to do chroma keying. See other answers below.
Neither AVconv nor FFmpeg can currently do this - it's the one major video processing task that they cannot do.
These tools can overlay an image or video with a transparent background over another video or image - which is what that SO question you linked to wanted. However, the video with the transparent background needs to be in a video format that supports transparency (most of them don't) - I'd use qtrle (Apple's Animation codec). But they cannot do the actual chroma-keying (turning a certain colour transparent).
You could probably use a workaround involving avconv and ImageMagick, but it would be rather CPU-intensive, and I don't know how good your results would be. You would need to:
- Turn the video you want to chroma-key into individual frames with avconv
- Use ImageMagick's convert (or mogrify) tool to do the chroma-keying on each individual frame
- Stitch the frames back together with avconv & place it over the background video
You may be able to simplify the process using pipes.
To extract the frames (produces files that look like 00001.png, 00002.png, etc):
avconv -i input.mp4 %05d.png
To stitch them back together & put on top of your background video after you've run ImageMagick over them:
avconv -f image2 -r 25 -i %05d.png -i background.mp4 \
-filter_complex '[1:v][0:v]overlay[out]' \
-map [out] -c:v libx264 -crf 23 -preset veryfast output.mp4
-r 25 gives you a frame rate of 25; if you want another frame rate, just use a different number. Make sure you use the same frame rate as the original input video. If you want to take the audio from your original input, use
avconv -f image2 -r 25 -i %05d.png -i background.mp4 -i input.mp4 \
-filter_complex '[1:v][0:v]overlay[out]' \
-map [out] -map 2:a -c:v libx264 -crf 23 -preset veryfast -c:a copy output.mp4
Note that some versions of AVconv (like the version in the Ubuntu repos) don't have support for filtergraphs. If that's the case for you, upgrade to a newer version of avconv or ffmpeg.
As for stage 2... I'm actually not sure how to do it, but I know that ImageMagick can do chroma-keying. Here are a few links you may find useful:
http://www.imagemagick.org/Usage/photos/#chroma_key
http://www.imagemagick.org/discourse-server/viewtopic.php?t=14394
http://tech.natemurray.com/2007/12/convert-white-to-transparent.html
Due to differences in lighting etc between the samples people will give you, you'll have to use something to detect the exact shades of blue to get rid of. You'll probably have to leave that up to your users, perhaps using ffmpeg to create a thumbnail, and then using an eyedropper to choose the background colour.