Projects
Multimedia
ffhevc
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 90
View file
ffhevc.changes
Changed
@@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Feb 22 10:40:00 UTC 2018 - neutrino8@opensuse.org + +- Update to version 3.5.9 + * Support per-file HDR side data when running in batch mode + * Minor code optimizations + +------------------------------------------------------------------- Sat Feb 17 11:52:00 UTC 2018 - neutrino8@opensuse.org - Update to version 3.5.8
View file
ffhevc.spec
Changed
@@ -17,7 +17,7 @@ Name: ffhevc -Version: 3.5.8 +Version: 3.5.9 Release: 0 Summary: A small shell script for encoding to H.265/HEVC with ffmpeg License: GPL-2.0+
View file
ffhevc-3.5.8.tar.gz/ChangeLog -> ffhevc-3.5.9.tar.gz/ChangeLog
Changed
@@ -1,3 +1,7 @@ +2018-02-22 - ffhevc 3.5.9 + * Support per-file HDR side data when running in batch mode + * Minor code optimizations + 2018-02-17 - ffhevc 3.5.8 * Fixed an issue where in some cases write-testing the output directory will fail due usage of readlink -f instead of
View file
ffhevc-3.5.8.tar.gz/ffhevc -> ffhevc-3.5.9.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.5.8 -# Date: 2018-02-17 +# Version: 3.5.9 +# Date: 2018-02-22 # # 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,7 +24,7 @@ brown() { echo -e "\e[0;33m$1\e[0;39;49m"; } error() { echo -e "\e[1;31m$1\e[0;39;49m"; } -version="3.5.8" +version="3.5.9" CFG="$HOME/.ffhevc" cfgversion="38" @@ -1304,9 +1304,7 @@ sdarray=([0]=green_x [1]=green_y [2]=blue_x [3]=blue_y [4]=red_x [5]=red_y [6]=white_point_x [7]=white_point_y [8]=min_luminance [9]=max_luminance [10]=max_content [11]=max_average) for i in {0..11}; do hdrsd[i]="$(grep "^${sdarray[i]}" "$HDRFILE" | tail -1 | awk -F= '{print $2}' | awk -F/ '{print $1}')" - if [ -z "${hdrsd[i]}" ]; then - hdrsd[i]="ENOT_AVAIL" - fi + test -z "${hdrsd[i]}" && hdrsd[i]="ENOT_AVAIL" done rm -f "$HDRFILE" echo @@ -1346,6 +1344,31 @@ if [ ! -z "$master_display" -o ! -z "$max_cll" -o ! -z "$dhdr10" ]; then hdr_encopts=":open-gop=0:repeat-headers=1" fi + + if [ ! -z "$batchmode" ]; then + printf "Auto-Detect and Add HDR Side Data to All Encodes? [y/N]: " + read addhdr + if [ "$addhdr" = "y" -o "$addhdr" = "Y" ]; then + echo + error "-> NOTE: all input files must contain valid HDR side data (master-display and max-cll)!" + echo + hdr_sd_func() { + echo " HDRFILE=\"$(dirname "$OUTPUT")/hdr_sd_$$\"" + echo " $FFPROBE -i \"\$i\" -v quiet -select_streams v:0 -show_entries side_data -read_intervals %+1 > \"\$HDRFILE\"" + echo " sdarray=([0]=green_x [1]=green_y [2]=blue_x [3]=blue_y [4]=red_x [5]=red_y [6]=white_point_x [7]=white_point_y [8]=min_luminance [9]=max_luminance [10]=max_content [11]=max_average)" + echo " for sd in {0..11}; do" + 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 " 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]}\"" + } + hdr_encopts="\$hdr_encopts" + master_display=":master-display=\"\$mast_disp\"" + max_cll="\$max_cll" + fi + fi fi # Used by cropping and bitrate @@ -1353,7 +1376,7 @@ video_length_func() { case "$1" in file) VLENGTH="$($FFPROBE -i "$input" -v quiet -select_streams v:0 -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 | tail -1 | awk -F. '{print $1}')" ;; - batch) echo "VLENGTH=\"\$($FFPROBE -i \"\$i\" -v quiet -select_streams v:0 -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 | tail -1 | awk -F. '{print \$1}')\"" ;; + batch) echo " VLENGTH=\"\$($FFPROBE -i \"\$i\" -v quiet -select_streams v:0 -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 | tail -1 | awk -F. '{print \$1}')\"" ;; esac } @@ -1362,8 +1385,8 @@ printf "Auto-Crop the Input Files? [y/N]: " read autocrop if [ "$autocrop" = "y" -o "$autocrop" = "Y" ]; then - CROPVAL="\$($FFMPEG -ss \$((\$VLENGTH/2)) -i \"\$i\" -map 0:0 -vf cropdetect=24:4 -frames:v 1000 -f null - 2>&1 | awk '/crop/ {print \$NF}' | awk -F= '{print \$2}' | tail -1)" - crop="crop=\$CROPVAL," + CROPVAL=" \$($FFMPEG -ss \$((\$VLENGTH/2)) -i \"\$i\" -map 0:0 -vf cropdetect=24:4 -frames:v 1000 -f null - 2>&1 | awk '/crop/ {print \$NF}' | awk -F= '{print \$2}' | tail -1)" + crop=" crop=\$CROPVAL," fi else echo @@ -3125,8 +3148,11 @@ echo "" >> "$OUTFILE" echo "$FORLOOP_START" >> "$OUTFILE" echo "$CHKFILE_START" >> "$OUTFILE" - if [ "$autocrop" = "y" -o "$autocrop" = "Y" ]; then + if [ "$addhdr" = "y" -o "$addhdr" = "Y" ]; then + hdr_sd_func >> "$OUTFILE" echo "" >> "$OUTFILE" + fi + if [ "$autocrop" = "y" -o "$autocrop" = "Y" ]; then echo "echo" >> "$OUTFILE" echo "green \"-> Detecting crop values for '\$(basename \"\$i\")'...\"" >> "$OUTFILE" video_length_func batch >> "$OUTFILE"
View file
ffhevc-3.5.8.tar.gz/hdr -> ffhevc-3.5.9.tar.gz/hdr
Changed
@@ -1,6 +1,6 @@ #!/bin/bash -# Small and dirty script to get HDR values which -# can be fed to ffhevc's HDR options menu +# Small script to get HDR values which can +# be fed to ffhevc's HDR options menu test -z "$1" && echo "Usage: hdr <file>" && exit 1 @@ -14,9 +14,7 @@ for i in {0..11}; do hdr[i]="$(grep "^${sdarray[i]}" "$hdrfile" | tail -1 | awk -F= '{print $2}' | awk -F/ '{print $1}')" - if [ -z "${hdr[i]}" ]; then - hdr[i]="ENOT_AVAIL" - fi + test -z "${hdr[i]}" && hdr[i]="ENOT_AVAIL" done echo "-> master-display: G(${hdr[0]},${hdr[1]})B(${hdr[2]},${hdr[3]})R(${hdr[4]},${hdr[5]})WP(${hdr[6]},${hdr[7]})L(${hdr[9]},${hdr[8]})"
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
.