Otu esi etinye ma jiri FFmpeg na Ubuntu 20.04

FFmpeg bụ onye na-eduga n'efu, usoro mgbasa ozi mepere emepe, nwere ike decode, koodu, transcode, mux, demux, iyi, nzacha na igwu ihe fọrọ nke nta ka ọ bụrụ faịlụ mgbasa ozi niile emepụtara n'elu ikpo okwu ọ bụla. FFmpeg na-achịkọta ma na-agba ọsọ na Linux, Mac OS X, Microsoft Windows, BSD sistemu na Solaris.

Ị ga -ama otu esi etinye FFmpeg na Ubuntu 20.04 LTS Focal Fossa gị Sistemụ arụmọrụ na ntuziaka na-esonụ. Otu ụkpụrụ ahụ ga-arụ ọrụ maka ụdị ọhụrụ Ubuntu 21.04 (Hirsute Hippo).

Prerequisites

Lelee ma melite sistemụ arụmọrụ Ubuntu 20.04 gị.

sudo apt update && sudo apt upgrade -y

Advertisement


Wụnye FFmpeg na Ubuntu 20.04

Site na ndabara, ebe nchekwa Ubuntu nwere ngwugwu FFmpeg nke enwere ike itinye ya na njikwa ngwugwu dabara adaba. Nke a bụ usoro kachasị amasị iji wụnye ka ụdị ọhụrụ na-apụtakarị ugboro abụọ n'afọ. Ọ bụ ezie na mmepe ahụ adịghị ukwuu, a naghị ahapụ ya n'ájá dị ka ebe nchekwa ndị ọzọ.

Wụnye FFmpeg site na iji iwu a na ọdụ Ubuntu gị "CTRL + TLỌ + T. "

sudo apt install ffmpeg

Ihe atụ mmepụta:

~$ sudo apt install ffmpeg
 [sudo] password for bytesboss: 
 Reading package lists… Done
 Building dependency tree       
 Reading state information… Done
 The following additional packages will be installed:
   i965-va-driver intel-media-va-driver libaacs0 libaom0 libass9 libavcodec58
   libavdevice58 libavfilter7 libavformat58 libavresample4 libavutil56
   libbdplus0 libbluray2 libbs2b0 libchromaprint1 libcodec2-0.9 libdc1394-22
   libfftw3-double3 libflite1 libgme0 libgsm1 libigdgmm11 liblilv-0-0
   libmysofa1 libnorm1 libopenal-data libopenal1 libopenmpt0 libpgm-5.2-0
   libpostproc55 librubberband2 libsdl2-2.0-0 libserd-0-0 libshine3
   libsnappy1v5 libsndio7.0 libsord-0-0 libsratom-0-0 libssh-gcrypt-4
   libswresample3 libswscale5 libva-drm2 libva-x11-2 libva2 libvdpau1
   libvidstab1.1 libx264-155 libx265-179 libxvidcore4 libzmq5 libzvbi-common
   libzvbi0 mesa-va-drivers mesa-vdpau-drivers ocl-icd-libopencl1 va-driver-all
   vdpau-driver-all
 Suggested packages:
   ffmpeg-doc i965-va-driver-shaders libbluray-bdj libfftw3-bin libfftw3-dev
   libportaudio2 serdi sndiod sordi opencl-icd libvdpau-va-gl1
   nvidia-vdpau-driver nvidia-legacy-340xx-vdpau-driver
   nvidia-legacy-304xx-vdpau-driver
 The following NEW packages will be installed:
   ffmpeg i965-va-driver intel-media-va-driver libaacs0 libaom0 libass9
   libavcodec58 libavdevice58 libavfilter7 libavformat58 libavresample4
   libavutil56 libbdplus0 libbluray2 libbs2b0 libchromaprint1 libcodec2-0.9
   libdc1394-22 libfftw3-double3 libflite1 libgme0 libgsm1 libigdgmm11
   liblilv-0-0 libmysofa1 libnorm1 libopenal-data libopenal1 libopenmpt0
   libpgm-5.2-0 libpostproc55 librubberband2 libsdl2-2.0-0 libserd-0-0
   libshine3 libsnappy1v5 libsndio7.0 libsord-0-0 libsratom-0-0 libssh-gcrypt-4
   libswresample3 libswscale5 libva-drm2 libva-x11-2 libva2 libvdpau1
   libvidstab1.1 libx264-155 libx265-179 libxvidcore4 libzmq5 libzvbi-common
   libzvbi0 mesa-va-drivers mesa-vdpau-drivers ocl-icd-libopencl1 va-driver-all
   vdpau-driver-all
 0 upgraded, 58 newly installed, 0 to remove and 0 not upgraded.
 Need to get 45.5 MB of archives.
 After this operation, 190 MB of additional disk space will be used.
 Do you want to continue? [Y/n] 

Tinye "Y" wee gaa n'ihu na ntinye. Nke a ga-ewe ihe dị ka otu nkeji.

Na-esote, nyochaa nrụnye site na iji iwu a:

ffmpeg -version

Ihe atụ mmepụta:

~$ ffmpeg -version
 ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers
 built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)

Mara, ka oge na-aga. Nọmba ụdị gị nwere ike ịdị iche na mmepụta ihe atụ ntuziaka.

Ọ bụrụ n’ịchọrọ ịhụ nke decoders na koodu FFmpeg dị, pịnye iwu ndị a:

ffmpeg -encoders
 ffmpeg -decoders

Otu esi eji FFmpeg na Ubuntu 20.04

N'okpuru ntuziaka a ga-ekpuchi ụfọdụ ihe atụ bụ isi nke otu esi eji FFmpeg iji FFmpeg.

Isi iwu ojiji maka FFmpeg bụ nke a:

ffmpeg [global_options] {[input_file_options] -i input_url} …{[output_file_options] output_url} …

Mara, ị ga-achọ iji iwu ndị a na faịlụ ọhụrụ ọ bụla. Enweghị usoro nchekwa ruo taa.

Ọmụmaatụ Ntụgharị FFmpeg

Iji tọghata faịlụ ọdịyo na vidiyo na FFmpeg, ị ga-achọpụta na ọ dịghị mkpa ka ị kọwaa usoro ntinye na mmepụta n'iwu gị. Kama nke ahụ, a na-achọpụta usoro faịlụ ntinye na-akpaghị aka, a na-enyekwa mmepụta ya site na ndọtị faịlụ.

Tụgharịa faịlụ vidiyo site na mp4 ka ọ bụrụ webm:

ffmpeg -i existingfile.mp4 newfile.webm

Ị nwekwara ike ịgụnye faịlụ mmepụta karịa naanị 1. Ọmụmaatụ:

ffmpeg -i existingfile.wav newfile.mp3 newfile.ogg

Cheta, iji lelee ndepụta nke usoro akwadoro jiri iwu a:

ffmpeg -formats

FFmpeg wepụta ọdịyo na ihe atụ vidiyo

Ọ bụrụ na ịchọrọ wepụ ọdịyo ahụ na faịlụ vidiyo, a na-eme nke a na "-vn” ntinye.

ffmpeg -i video.mp4 -vn audio.mp3

Cheta na, nke a ga-tọghata audio na adị bit ọnụego nke mbụ video faịlụ. Iji kọwapụta ọnụego ọhụrụ, tinye otu a:

ffmpeg -i video.mp4 -vn -ab 128k audio.mp3

Ụfọdụ ihe atụ nke ọnụ ahịa ntakịrị ntakịrị bụ 96k, 128k, 192k, 256k, 320k.


Advertisement


Okwu na mmechi

FFmpeg bụ sọftụwia mgbasa ozi mara mma, ndepụta ahụ nwere ọtụtụ ihe ị nwere ike iji sọftụwia ahụ mee, naanị anyị metụrụ nhọrọ ole na ole n'ime ọtụtụ iri. Ọ bụrụ n’ịchọrọ ịmatakwu ihe FFmpeg nwere ike ime, gaa na nke ha ibe akwukwo ga-enyere gị aka na ebumnuche gị.

N'ozuzu, nke a bụ mmemme dị mfe, dị fechaa nke na-arụ ọrụ nke ọma. N'ime ule anyị, anyị enweghị nsogbu ịtụgharị faịlụ anyị, yana emere ya ngwa ngwa na nke ọma.

Ọ bụrụ na ị nwere ajụjụ, nweere onwe gị ịhapụ ikwu okwu n'okpuru.

Idenye aha
Gwa nke
6 Comments
Inline nzaghachi
Lee echiche niile

Nke a anaghị arụ ọrụ na 21.10, Impish Indri. Na-agba ọsọ ffmpeg enye ffmpeg: error while loading shared libraries: libmirclient.so.9: cannot open shared object file: No such file or directory.

Ndewo Joshua, njehie ahụ na-eme na iwu niile m nwara, ọbụlagodi ffmpeg -version. Agbalịrị m ịwụnye libmirclient9 ngwugwu, nke butere ffmpeg inye njehie gbasara akara efu. M doziri ya site n'ịrụ ngwugwu isi iyi.

Ngwa Ubuntu, desktọpụ XFCE.

Mmelite: Agbalịrị m iwepu (ụdị m wuru) wee tinyegharịa ya apt install ffmpeg; otu nsonaazụ ahụ, na-eme mkpesa banyere ọbá akwụkwọ na-efu efu. Mgbe ahụ, m gbalịrị iwepụ ọzọ na reinstall na snap install ffmpeg, na nke ugbu a ọ rụrụ ọrụ. Ya mere, apt na snap wụnye ụdị dị iche iche. Ihe aga-ebuli na ndị njikwa ngwugwu ikekwe.

6
0
Ga-ahụ n'anya gị echiche, biko okwu.x