Projects
Multimedia
ffhevc
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 152
View file
ffhevc.changes
Changed
@@ -1,4 +1,18 @@ ------------------------------------------------------------------- +Fri Oct 18 04:56:00 UTC 2019 - neutrino8@opensuse.org + +- Update to version 3.9.0 + * Bugfix: use correct video track for crop preview with MPlayer + * Renamed variable SCAN_MULTIPLE_VID_TRACKS to SCAN_MULTI_VID_TRACKS + * Some reordering in the config file + * Add option hrd and vui-hrd-info when encoding HDR video + * Add LPCM detection for audio copy + * Add support for cover art for the mp4 and mov containers. + Requires MP4Box from GPAC + * Set Catmull-Rom as default Bicubic/Spline tuning + * Some code optimization + +------------------------------------------------------------------- Wed Oct 16 05:20:00 UTC 2019 - neutrino8@opensuse.org - Update to version 3.8.9
View file
ffhevc.spec
Changed
@@ -17,7 +17,7 @@ Name: ffhevc -Version: 3.8.9 +Version: 3.9.0 Release: 0 Summary: A small shell script for encoding to H.265/HEVC with ffmpeg License: GPL-2.0+ @@ -27,6 +27,7 @@ Requires: ffmpeg Requires: bc Requires: MPlayer +Requires: gpac BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch
View file
ffhevc-3.8.9.tar.gz/ChangeLog -> ffhevc-3.9.0.tar.gz/ChangeLog
Changed
@@ -1,3 +1,17 @@ +2019-10-18 - ffhevc 3.9.0 + * Bugfix: use correct video track for crop + preview with MPlayer + * Renamed variable SCAN_MULTIPLE_VID_TRACKS to + SCAN_MULTI_VID_TRACKS + * Some reordering in the config file + * Add option hrd and vui-hrd-info when encoding + HDR video + * Add LPCM detection for audio copy + * Add support for cover art for the mp4 and mov + containers. Requires MP4Box from GPAC + * Set Catmull-Rom as default Bicubic/Spline tuning + * Some code optimization + 2019-10-16 - ffhevc 3.8.9 * Support the fftdnoiz denoise filter
View file
ffhevc-3.8.9.tar.gz/ffhevc -> ffhevc-3.9.0.tar.gz/ffhevc
Changed
@@ -2,8 +2,8 @@ # # Small script to encode to H.265/HEVC video using FFmpeg and libx265. # Author: Grozdan "microchip" Nikolov <neutrino8@opensuse.org> -# Version: 3.8.9 -# Date: 2019-10-16 +# Version: 3.9.0 +# Date: 2019-10-18 # # ffhevc is free software ; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,10 +24,10 @@ brown() { echo -e "\e[0;33m$1\e[0;39;49m"; } error() { echo -e "\e[1;31m$1\e[0;39;49m"; } -version="3.8.9" +version="3.9.0" CFG="$HOME/.ffhevc" -cfgversion="46" +cfgversion="47" genconfig_func() { cat<<EOF>>"$CFG" @@ -45,10 +45,12 @@ # Container format extension # Leave empty to ask each time +# Supported are: +# mkv/mp4/mov/m2ts/mts/ts CONFMT="" # Scan for multiple video tracks? -SCAN_MULTIPLE_VID_TRACKS="y" +SCAN_MULTI_VID_TRACKS="y" # Nice value (0-19) NICE="19" @@ -80,9 +82,6 @@ # SCALER="" -# Support FPS conversion? -VID_FPS_CONVERT="y" - # Video filters VID_DENOISE="y" VID_DEBLOCK="y" @@ -93,6 +92,7 @@ VID_HDR_TO_SDR="y" VID_PIXEL_FORMAT="y" VID_COLORSPACE="y" +VID_FPS_CONVERT="y" HDR_SUPPORT="y" @@ -126,6 +126,7 @@ FFMPEG="" FFPROBE="" MPLAYER="" +MP4BOX="" # Add a custom comment to your encodes # Leave empty to disable/ask each time @@ -386,6 +387,22 @@ fi fi +if [ ! -z "$MP4BOX" ]; then + if [ ! -x "$MP4BOX" ]; then + error "-> MP4Box is missing from your system!" + error "-> Check the config in '$CFG'" + echo + exit 1 + fi +else + MP4BOX="$(which MP4Box 2>/dev/null)" + if [ ! -x "$MP4BOX" ]; then + error "-> MP4Box is missing from your system!" + echo + exit 1 + fi +fi + BC="$(which bc 2>/dev/null)" if [ ! -x "$BC" ]; then error "-> Utility 'bc' is missing from your system!" @@ -451,7 +468,7 @@ input="$(readlink -e "$input")" fi -if [ "$SCAN_MULTIPLE_VID_TRACKS" = "y" ]; then +if [ "$SCAN_MULTI_VID_TRACKS" = "y" ]; then printf "Scan for Multiple Video Tracks? [y/N]: " read mvt if [ "$mvt" = "y" -o "$mvt" = "Y" ]; then @@ -530,7 +547,7 @@ fi if [ -z "$CONFMT" ]; then - printf "Which Container Format to use? [default is mkv]: " + printf "Which Container Format to Use? [mkv/mp4/mov/m2ts/mts/ts - default is mkv]: " read confmt test -z "$confmt" && CONFMT="mkv" || CONFMT="$confmt" fi @@ -633,7 +650,8 @@ test ! -z "$comment" && COMMENT="$comment" fi -if [ "$CONFMT" = "mkv" ]; then +case "$CONFMT" in + mkv|mp4|mov) printf "Specify a Cover Image in JPG/PNG format [press 'Enter' to skip]: " read -e cover if [ ! -z "$cover" ]; then @@ -649,10 +667,21 @@ exit 1 ;; esac - METACOVER="-attach \"$(readlink -e "$cover")\" -metadata:s:t mimetype=\"image/$img\"" + case "$CONFMT" in + mkv) METACOVER="-attach \"$(readlink -e "$cover")\" -metadata:s:t mimetype=\"image/$img\"" ;; + *) MP4COVER="-itags cover=\"$(readlink -e "$cover")\"" ;; + esac + if [ ! -z "$remuxcon" ]; then + for i in $remuxcon; do + case "$i" in + mp4|mov) MP4COVER2="-itags cover=\"$(readlink -e "$cover")\"" ;; + esac + done + fi fi fi -fi + ;; +esac case "$encmode" in [1-3]p) @@ -660,7 +689,7 @@ read vbtr test -z "$vbtr" && vbitrate="5000" || vbitrate="$vbtr" ;; - *|"") + ""|crf) if [ -z "$CRF" ]; then printf "Specify a CRF Value for the Encoding [0-51 - default is 21]: " read crf @@ -1465,7 +1494,7 @@ fi if [ ! -z "$master_display" -o ! -z "$max_cll" -o ! -z "$dhdr10" -o ! -z "$dolby_vision" -o ! -z "$dolby_vision_rpu" ]; then - hdr_encopts=":open-gop=0:repeat-headers=1" + hdr_encopts=":open-gop=0:repeat-headers=1:hrd=1:vui-hrd-info=1" fi if [ ! -z "$batchmode" ]; then @@ -1483,7 +1512,7 @@ echo " hdrsd[sd]=\"\$(grep \"^\${sdarray[sd]}\" \"\$HDRFILE\" | tail -1 | awk -F= '{print \$2}' | awk -F/ '{print \$1}')\"" echo " done" echo " rm -f \"\$HDRFILE\"" - echo " hdr_encopts=\":open-gop=0:repeat-headers=1\"" + echo " hdr_encopts=\":open-gop=0:repeat-headers=1:hrd=1:vui-hrd-info=1\"" echo " mast_disp=\"G(\${hdrsd[0]},\${hdrsd[1]})B(\${hdrsd[2]},\${hdrsd[3]})R(\${hdrsd[4]},\${hdrsd[5]})WP(\${hdrsd[6]},\${hdrsd[7]})L(\${hdrsd[9]},\${hdrsd[8]})\"" echo " max_cll=\":max-cll=\${hdrsd[10]},\${hdrsd[11]}\"" } @@ -1561,7 +1590,7 @@ else startpos="$timepos" fi - $MPLAYER "$input" -vf rectangle=$crop_preview -noconfig all -nocache -ao null -ss $startpos -endpos 10 >/dev/null 2>&1 + $MPLAYER "$input" -vid $vidtrack -vf rectangle=$crop_preview -noconfig all -nocache -ao null -ss $startpos -endpos 10 >/dev/null 2>&1 fi fi printf "Are you Satisfied with the Crop Area? [y/N]: " @@ -1666,11 +1695,11 @@ echo " 3 -> Cubic B-Spline (1.00, 0.00)" echo " 4 -> Custom" echo - printf "Specify the Scaler Tuning option [default is 0]: " + printf "Specify the Scaler Tuning Option [default is 1]: " read swstune case "$swstune" in - 0|"") true ;; - 1) swsparam0=":param0=0.00"; swsparam1=":param1=0.50" ;; + 0) true ;; + 1|"") swsparam0=":param0=0.00"; swsparam1=":param1=0.50" ;; 2) swsparam0=":param0=0.33"; swsparam1=":param1=0.33" ;; 3) swsparam0=":param0=1.00"; swsparam1=":param1=0.00" ;; 4) @@ -3190,14 +3219,16 @@ test "${aindex[i]}" = "-1" && aindex[i]="0" GETAUDCDC[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^codec_name' | awk -F= '{print $2}')" - GETAUDBTR[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^bit_rate' | awk -F= '{print $2}')" - GETAUDSR[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^sample_rate' | awk -F= '{print $2}')" - GETAUDCL[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^channel_layout' | awk -F= '{print $2}')" if [ ! -z "${GETAUDCDC[i]}" ]; then + GETAUDBTR[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^bit_rate' | awk -F= '{print $2}')" + GETAUDSR[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^sample_rate' | awk -F= '{print $2}')" + GETAUDCL[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^channel_layout' | awk -F= '{print $2}')" + get_audio_profile_func() { GETAUDPROF[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^profile' | awk -F= '{print $2}')" } + case "${GETAUDCDC[i]}" in ac3) GETAUDCDC[i]="AC-3" ;; eac3) GETAUDCDC[i]="E-AC-3" ;; @@ -3227,6 +3258,7 @@ wmav2) GETAUDCDC[i]="WMAv2" ;; opus) GETAUDCDC[i]="Opus" ;; pcm*) GETAUDCDC[i]="PCM" ;; + lpcm*) GETAUDCDC[i]="LPCM" ;; flac) GETAUDCDC[i]="FLAC" ;; alac) GETAUDCDC[i]="ALAC" ;; *) GETAUDCDC[i]="$(echo "${GETAUDCDC[i]}" | tr '[a-z]' '[A-Z]')" ;; @@ -3451,6 +3483,18 @@ fi encoder_func $encmode >> "$OUTFILE" echo "" >> "$OUTFILE" +case "$CONFMT" in + mp4|mov) + if [ ! -z "$MP4COVER" ]; then + case "$CONFMT" in + mp4) hint="-hint" ;; + esac + echo "$MP4BOX -add \"$OUTPUT\" $MP4COVER -mpeg4 $hint -new \"${OUTPUT%.*}_tmp$$.$CONFMT\" >/dev/null 2>&1" >> "$OUTFILE" + echo "rm -f \"$OUTPUT\"" >> "$OUTFILE" + echo "mv -f \"${OUTPUT%.*}_tmp$$.$CONFMT\" \"$OUTPUT\"" >> "$OUTFILE" + fi + ;; +esac if [ ! -z "$remuxcon" ]; then for i in $remuxcon; do echo "" >> "$OUTFILE" @@ -3459,6 +3503,19 @@ echo "" >> "$OUTFILE" echo "$FFMPEG -i \"$OUTPUT\" -map 0 -c copy $strict \"${OUTPUT%.*}.$i\" >/dev/null 2>&1" >> "$OUTFILE" echo "test \"\$?\" = \"0\" && green \"-> Done\" || red \"-> Failed!\"" >> "$OUTFILE" + case "$i" in + mp4|mov) + if [ ! -z "$MP4COVER2" ]; then + case "$i" in + mp4) hint2="-hint" ;; + esac + echo "" >> "$OUTFILE" + echo "$MP4BOX -add \"${OUTPUT%.*}.$i\" $MP4COVER2 -mpeg4 $hint2 -new \"${OUTPUT%.*}_tmp$$.$i\" >/dev/null 2>&1" >> "$OUTFILE" + echo "rm -f \"${OUTPUT%.*}.$i\"" >> "$OUTFILE" + echo "mv -f \"${OUTPUT%.*}_tmp$$.$i\" \"${OUTPUT%.*}.$i\"" >> "$OUTFILE" + fi + ;; + esac done echo "echo" >> "$OUTFILE" fi
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.