User Tools

Site Tools


This is an old revision of the document!

Back to Developers Page

Some tips about video files

Usually, I have to deal with video files to make some tests, so I have decided to create this space to save all those little tips I need from time to time.

1. How to merge many video files together?

First at all, install mencoder:

  • sudo apt-get install mencoder

The command:

  • mencoder -oac copy -ovc copy test_1.avi test_2.avi testN.avi -o completeFile.avi

2. How to convert an AVI file to FLV?

I found a great post right here:

The short version:

The command:

  • ffmpeg -i input.avi -b 2028k -s 640×480 -r 30 -acodec copy output.flv

Little explanation:

 ffmpeg: the program
 -i input.avi: the input file
 -b 2028k: the output bitrate
 -s 640x480: the output resolution
 -r 30: the output frames per second
 -acodec copy: the output audio codec
 output.flv: the output file

3. How to extract audio from a video file?

The command:

  • ffmpeg -i example.avi -vn -acodec pcm_s16le -ar 44100 -ac 2 example.wav

4. How to remove audio from a video file?

The command:

  • ffmpeg -i input.flv -an -vcodec copy output.flv

Where output.flv is the video without sound.

5. How to mix a video with a sound file?

The command:

  • ffmpeg -vcodec copy -i images.mpg -i sound.mp3 output.mpg

6. More tips over here:

Back to Developers Page

video_tips.1486096754.txt.gz · Last modified: 2019/07/16 20:31 (external edit)