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)