From 3e36d7686aef3831414b4bd83c1900e064d5a804 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 2 Sep 2014 23:22:46 +0200 Subject: Fix document H.264 Main profile (not bogus "medium"), and add support for High profile. --- localvideowebencode | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/localvideowebencode b/localvideowebencode index c0c0e3a..0b1510b 100755 --- a/localvideowebencode +++ b/localvideowebencode @@ -40,7 +40,7 @@ html favoring open formats with optional non-JavaScript Flash fallback. (default: 25) -b, --bitrate Video bitrate in bytes, with optional ISO suffix (default: none) - --h264profile MPEG-4 AVC target profile (baseline medium) + --h264profile MPEG-4 AVC target profile: baseline main high (default: baseline) --stem Stem of output filenames, optionally with path (default: basename of last input file) @@ -190,6 +190,16 @@ esac [ "25" = "$rate" ] || _melt="{_melt:+$_melt }frame_rate_num=$rate" +case "$h264profile" in + baseline|main) + _melt_h264="properties=x264-medium-$h264profile" + ;; + high) + _melt_h264="properties=x264-medium" + ;; + *) exit1 "Unknown MPEG-4 AVC profile \"$h264profile\".";; +esac + # TODO: Check and fail if all needed tools are not available # TODO: When verified beneficial, add option real_time=-2 @@ -201,8 +211,8 @@ _melt_audio="ab=96k" melt -group $_melt_in $infiles -group $filters -consumer avformat:"$stem.ogg" f=ogg vcodec=libtheora $_melt acodec=libvorbis $_melt_audio $_melt_out ## H.264/AAC/MP4 -[ -z "$bitrate" ] || melt -group $_melt_in $infiles -group $filters -consumer avformat:/dev/null properties=x264-medium-pass1 properties=x264-medium-$h264profile $_melt $_melt_out -melt -group $_melt_in $infiles -group $filters -consumer avformat:"$stem.mp4" ${bitrate:+pass=2} properties=x264-medium-$h264profile $_melt acodec=aac $_melt_audio $_melt_out +[ -z "$bitrate" ] || melt -group $_melt_in $infiles -group $filters -consumer avformat:/dev/null properties=x264-medium-pass1 $_melt_h264 $_melt $_melt_out +melt -group $_melt_in $infiles -group $filters -consumer avformat:"$stem.mp4" ${bitrate:+pass=2} $_melt_h264 $_melt acodec=aac $_melt_audio $_melt_out # TODO: drop qt-faststart when melt 0.9.2 is stable mv "$stem.mp4" "$stem.mp4"~ qt-faststart "$stem.mp4"~ "$stem.mp4" -- cgit v1.2.3