Ffmpeg voor het omzetten van multimedia-bestanden
De toolkit ffmpeg
is veelgebruikte open source software om vele multimedia-formaten om te zetten, van audio to video, van populaire tot de minder bekende formaten. Het is een veelzijdige toolkit die bestaat uit meerdere componenten. Voor eenieder die een bepaald bestand wil omzetten, zal waarschijnlijk het gelijknamige programma
ffmpeg
gebruiken.
Mede door ondersteuning voor zowel Linux, macOS, als Windows, is ffmpeg een zeer populaire keuze voor het converteren van multimedia-bestanden.
Licentie
Goed om te weten is dat ffmpeg beschikbaar is onder twee verschillende licenties:
- GNU Lesser General Public License (LGPL) version 2.1 of nieuwer
- GNU General Public License (GPL) version 2 of nieuwer
De reden dat er twee verschillende licenties zijn is dat het sommige externe componenten gebruikt die onder GPL vallen. In dat geval dient ffmpeg dus ook GPL te zijn. Om die reden brengt het project verschillende versies uit. De GPL-versie zal dus wat groter zijn, aangezien er meer externe componenten in zitten.
Ondersteunde formaten
Ffmpeg ondersteunt enorm veel formaten
, zoals:
Formaat | Omschrijving |
---|---|
3dostr | 3DO STR |
3g2 | 3GP2 (3GPP2 file format) |
3gp | 3GP (3GPP file format) |
4xm | 4X Technologies |
a64 | a64 - video for Commodore 64 |
aa | Audible AA format files |
aac | raw ADTS AAC (Advanced Audio Coding) |
aax | CRI AAX |
ac3 | raw AC-3 |
ac4 | raw AC-4 |
ace | tri-Ace Audio Container |
acm | Interplay ACM |
act | ACT Voice file format |
adf | Artworx Data Format |
adp | ADP |
ads | Sony PS2 ADS |
adts | ADTS AAC (Advanced Audio Coding) |
adx | CRI ADX |
aea | MD STUDIO audio |
afc | AFC |
aiff | Audio IFF |
aix | CRI AIX |
alaw | PCM A-law |
alias_pix | Alias/Wavefront PIX image |
alp | LEGO Racers ALP |
amr | 3GPP AMR |
amrnb | raw AMR-NB |
amrwb | raw AMR-WB |
amv | AMV |
anm | Deluxe Paint Animation |
apac | raw APAC |
apc | CRYO APC |
ape | Monkey’s Audio |
apm | Ubisoft Rayman 2 APM |
apng | Animated Portable Network Graphics |
aptx | raw aptX (Audio Processing Technology for Bluetooth) |
aptx_hd | raw aptX HD (Audio Processing Technology for Bluetooth |
apv | APV raw bitstream |
aqtitle | AQTitle subtitles |
argo_asf | Argonaut Games ASF |
argo_brp | Argonaut Games BRP |
argo_cvg | Argonaut Games CVG |
asf | ASF (Advanced / Active Streaming Format) |
asf_o | ASF (Advanced / Active Streaming Format) |
asf_stream | ASF (Advanced / Active Streaming Format) |
ass | SSA (SubStation Alpha) subtitle |
ast | AST (Audio Stream) |
au | Sun AU |
av1 | AV1 Annex B |
avi | AVI (Audio Video Interleaved) |
avif | AVIF |
avisynth | AviSynth script |
avm2 | SWF (ShockWave Flash) (AVM2) |
avr | AVR (Audio Visual Research) |
avs | Argonaut Games Creature Shock |
avs2 | raw AVS2-P2/IEEE1857.4 video |
avs3 | AVS3-P2/IEEE1857.10 |
bethsoftvid | Bethesda Softworks VID |
bfi | Brute Force & Ignorance |
bfstm | BFSTM (Binary Cafe Stream) |
bin | Binary text |
bink | Bink |
binka | Bink Audio |
bit | G.729 BIT file format |
bitpacked | Bitpacked |
bmp_pipe | piped bmp sequence |
bmv | Discworld II BMV |
boa | Black Ops Audio |
bonk | raw Bonk |
brender_pix | BRender PIX image |
brstm | BRSTM (Binary Revolution Stream) |
c93 | Interplay C93 |
caf | Apple CAF (Core Audio Format) |
cavsvideo | raw Chinese AVS (Audio Video Standard) video |
cdg | CD Graphics |
cdxl | Commodore CDXL video |
chromaprint | Chromaprint |
cine | Phantom Cine |
codec2 | codec2 .c2 muxer |
codec2raw | raw codec2 muxer |
concat | Virtual concatenation script |
crc | CRC testing |
cri_pipe | piped cri sequence |
dash | DASH Muxer |
data | raw data |
daud | D-Cinema audio |
dcstr | Sega DC STR |
dds_pipe | piped dds sequence |
derf | Xilam DERF |
dfa | Chronomaster DFA |
dfpwm | raw DFPWM1a |
dhav | Video DAV |
dirac | raw Dirac |
dnxhd | raw DNxHD (SMPTE VC-3) |
dpx_pipe | piped dpx sequence |
dsf | DSD Stream File (DSF) |
dsicin | Delphine Software International CIN |
dss | Digital Speech Standard (DSS) |
dts | raw DTS |
dtshd | raw DTS-HD |
dv | DV (Digital Video) |
dvbsub | raw dvbsub |
dvbtxt | dvbtxt |
dvd | MPEG-2 PS (DVD VOB) |
dvdvideo | DVD-Video |
dxa | DXA |
ea | Electronic Arts Multimedia |
ea_cdata | Electronic Arts cdata |
eac3 | raw E-AC-3 |
epaf | Ensoniq Paris Audio File |
evc | raw EVC video |
exr_pipe | piped exr sequence |
f32be | PCM 32-bit floating-point big-endian |
f32le | PCM 32-bit floating-point little-endian |
f4v | F4V Adobe Flash Video |
f64be | PCM 64-bit floating-point big-endian |
f64le | PCM 64-bit floating-point little-endian |
fbdev | Linux framebuffer |
ffmetadata | FFmpeg metadata in text |
fifo | FIFO queue pseudo-muxer |
film_cpk | Sega FILM / CPK |
filmstrip | Adobe Filmstrip |
fits | Flexible Image Transport System |
flac | raw FLAC |
flic | FLI/FLC/FLX animation |
flv | FLV (Flash Video) |
framecrc | framecrc testing |
framehash | Per-frame hash testing |
framemd5 | Per-frame MD5 testing |
frm | Megalux Frame |
fsb | FMOD Sample Bank |
fwse | Capcom’s MT Framework sound |
g722 | raw G.722 |
g723_1 | raw G.723.1 |
g726 | raw big-endian G.726 (“left-justified”) |
g726le | raw little-endian G.726 (“right-justified”) |
g728 | raw G.728 |
g729 | G.729 raw format demuxer |
gdv | Gremlin Digital Video |
gem_pipe | piped gem sequence |
genh | GENeric Header |
gif | CompuServe Graphics Interchange Format (GIF) |
gif_pipe | piped gif sequence |
gsm | raw GSM |
gxf | GXF (General eXchange Format) |
h261 | raw H.261 |
h263 | raw H.263 |
h264 | raw H.264 video |
hash | Hash testing |
hca | CRI HCA |
hcom | Macintosh HCOM |
hdr_pipe | piped hdr sequence |
hds | HDS Muxer |
hevc | raw HEVC video |
hls | Apple HTTP Live Streaming |
hnm | Cryo HNM v4 |
iamf | Raw Immersive Audio Model and Formats |
ico | Microsoft Windows ICO |
idcin | id Cinematic |
idf | iCE Draw File |
iff | IFF (Interchange File Format) |
ifv | IFV CCTV DVR |
ilbc | iLBC storage |
image2 | image2 sequence |
image2pipe | piped image2 sequence |
imf | IMF (Interoperable Master Format) |
ingenient | raw Ingenient MJPEG |
ipmovie | Interplay MVE |
ipod | iPod H.264 MP4 (MPEG-4 Part 14) |
ipu | raw IPU Video |
ircam | Berkeley/IRCAM/CARL Sound Format |
ismv | ISMV/ISMA (Smooth Streaming) |
iss | Funcom ISS |
iv8 | IndigoVision 8000 video |
ivf | On2 IVF |
ivr | IVR (Internet Video Recording) |
j2k_pipe | piped j2k sequence |
jacosub | JACOsub subtitle format |
jpeg_pipe | piped jpeg sequence |
jpegls_pipe | piped jpegls sequence |
jpegxl_anim | Animated JPEG XL |
jpegxl_pipe | piped jpegxl sequence |
jv | Bitmap Brothers JV |
kmsgrab | KMS screen capture |
kux | KUX (YouKu) |
kvag | Simon & Schuster Interactive VAG |
laf | LAF (Limitless Audio Format) |
latm | LOAS/LATM |
lavfi | Libavfilter virtual input device |
lc3 | LC3 (Low Complexity Communication Codec) |
libgme | Game Music Emu demuxer |
libopenmpt | Tracker formats (libopenmpt) |
live_flv | live RTMP FLV (Flash Video) |
lmlm4 | raw lmlm4 |
loas | LOAS AudioSyncStream |
lrc | LRC lyrics |
luodat | Video CCTV DAT |
lvf | LVF |
lxf | VR native stream (LXF) |
m4v | raw MPEG-4 video |
matroska | Matroska |
matroska,webm | Matroska / WebM |
mca | MCA Audio Format |
mcc | MacCaption |
md5 | MD5 testing |
mgsts | Metal Gear Solid: The Twin Snakes |
microdvd | MicroDVD subtitle format |
mjpeg | raw MJPEG video |
mjpeg_2000 | raw MJPEG 2000 video |
mkvtimestamp_v2 | extract pts as timecode v2 format, as defined by mkvtoolnix |
mlp | raw MLP |
mlv | Magic Lantern Video (MLV) |
mm | American Laser Games MM |
mmf | Yamaha SMAF |
mods | MobiClip MODS |
moflex | MobiClip MOFLEX |
mov | QuickTime / MOV |
mov,mp4,m4a,3gp,3g2,mj2 | QuickTime / MOV |
mp2 | MP2 (MPEG audio layer 2) |
mp3 | MP3 (MPEG audio layer 3) |
mp4 | MP4 (MPEG-4 Part 14) |
mpc | Musepack |
mpc8 | Musepack SV8 |
mpeg | MPEG-1 Systems / MPEG program stream |
mpeg1video | raw MPEG-1 video |
mpeg2video | raw MPEG-2 video |
mpegts | MPEG-TS (MPEG-2 Transport Stream) |
mpegtsraw | raw MPEG-TS (MPEG-2 Transport Stream) |
mpegvideo | raw MPEG video |
mpjpeg | MIME multipart JPEG |
mpl2 | MPL2 subtitles |
mpsub | MPlayer subtitles |
msf | Sony PS3 MSF |
msnwctcp | MSN TCP Webcam stream |
msp | Microsoft Paint (MSP)) |
mtaf | Konami PS2 MTAF |
mtv | MTV |
mulaw | PCM mu-law |
musx | Eurocom MUSX |
mv | Silicon Graphics Movie |
mvi | Motion Pixels MVI |
mxf | MXF (Material eXchange Format) |
mxf_d10 | MXF (Material eXchange Format) D-10 Mapping |
mxf_opatom | MXF (Material eXchange Format) Operational Pattern Atom |
mxg | MxPEG clip |
nc | NC camera feed |
nistsphere | NIST SPeech HEader REsources |
nsp | Computerized Speech Lab NSP |
nsv | Nullsoft Streaming Video |
null | raw null video |
nut | NUT |
nuv | NuppelVideo |
obu | AV1 low overhead OBU |
oga | Ogg Audio |
ogg | Ogg |
ogv | Ogg Video |
oma | Sony OpenMG audio |
openal | OpenAL audio capture device |
opus | Ogg Opus |
osq | raw OSQ |
oss | OSS (Open Sound System) playback |
paf | Amazing Studio Packed Animation File |
pam_pipe | piped pam sequence |
pbm_pipe | piped pbm sequence |
pcx_pipe | piped pcx sequence |
pdv | PlayDate Video |
pfm_pipe | piped pfm sequence |
pgm_pipe | piped pgm sequence |
pgmyuv_pipe | piped pgmyuv sequence |
pgx_pipe | piped pgx sequence |
phm_pipe | piped phm sequence |
photocd_pipe | piped photocd sequence |
pictor_pipe | piped pictor sequence |
pjs | PJS (Phoenix Japanimation Society) subtitles |
pmp | Playstation Portable PMP |
png_pipe | piped png sequence |
pp_bnk | Pro Pinball Series Soundbank |
ppm_pipe | piped ppm sequence |
psd_pipe | piped psd sequence |
psp | PSP MP4 (MPEG-4 Part 14) |
psxstr | Sony Playstation STR |
pulse | Pulse audio output |
pva | TechnoTrend PVA |
pvf | PVF (Portable Voice Format) |
qcp | QCP |
qdraw_pipe | piped qdraw sequence |
qoa | QOA |
qoi_pipe | piped qoi sequence |
r3d | REDCODE R3D |
rawvideo | raw video |
rcwt | RCWT (Raw Captions With Time) |
realtext | RealText subtitle format |
redspark | RedSpark |
rka | RKA (RK Audio) |
rl2 | RL2 |
rm | RealMedia |
roq | raw id RoQ |
rpl | RPL / ARMovie |
rsd | GameCube RSD |
rso | Lego Mindstorms RSO |
rtp | RTP output |
rtp_mpegts | RTP/mpegts output format |
rtsp | RTSP output |
s16be | PCM signed 16-bit big-endian |
s16le | PCM signed 16-bit little-endian |
s24be | PCM signed 24-bit big-endian |
s24le | PCM signed 24-bit little-endian |
s32be | PCM signed 32-bit big-endian |
s32le | PCM signed 32-bit little-endian |
s337m | SMPTE 337M |
s8 | PCM signed 8-bit |
sami | SAMI subtitle format |
sap | SAP output |
sbc | raw SBC |
sbg | SBaGen binaural beats script |
scc | Scenarist Closed Captions |
scd | Square Enix SCD |
sdns | Xbox SDNS |
sdp | SDP |
sdr2 | SDR2 |
sds | MIDI Sample Dump Standard |
sdx | Sample Dump eXchange |
segment | segment |
ser | SER (Simple uncompressed video format for astronomical capturing) |
sga | Digital Pictures SGA |
sgi_pipe | piped sgi sequence |
shn | raw Shorten |
siff | Beam Software SIFF |
simbiosis_imx | Simbiosis Interactive IMX |
sln | Asterisk raw pcm |
smjpeg | Loki SDL MJPEG |
smk | Smacker |
smoothstreaming | Smooth Streaming Muxer |
smush | LucasArts Smush |
sol | Sierra SOL |
sox | SoX (Sound eXchange) native |
spdif | IEC 61937 (used on S/PDIF - IEC958) |
spx | Ogg Speex |
srt | SubRip subtitle |
stl | Spruce subtitle format |
stream_segment,ssegment | streaming segment muxer |
streamhash | Per-stream hash testing |
subviewer | SubViewer subtitle format |
subviewer1 | SubViewer v1 subtitle format |
sunrast_pipe | piped sunrast sequence |
sup | raw HDMV Presentation Graphic Stream subtitles |
svag | Konami PS2 SVAG |
svcd | MPEG-2 PS (SVCD) |
svg_pipe | piped svg sequence |
svs | Square SVS |
swf | SWF (ShockWave Flash) |
tak | raw TAK |
tedcaptions | TED Talks captions |
tee | Multiple muxer tee |
thp | THP |
tiertexseq | Tiertex Limited SEQ |
tiff_pipe | piped tiff sequence |
tmv | 8088flex TMV |
truehd | raw TrueHD |
tta | TTA (True Audio) |
ttml | TTML subtitle |
tty | Tele-typewriter |
txd | Renderware TeXture Dictionary |
ty | TiVo TY Stream |
u16be | PCM unsigned 16-bit big-endian |
u16le | PCM unsigned 16-bit little-endian |
u24be | PCM unsigned 24-bit big-endian |
u24le | PCM unsigned 24-bit little-endian |
u32be | PCM unsigned 32-bit big-endian |
u32le | PCM unsigned 32-bit little-endian |
u8 | PCM unsigned 8-bit |
uncodedframecrc | uncoded framecrc testing |
usm | CRI USM |
v210 | Uncompressed 4:2:2 10-bit |
v210x | Uncompressed 4:2:2 10-bit |
vag | Sony PS2 VAG |
vbn_pipe | piped vbn sequence |
vc1 | raw VC-1 video |
vc1test | VC-1 test bitstream |
vcd | MPEG-1 Systems / MPEG program stream (VCD) |
vidc | PCM Archimedes VIDC |
video4linux2,v4l2 | Video4Linux2 output device |
vividas | Vividas VIV |
vivo | Vivo |
vmd | Sierra VMD |
vob | MPEG-2 PS (VOB) |
vobsub | VobSub subtitle format |
voc | Creative Voice |
vpk | Sony PS2 VPK |
vplayer | VPlayer subtitles |
vqf | Nippon Telegraph and Telephone Corporation (NTT) TwinVQ |
vvc | raw H.266/VVC video |
w64 | Sony Wave64 |
wady | Marble WADY |
wav | WAV / WAVE (Waveform Audio) |
wavarc | Waveform Archiver |
wc3movie | Wing Commander III movie |
webm | WebM |
webm_chunk | WebM Chunk Muxer |
webm_dash_manifest | WebM DASH Manifest |
webp | WebP |
webp_pipe | piped webp sequence |
webvtt | WebVTT subtitle |
whip | WHIP(WebRTC-HTTP ingestion protocol) muxer |
wsaud | Westwood Studios audio |
wsd | Wideband Single-bit Data (WSD) |
wsvqa | Westwood Studios VQA |
wtv | Windows Television (WTV) |
wv | raw WavPack |
wve | Psion 3 audio |
x11grab | X11 screen capture, using XCB |
xa | Maxis XA |
xbin | eXtended BINary text (XBIN) |
xbm_pipe | piped xbm sequence |
xmd | Konami XMD |
xmv | Microsoft XMV |
xpm_pipe | piped xpm sequence |
xv | XV (XVideo) output device |
xvag | Sony PS3 XVAG |
xwd_pipe | piped xwd sequence |
xwma | Microsoft xWMA |
yop | Psygnosis YOP |
yuv4mpegpipe | YUV4MPEG pipe |
Afhankelijk van hoe ffmpeg is gebouwd en ontwikkelingen, kan het zijn dat jouw geïnstalleerd versie van ffmpeg afwijkt. Gebruik ffmpeg -formats
om te controleren of een bepaald formaat wel of niet wordt ondersteund.
Tips voor ffmpeg
Gebruik de laatste versie
Vaak zal de ffmpeg-versie binnen een Linux-distributie verouderd zijn. Gelukkig is het ook een binair bestand te downloaden
. In dit geval gaat het om een zogeheten statisch gecompileerd programma (static binary). Op de downloadpagina te vinden als Linux static builds.
Om deze vorm te gebruiken zijn de volgende stappen nodig:
- Download het archiefbestand (bijv. ffmpeg-master-latest-linux64-gpl.tar.xz)
- Open vervolgens het archiefbestand
- Klik op de folder ffmpeg-master-latest-linux64-gpl en vervolgens bin
- Rechter muisknop op ffmpeg en dan uitpakken
- Kopieer de ffmpeg-binary naar een werkmap van keuze
- Bij het gebruiken van ffmpeg, geef dan het volledige pad op naar deze statische binary. Als hij in dezelfde map staat als waar je in werkt, zou dat “./ffmpeg” zijn.
Relevante artikelen en pagina's
Met behulp van de toolkit ffmpeg en de command-line kunnen we eenvoudig FLAC-bestanden omzetten naar het MP3-formaat.