Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
webm [2012/02/03 15:58] – [FFmpeg] 87.175.148.32 | webm [2012/02/18 13:12] – old revision restored brot |
---|
====== Erstellen von Videos im WebM Format ====== | I?ve read a few good stuff here. Certainly worth bakkmoroing for revisiting. I wonder how much effort you put to make such a fantastic informative web site. |
| |
=== WebM? === | |
| |
[[http://www.webmproject.org|WebM]] ist ein opensource Videoformat, speziell entwickelt um das Standardformat für HTML5 Videos zu werden. Das Format besteht aus dem VP8 Videocodec und dem [[http://xiph.org/vorbis/|Vorbis]] Audioformat verpackt in einem auf [[http://corecodec.com/products/matroska|Matroska]] basierten Container. | |
| |
== Kompatible Browser == | |
| |
[[http://www.chromium.org/getting-involved/dev-channel|Chromium dev-channel]] | |
[[http://build.chromium.org/buildbot/snapshots/|Chromium snapshots]] | |
[[http://nightly.mozilla.org/webm/|Firefox webm-builds]] | |
[[http://labs.opera.com/news/2010/05/19/|Opera webm-builds]] | |
| |
===== Videos ins WebM Format bringen ===== | |
| |
==== vpxenc ==== | |
| |
Vpxenc ist der "offizielle" Encoder des webm Projekts. Der hat sogar hübsche [[http://www.webmproject.org/tools/encoder-parameters/|Dokumentation]] :) | |
| |
Das executable verwurstet am liebsten y4m files, die man entweder zb vom [[http://media.xiph.org/video/derf/|xiph.org server]] laden kann oder mit gstreamer/mencoder/whatnot erzeugt. | |
| |
vpxenc --ivf --threads=2 --good --cpu-used=0 --end-usage=2 --cq-level=X --target-bitrate=Y --auto-alt-ref=1 720p5994_stockholm_ter.ivf 720p5994_stockholm_ter.y4m | |
| |
([15:55:19] <jk8> targets quality X without exceeding bitrate Y) | |
| |
| |
==== FFmpeg ==== | |
| |
Um mit FFmpeg WebM-Videos erstellen zu können, braucht es (noch) ein paar [[http://www.webmproject.org/tools/#ffmpeg_patches|Patches]]. Manche Linuxdistributionen haben schon Pakete für ein gepatchtes FFmpeg, z.B. Arch Linux im [[http://aur.archlinux.org/packages.php?ID=37312|Arch User Repository]] oder Gentoo im [[http://bugs.gentoo.org/show_bug.cgi?id=320817|Bugtracker]] | |
| |
=== Beispielkommandozeilen === | |
| |
ffmpeg -i 480/sintel_trailer_2k_%04d.png -i sintel_trailer-audio.flac -f webm -vcodec libvpx -acodec vorbis -sameq sintel_trailer_480p.mkv | |
| |
mkfifo pipe.yuv ; ffmpeg -i /media/E436B32136B2F420/larry_crown.vob -vcodec rawvideo -aspect 1:1 -vf scale=1024:576 pipe.yuv | vpxenc pipe.yuv -o larry_crown_video.webm --i420 -w 1024 -h 576 --fps=25000/1001 -v -t 4 --best --end-usage=vbr --auto-alt-ref=1 --lag-in-frames=20 --kf-min-dist=0 --kf-max-dist=360 --cq-level=20 --min-q=20 --max-q=20 | |
| |
FFmpeg verwurstet auch nahezu jedes andere Audio- und Videoformat, ist also eine recht universeller Encoder :-) | |
| |
=== Optionen === | |
[14:22:21] <basilgohar> ffmpeg -i source.mkv -vcodec libvpx -qmin 15 -qmax 15 -g 250 -acodec libvorbix -aq 4 output.webm | |
[14:22:37] <bgaute> *libvorbis | |
[14:22:37] <basilgohar> For the types of videos I work with, that set of options works very well. | |
==== GStreamer ==== | |
| |
Siehe [[gstreamer|hier]] :) | |
| |