Both sides previous revision Previous revision Next revision | Previous revisionLast revisionBoth sides next revision |
webm [2011/03/02 13:23] – [FFmpeg] 87.175.241.27 | webm [2013/07/08 14:39] – [vpxenc] brot |
---|
| |
===== Videos ins WebM Format bringen ===== | ===== 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) |
| |
| === VP9 Test Bashscript === |
| |
| <code> |
| #!/bin/sh |
| |
| for i in 4 3 2 1 0 |
| do |
| ./libvpx/vpxenc --codec=vp9 --ivf --good --cpu-used=$i --lag-in-frames=25 --auto-alt-ref=1 --passes=2 --target-bitrate=2000 --output=./libvpx/vp9-cpu-used-$i.ivf ~/Videos/tmp/sintel_trailer_2k_1080p24.y4m |
| done |
| </code> |
| |
| |
==== FFmpeg ==== | ==== 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]] | 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]] |
| |
=== Beispielkommandozeile === | === 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 | 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 :-) | FFmpeg verwurstet auch nahezu jedes andere Audio- und Videoformat, ist also eine recht universeller Encoder :-) |
==== GStreamer ==== | ==== GStreamer ==== |
| |
GStreamer hat seit Veröffentlichung des WebM Formats die entsprechenden Patches im Git - also braucht man ne Git Version von (mindestens) gstreamer-plugins-bad. | Siehe [[gstreamer|hier]] :) |
| |
FIXME | |