FFmpeg is an open source and free software for managing video, audio, and other multimedia files and streams on Linux and Unix-like systems. One can use ffmpeg command for transcoding, video editing, scaling, and much more. This page shows how to install ffmpeg on Fedora Linux using dnf command-line options.

 

Install FFmpeg on Fedora Linux 28/29

The procedure to enable and install FFmeg on Fedora is as follows:

  • Enable and configure RPM Fusion repo using the dnf
  • Install FFmpeg in Fedora Linux, run: sudo dnf install ffmpeg
  • To upgrade FFmpeg on Fedora, run: sudo dnf upgrade ffmpeg
  • Test ffmpeg command on Fedora

 

Let us see all commands and examples in details.

 

How to configure RPM Fusion repo on Fedora Linux

RPM Fusion is a software repository that gives additional packages for the Fedora, RHEL and CentOS Linux. Open the terminal application. Type the following dnf command to enable RPM Fusion repo:

$ sudo dnf install \
https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

 

Just run:

$ sudo dnf update

 

Now we have a repo configured and working. Verify that ffmpeg available for installation on Fedora:

$ dnf search ffmpeg

 

And:

$ dnf info ffmpeg

 

Fedora Linux install FFmpeg

 

Install ffmpeg using dnf command as follows:

$ sudo dnf install ffmpeg

 

Verify FFmpeg installation

 

Simply run the following command:

ffmpeg
ffmpeg -h
ffmpeg -version

 

Sample outputs:

ffmpeg version 4.0.3 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 8 (GCC)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-indev=jack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
libavutil      56. 14.100 / 56. 14.100
libavcodec     58. 18.100 / 58. 18.100
libavformat    58. 12.100 / 58. 12.100
libavdevice    58.  3.100 / 58.  3.100
libavfilter     7. 16.100 /  7. 16.100
libavresample   4.  0.  0 /  4.  0.  0
libswscale      5.  1.100 /  5.  1.100
libswresample   3.  1.100 /  3.  1.100
libpostproc    55.  1.100 / 55.  1.100

 

How do I use ffmpeg command on Fedora Linux

 

The basic syntax is:

ffmpeg -i input.file output.file
ffmpeg [input_options] -i input.file output.file
ffmpeg [input_options] -i input.file [output_options] output.file

 

Say you have a PNG file and want it converted into a JPG file, run:

ffmpeg -i input.png output.png
ls -l input.png output.png
xdg-open output.png

 

In this example, convert an MP3 file and into an OGG file:

ffmpeg -i music.mp3 music.ogg

 

Next, convert an MP4 video to a GIF or WEBM format:

ffmpeg -i clip.mp4 video.gif

OR

ffmpeg -i clip.mp4 video.webm

 

Conclusion

That was a quick introduction on how to install and use ffmpeg on Fedora Linux. The ffmpeg has many more options, see -h option to get full help or, even better, run the following man command:

$ man ffmpeg
$ ffmpeg -h

 

Byla tato odpověď nápomocná? 0 Uživatelům pomohlo (0 Hlasů)