Ubuntu Video conversion (use of Avconv)

Source: Internet
Author: User

1. Installation

sudo apt-get install ffmpeg libav-tools

2. Basic operation

Avconv [Options] [[infile Options]-i infile] [[outfile options] outfile]

e.g.:

Avconv-i GOPR7617. Mp4-qscale:v 2 Gopr7617-converted.ogg

-I is followed by the input file-qscale:v 2 is video quality (values from 1 to 31, 1 for best quality, 31 for the worst quality)

3. Other parameters

-R 30: representing frame rate 30

-c:v Mpeg2video represents the video encoder for Mpeg2video

-c:a MP2 represents the audio encoder for MP2

4. Specific examples

4.1 Video conversion to picture sequence

avconv-i [INPUT] Save_dir/%04d.png

%04D indicates that the resulting picture sequence is represented by a four-digit number

4.2 Cutting Video

If you want to cut a video, the time from 2 minutes 50 seconds to 3 minutes 50 seconds, you can execute the following command:

Avconv-i input.avi-ss 00:02:50-t 00:03:50-codec copy Output.avi

Where-codec copy means copying the original video's parameters

4.3 Batch processing

For i in *.avi; Do avconv-i "$i" [OUTPUT SETTINGS] $ (basename "$i" ". AVI "). mp4; Done

4.4 Recording Screen

Avconv-f x11grab-r 30-s 1920x1080-i: 0.0-vcodec libx264-threads 4 Your_output.avi

Parameter explanation:

-F X11grab means capturing video from X server

-R 30 stands for frame rate

-S 1920x1080 screen resolution

-i:0.0 says where you want to start your recording.

-vcodec libx264 means video encoder

-threads 4 Indicates the number of processes used

In addition, FFmpeg usage is similar

Reference Link: https://www.labnol.org/internet/useful-ffmpeg-commands/28490/

Ubuntu Video conversion (use of Avconv)

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.