Video Conversion tool under Linux

Source: Internet
Author: User

First of all, of course, you need to install the FFmpeg software package, which can be installed directly from the source! However, after I install it, I cannot successfully execute the conversion commands that I need to perform later, so I can only re-compile the ffmpeg from the source code:

(1) Download FFmpeg source package, note that the version should not be too high, should be with directly from the source installed version of the very best; I just started the version is relatively high, the compile-time hint that there is a compilation option can not find, I did not search the Internet results, so can only lower the version, And finally, the ffmpeg-0.4.9-p20050906.tbz! was used.

(2) Refer to the document HTTPS://WIKI.UBUNTU.COM/FFMPEG to compile the installation, there may be many errors when compiling, but mostly because some header files can not be found, so directly from the source to install the package to provide these header files (tips, You can search for the header file directly in the source *.h remove the suffix. The name of H * can, generally need to install its corresponding *-DEV package)!

After the installation is complete, the transcoding operation is possible:

(1) for ordinary avi video files, you can use the command directly:
Ffmpeg-y-i "Tt.avi"-vcodec xvid-s 400x240-r 29.97-b 1500-acodec aac-ac 2-ar 48000-ab 128-vol 200-f mp4 "TT.M P4 "

The parameters are explained as follows:

-y overwrites the output file, that is, if the Tt.mp4 file already exists, overwrite it without prompting
-I "Tt.avi" input file name, you can modify the path and name
-VCODEC XviD compressed video using XviD encoding, can not be changed
-S 400x240 output resolution, note that the source must be 16:9 or it will deform
-R 29.97 Frames (typically 25 is available)
-B 1500 video data traffic, using-B XXX to indicate the use of fixed code rate, the number can be changed; You can also use dynamic bitrate such as:-qscale 4 and-qscale 6,4 of the mass ratio of 6 high (800 is generally available, otherwise the file will be very large)
-acodec AAC Audio codec with AAC
-AC 2 channel number 1 or 2
-ar 48000 Sound Sampling frequency
-AB 128 audio Data traffic, 32, 64, 96, 128 are generally selected
-vol 200 200% volume, can be changed (if the source file sound is very small, can be increased 10 to 20 times times (1000%~2000%), I tried, the effect is OK! But not too big, 200,000% I have tried, but the noise is too loud)
-F MP4 Output MP4 format
"Tt.mp4" Output file name, you can also modify the path and name

As for how the values of these parameters are obtained, it depends on your playback device (MP4,PSP, phone, etc.)! Just buy the playback device, there will definitely be preset some video files, by looking at these presets to get your playback device support video Parameters! The simplest way to do this is to open a preset video file under Windows with Storm video or KMP player (KMP is more detailed than Storm Audio), and then you can get all the parameters you need by looking at the properties!

(2) for video formats such as WMV9,RM,RMVB, ffmpeg cannot be resolved, but can be achieved by two conversions:
First convert it to AVI format using mencoder:
MEncoder TT.RMVB-OVC LAVC-OAC Mp3lame-o Tt.avi
Then use the command in (1) to convert the AVI file!

Parameter description:

TT.RMVB input file (you can modify the path and name)
-OVC LAVC Video encoding format (MP4 video)
-OAC mp3lame Audio encoding format (MP3 audio)
-O Tt.avi output file (you can modify the path and name yourself)

MEncoder is installed with the MPlayer, installed MPlayer, the system will certainly have mencoder! MEncoder and FFmpeg seem to have Windows edition!
MEncoder function is also very powerful, as for why not mencoder one-time conversion in place? I'm still taking the time to study the problem because it's more complex to use, and I haven't tried it yet!

As for the other video file formats, I do not use much, so I have not tested, but should be able to use (1) in the command to be done!

In this way, your favorite movie will be able to shadow with you!

Add one point:

I personally prefer a single video file, so if a video file is divided into two, it can also be merged via MEncoder (as if it only supports AVI video format merging)!

If there are two rmvb files Cd1.rmvb and cd2.rmvb, anyway, it is necessary to convert to AVI format, then after conversion to AVI, you can pass the command:
MEncoder T1.avi T2.AVI-OVC COPY-OAC copy-o All.avi
Merge the split files, merge them, and convert them to MP4! The main is to see personal hobbies!

Parameter description:

T1.avi T2.avi Input file (you can modify the path and name, you can also more, space apart, note the order, and the stream of these input files also need to be consistent)
-OVC copy means that the video encoding format is not changed (because it is merged instead of converted, so there is no need to change)
-OAC copy means the audio encoding format is the same (IBID.)
-O Tt.avi output file (can modify the path and name, in the order of input files to connect)

Video Conversion tool under Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.