Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
FFmpeg, freie Codecs und Standardformate
praktisch sinnvolle Formate-Kombinationen
im Browser inline ansehen
Filme in diesen beiden Formaten können auch inline in einem aktuellen Browser angesehen werden, ohne das man die Film-Dateien vorher auf das lokale Gerät runter laden muss.
Theora wird in HTML5-Browsern unterstützt seit:
- Google Chrome Version 3.0
- Mozilla Firefox Version 3.5
- Opera Version 10.5
Hier ein paar Gebrauchsbeispiele.
Theora-Video + Vorbis-Audio + OGG-Container, zum weiter geben, für hohe Rechtssicherheit:
> ffmpeg -i Film.vob -c:a libvorbis -q:a 1 -c:v libtheora -q:v 6 -f ogg Film.ogg
AVC-Video + AAC-Audio + MP4-Container, zum archivieren für, für hohe Kompression und Kompatibilität (HTML 5):
> ffmpeg -i Film.vob -c:a libfaac -q:a 80 -c:v libx264 -crf 32 -f mp4 Film.mp4
VP9-Video + Opus-Audio + WebM-Container, zum weiter geben, für hohe Rechtssicherheit, für hohe Kompression und Kompatibilität (HTML 5) - allerdings schlechte Untertitelunterstützung:
> ffmpeg -i Film.vob -map 0:v -c:v libvpx-vp9 -crf 32 -b:v 0 -map 0:a:0 -c:a libopus -b:a 192k -ac 2 -f webm -y Film.webm
AV1-Video + Opus-Audio + MKV-Container, zum weiter geben, für hohe Rechtssicherheit, für hohe Kompression - mit bester Untertitelunterstützung:
> ffmpeg -i Film.vob -map 0:v -c:v libaom-av1 -crf 32 -b:v 0 -map 0:a:0 -c:a libopus -b:a 192k -ac 2 -map 0:s:0 -c:s copy -f matroska -y Film.mkv
der Matroska-Container
Matroska ist wahrscheinlich der flexibelste Multimedia-Container, den es gibt.
Der Matroska-Container ist ein Royalty-free Open standard. Die Kernbibliotheken stehen unter der GNU LGPL, der Parser unter der BSD-Lizenz.
Matroska wird von Windows 10 nativ unterstützt. Die Unterstützung war erstmals im Windows 10 Technical Preview Build 9860 verfügbar.
Die Matroska-Dateien sind oft kleiner als vergleichbare Dateien in anderen Formaten, da die Datenstruktur des Containers nur einen geringen Overhead erzeugt.
Seit 2009 wird Matroska auch von kommerziellen Produkten unterstützt. DivX Inc. nutzt für deren im Januar 2009 veröffentlichtes DivX-7-Format MKV als alleiniges Containerformat, allerdings in einer nicht vollständig standardkonformen Implementierung.
Unterstützung von MKV in Hardware-Geräten erfolgt in der Hauptsache mit den Videocodecs H.264 Level 4.0 und 4.1, MPEG-4 ASP (Advanced Simple Profile) und Tonspuren in den Formaten AC3, MPEG-1 Layer 2 (MP2) und Layer 3 (MP3), Advanced Audio Coding (AAC) sowie Ogg Vorbis. Es ist aber nicht einfach möglich, auf diese Weise alle denkbaren MKV-Videos in Hardware zu unterstützen.
Zur Zeit wird der Matroska-Container noch nicht überall unterstützt aber er gewinnt immer mehr an Bedeutung.
FFmpeg-Hilfeausgabe
komplette Hilfe anzeigen:
# ffmpeg -h full
einige, von FFmpeg, unterstützte Container-Formate:
# ffmpeg -formats 2>/dev/null
einige, von FFmpeg, unterstützte Encoder:
# ffmpeg -encoders 2>/dev/null
Standard-Profile
- VCD - MPEG-1 (H.261) + MP2 + MPEG
> ffmpeg -i Film.vob -map 0:v -c:v mpeg1video -q:v 7 -map 0:a:0 -c:a mp2 -ac 2 -q:a 5 -f mpeg -y Film.mpg
- DVD - MPEG-2 (H.262) + AC3/a52 + MPEG
> ffmpeg -i Film.vob -map 0:v -c:v mpeg2video -q:v 7 -map 0:a:0 -c:a ac3 -q:a 7 -f mpeg -y Film.mpg
- AVCHD / Bluray-Disc - MPEG-4 Part 10 / H.264 / AVC + AC3/a52 + MPEG-TS
> ffmpeg -i Film.vob -map 0:v -c:v libx264 -crf 32 -map 0:a:0 -c:a ac3 -q:a 7 -f mpegts -y Film.mts
- MP4 / HTML 5 - MPEG-4 Part 10 / H.264 / AVC + AAC + MPEG
> ffmpeg -i Film.vob -map 0:v -c:v libx264 -crf 32 -map 0:a:0 -c:a libfaac -q:a 80 -f mp4 -y Film.mp4> ffmpeg -i Film.vob -map 0:v -c:v libx264 -crf 32 -map 0:a:0 -c:a libfdk_aac -afterburner 1 -b:a 224k -map 0:s:0 -c:s copy -f mp4 -y Film.mp4> ffmpeg -probesize 9223372036G -analyzeduration 9223372036G -fflags +genpts -i Film.vob -map 0:v -c:v libx264 -profile:v high -preset veryslow -tune film -x264opts nal-hrd=vbr -movflags faststart -crf 32 -vf yadif,pad='max(iw\,ih*(16/9)):ow/(16/9):(ow-iw)/2:(oh-ih)/2',setsar='1/1' -keyint_min 2-8 -map 0:a:0 -c:a libfdk_aac -afterburner 1 -b:a 224k -map 0:s:0 -c:s copy -map 0:s:1 copy -disposition:s:0 default -f mp4 -y Film.mp4> ffmpeg -i Film.vob -map 0:v -c:v libvpx-vp9 -b:v 0 -quality good -speed 0 -crf 32 -map 0:a:0 -c:a libopus -b:a 192k -ac 2 -map 0:s:0 -c:s copy -map 0:s:1 -c:s copy -disposition:s:0 default -f matroska -y Film.mp4> ffmpeg -probesize 9223372036G -analyzeduration 9223372036G -fflags +genpts -i Film.vob -map 0:v -c:v libvpx-vp9 -crf 32 -b:v 0 -vf pad='max(iw\,ih*(16/9)):ow/(16/9):(ow-iw)/2:(oh-ih)/2',setsar='1/1' -keyint_min 2-8 -map 0:a:0 -c:a libopus -b:a 256k -af channelmap=channel_layout=7.1 -map 0:a:0 -c:a libopus -b:a 256k -af channelmap=channel_layout=7.1 -map 0:s:0 -c:s copy -map 0:s:1 -c:s copy -disposition:s:0 default -f matroska -y Film.mp4
-
> ffmpeg -i Film.vob -map 0:v -c:v libvpx-vp9 -crf 32 -b:v 0 -map 0:a:0 -c:a libvorbis -q:a 5 -ac 2 -map 0:s:0 -c:s copy -f matroska -y Film.mkv> ffmpeg -i Film.vob -map 0:v -c:v libvpx-vp9 -crf 32 -b:v 0 -map 0:a:0 -c:a libopus -b:a 192k -ac 2 -map 0:s:0 -c:s copy -f matroska -y Film.mkv> ffmpeg -i Film.vob -map 0:v -c:v libaom-av1 -crf 32 -b:v 0 -map 0:a:0 -c:a libopus -b:a 192k -ac 2 -map 0:s:0 -c:s copy -f matroska -y Film.mkv
-
- WebM wird von der Consumer-Elektronik besser unterstützt, deshal lieber WebM verwenden, wenn es keine Untertitel gibt oder die Untertitel genau im richtigen Format vorliegen.
> ffmpeg -i Film.vob -map 0:v -c:v libvpx-vp9 -crf 32 -b:v 0 -map 0:a:0 -c:a libopus -b:a 192k -ac 2 -f webm -y Film.webm> ffmpeg -i Film.vob -map 0:v -c:v libaom-av1 -crf 32 -b:v 0 -map 0:a:0 -c:a libopus -b:a 192k -ac 2 -f webm -y Film.webm> ffmpeg -i Film.vob -map 0:v -c:v libaom-av1 -b:v 0 -crf 32 -map 0:a:0 -c:a libopus -b:a 128k -ac 2 -f webm -y Film.webm> ffmpeg -probesize 9223372036G -analyzeduration 9223372036G -fflags +genpts -i Film.vob -map 0:v -c:v libaom-av1 -b:v 0 -quality good -speed 0 -crf 32 -vf pad='max(iw\,ih*(16/9)):ow/(16/9):(ow-iw)/2:(oh-ih)/2',setsar='1/1' -keyint_min 2-8 -map 0:a:0 -c:a libopus -b:a 224k -af channelmap=channel_layout=5.1 -f webm -y Film.webm
Only VP8 or VP9 or AV1 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM.
