ffmpeg
Table of Contents
FFmpeg
Vainfo
Command “vainfo” is used to see supported formats for vaapi encoding and decoding. When running vainfo, a typical output will be something like this:
ibva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/nouveau_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.17 (libva 2.12.0)
vainfo: Driver version: Mesa Gallium driver 22.3.6 for NVAC
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264Main : VAEntrypointVLD
VAProfileH264High : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
VAEntrypointEncSlice: Supports encoding
VAEntrypointVLD: Supports decoding
Compression presets
University Lectures
for i in * ffmpeg -i $i -c:a libopus -ac 1 -ar 16000 -b:a 16k -c:v libx265 -vf scale=-1:720 -r 5 -tier high -b_depth 1024 $i.mp4 end
Splitting video files
In order to combine videos in FFmpeg use the following command.
Command
ffmpeg -ss 00:00:00 -t 00:50:00 -i largefile.mp4 -acodec copy \-vcodec copy smallfile.mp4
Description of arguments
- -ss 00:00:00 : Start cut, i.e. where the output video starts
- -t 00:50:00 : End cut, i.e. where should the output video end
- -i largefile.mp4 : Input file
- smallfile.mp4 : Output file
Combining video files
In order to combine video files, they have to:
- have the same format (h264, h265, …)
- have the same framerate If the conditions above aren't fulfilled, the combined video may have corruption.
Firstly we create a file.txt which contains the list of all video file names that are going to be combined. Below is given an example of such a file:
video1.mp4 video2.mp4 video3.mp4
The next step is to issue the following command in the terminal:
fmpeg -f concat -i list.txt -c copy output.mp4
After the command has executed, the desired combined video output should be created. Enjoy!
ffmpeg.txt · Last modified: by anda