Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a seperate video and audio stream (coming from IPWebcam on an android device), and would like to multiplex (and perhaps transcode) them into a single video file, using a linux server. How can I achieve this? I've tried all manner of things with VLC, but to no avail yet.

share|improve this question

1 Answer 1

If you have FFmpeg (which can and should be compiled from source):

ffmpeg -i video.avi -i audio.wav -map 0:0 -map 1:0 -c:v copy -c:a copy output.avi

This will copy the raw bitstreams of video and audio from video.avi and audio.wav to output.avi.

If you want to transcode video and audio, just pass proper c:v and c:a parameters, e.g. for something more state of the art:

ffmpeg -i video.avi -i audio.wav -map 0:0 -map 1:0 -c:v libx264 -crf 21 -c:a libfaac output.mp4

Here, crf controls the video quality with sane values from 19 (better) to 24 (worse). AAC audio is used instead.

Read up on video conversion (with standard tools or using FFmpeg) on our blog:

share|improve this answer
    
can ffmpeg pull in http streams? The two streams are coming over the network; I'd like to merge them into a file or another stream. I guess I could always muck around with pipes... –  askvictor May 28 '12 at 11:09
    
FFmpeg can probably do it with FIFOs, but no guarantees since I've never tried it.. see here: stackoverflow.com/questions/1360797/… –  slhck May 28 '12 at 11:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.