Benutzer-Werkzeuge

Webseiten-Werkzeuge


ffmpeg_freie_codecs_und_standardformate

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
ffmpeg_freie_codecs_und_standardformate [2019-09-17 20:44:32] – [praktisch sinnvolle Profile] manfredffmpeg_freie_codecs_und_standardformate [2023-08-12 05:16:52] (aktuell) – [Standard-Profile] manfred
Zeile 1: Zeile 1:
 +====== FFmpeg, freie Codecs und Standardformate ======
 +
 +  * [[http://slhck.info/video-encoding.html]]
 +  * [[https://www.ffmpeg.org/ffmpeg-codecs.html]]
 +
 +
 +===== 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 ====
 +
 +[[https://de.wikipedia.org/wiki/Matroska|Matroska]] ist wahrscheinlich der flexibelste Multimedia-Container, den es gibt.
 +
 +Der Matroska-Container ist ein [[https://en.wikipedia.org/wiki/Royalty-free|Royalty-free]] [[https://en.wikipedia.org/wiki/Open_standard|Open standard]].
 +Die Kernbibliotheken stehen unter der [[https://de.wikipedia.org/wiki/GNU_Lesser_General_Public_License|GNU LGPL]], der Parser unter der [[https://de.wikipedia.org/wiki/BSD-Lizenz|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** - __[[https://de.wikipedia.org/wiki/H.261|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** - __[[https://de.wikipedia.org/wiki/MPEG-2#MPEG-2_Video|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** - __[[http://trac.ffmpeg.org/wiki/Encode/H.264|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** - __[[http://trac.ffmpeg.org/wiki/Encode/H.264|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''
 +  * **Google / Free** - __[[https://trac.ffmpeg.org/wiki/Encode/VP9|VP9]]/[[https://trac.ffmpeg.org/wiki/Encode/AV1|AV1]] + Vorbis/Opus + MKV__ -> //(AV1 ab Android 10)//
 +    - ''> 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''
 +  * **Google / HTML 5** - __[[https://trac.ffmpeg.org/wiki/Encode/VP9|VP9]]/[[https://trac.ffmpeg.org/wiki/Encode/AV1|AV1]] + Vorbis/Opus + WebM__ -> //(AV1 ab Android 10)//
 +    * //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 aformat=channel_layouts='7.1|6.1|5.1|5.0|quad|3.0|stereo|mono' -f webm -y Film.webm''
 +
 +  Only VP8 or VP9 or AV1 video and Vorbis or Opus audio and WebVTT subtitles are supported for WebM.
 +