Projects
Multimedia
ffhevc
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 9
View file
ffhevc.changes
Changed
@@ -1,4 +1,25 @@ ------------------------------------------------------------------- +Sun Nov 06 09:52:00 UTC 2016 - neutrino8@opensuse.org + +- Update to version 2.9.4 + * Bugfix: resampling wasn't working for fdk-aac due to missing + value in the case statement + * Check if output file exists and if so, move it to $file.old + * Use test directly instead of an if condition to set the audio + filters + * Support bitrate calculations for target file size when doing + audio copy + * Use fdk* in the case statements for easier typing + * Renamed variable astrm to astream for clarity + * Use [1-2]p in the case statements for passmodes instead of 1p|2p + * New function, video_field_parity_func(), to detect and report the + interlace field order. Used by motion-compensation deinterlacing + and interlaced encoding + * Detect and display audio sample rate in case resampling is chosen + * Improvements to the video_fps_func() function. Get the FPS value + directly instead of outputting to a file and reading it + +------------------------------------------------------------------- Sat Nov 05 10:56:00 UTC 2016 - neutrino8@opensuse.org - Update to version 2.9.3
View file
ffhevc.spec
Changed
@@ -17,7 +17,7 @@ Name: ffhevc -Version: 2.9.3 +Version: 2.9.4 Release: 0 Summary: A small shell script for encoding to H.265/HEVC with ffmpeg License: GPL-2.0+
View file
ffhevc-2.9.3.tar.gz/AUTHORS -> ffhevc-2.9.4.tar.gz/AUTHORS
Changed
@@ -1,3 +1,3 @@ -- Grozdan Nikolov aka microchip <neutrino8@gmail.com> +- Grozdan Nikolov aka microchip <neutrino8@opensuse.org> Author/maintainer/developer/packager
View file
ffhevc-2.9.3.tar.gz/ChangeLog -> ffhevc-2.9.4.tar.gz/ChangeLog
Changed
@@ -1,3 +1,21 @@ +2016-11-06 - ffhevc 2.9.4 + * Bugfix: resampling wasn't working for fdk-aac due to missing + value in the case statement + * Check if output file exists and if so, move it to $file.old + * Use test directly instead of an if condition to set the audio + filters + * Support bitrate calculations for target file size when doing + audio copy + * Use fdk* in the case statements for easier typing + * Renamed variable astrm to astream for clarity + * Use [1-2]p in the case statements for passmodes instead of 1p|2p + * New function, video_field_parity_func(), to detect and report the + interlace field order. Used by motion-compensation deinterlacing + and interlaced encoding + * Detect and display audio sample rate in case resampling is chosen + * Improvements to the video_fps_func() function. Get the FPS value + directly instead of outputting to a file and reading it + 2016-11-05 - ffhevc 2.9.3 * Use a single var, $ofps, to set the output FPS for both deinterlace bobbing and FPS conversion
View file
ffhevc-2.9.3.tar.gz/ffhevc -> ffhevc-2.9.4.tar.gz/ffhevc
Changed
@@ -1,16 +1,16 @@ #!/usr/bin/env bash # # Small script to encode to H.265/HEVC video using FFmpeg and libx265. -# Author: Grozdan "microchip" Nikolov <neutrino8@gmail.com> -# Version: 2.9.3 -# Date: 2016-11-05 +# Author: Grozdan "microchip" Nikolov <neutrino8@opensuse.org> +# Version: 2.9.4 +# Date: 2016-11-06 # License: GNU GPLv2+ green() { echo -e "\e[1;32m$1\e[0;39;49m"; } brown() { echo -e "\e[0;33m$1\e[0;39;49m"; } error() { echo -e "\e[1;31m$1\e[0;39;49m"; } -version="2.9.3" +version="2.9.4" CFG="$HOME/.ffhevc" cfgversion="28" @@ -126,7 +126,7 @@ ;; m) case "$OPTARG" in - 1p|2p|crf) true ;; + [1-2]p|crf) true ;; *) error "-> Invalid mode!" error "-> Use: $(basename $0) -h" @@ -362,6 +362,8 @@ OUTPUT="$OUTPUT.$CON" + test -e "$OUTPUT" && mv -f "$OUTPUT" "$OUTPUT.old" + METATITLE="-metadata title=\"$(basename "${OUTPUT%.*}")\" -metadata:s:v:0 title=\"$(basename "${OUTPUT%.*}")\"" fi @@ -401,7 +403,7 @@ fi case "$mode" in - 1p|2p) + [1-2]p) printf "Specify the desired Video Bitrate in kbps [default is 5000]: " read vbtr test -z "$vbtr" && vbitrate="5000" || vbitrate="$vbtr" @@ -510,8 +512,32 @@ # Used by mc deinterlace and FPS conversion video_fps_func() { - FPSOUT="$(dirname "$OUTPUT")/.ff_fps$$" - $FFPROBE -i "$input" -select_streams v:0 -show_entries stream=r_frame_rate > "$FPSOUT" 2>&1 + GETFPS="$($FFPROBE -i "$input" -select_streams v:0 -show_entries stream=r_frame_rate 2>&1 | sed -n 's|^r_frame_rate=||p')" +} + +# Used by mc deinterlace and interlace-aware encoding +video_field_parity_func() { + echo + green "-> Detecting Field Parity..." + FPAR="$($FFPROBE -i "$input" -show_streams -select_streams v:0 -show_frames -read_intervals %+7 2>&1 | sed -n 's|^field_order=||p' | tail -1)" + case "$FPAR" in + t*|T*) fp="tff"; fparity="Top Field First (TFF)" ;; + b*|B*) fp="bff"; fparity="Bottom Field First (BFF)" ;; + p*|P*) fp="progressive"; fparity="Progressive" ;; + ""|*) fp="???"; fparity="???" ;; + esac + green "-> Detected $fparity Parity" + if [ "$fp" = "progressive" ]; then + error "-> Your file appears to be progressive but" + error " this may be a misdetection!" + elif [ "$fp" = "???" ]; then + error "-> Could not detect the Field Parity!" + fi + echo + case "$fp" in + bff) defpar="bff" ;; + *) defpar="tff" ;; + esac } if [ "$VID_DEINTERLACE" = "y" ]; then @@ -519,16 +545,10 @@ printf "Use Motion-Compensation Deinterlacing? [y/N]: " read mcd if [ "$mcd" = "y" -o "$mcd" = "Y" ]; then - printf "Specify the Field Parity of the Input File [tff/bff - default is tff]: " + video_field_parity_func + printf "Specify the Field Parity of the Input File [tff/bff - default is $defpar]: " read par - case "$par" in - t*|T*|"") fpar="tff" ;; - b*|B*) fpar="bff" ;; - *) - error "-> Invalid option!" - exit 1 - ;; - esac + test -z "$par" && fpar="$defpar" || fpar="$par" fi case "$1" in ofps) test ! -z "$fpar" && deinterlace="yadif=1,mcdeint=mode=medium:parity=$fpar:qp=10,framestep=step=2," || deinterlace="yadif=0," ;; @@ -550,16 +570,22 @@ case "$dmethod" in 0|"") video_deinterlace_func ofps ;; 1) - video_fps_func - FPS1="$(cat "$FPSOUT" | sed -n 's|r_frame_rate=||p' | awk -F/ '{print $1}')" - FPS2="$(cat "$FPSOUT" | sed -n 's|r_frame_rate=||p' | awk -F/ '{print $2}')" - OFPS="$(($FPS1*2))/$FPS2" - rm -f "$FPSOUT" - echo - green "-> Detected $FPS1/$FPS2 FPS" - green "-> Setting output FPS to: $OFPS" echo - ofps="-r $OFPS" + green "-> Detecting FPS value..." + sleep 1 + video_fps_func + if [ ! -z "$GETFPS" ]; then + FPS1="$(echo "$GETFPS" | awk -F/ '{print $1}')" + FPS2="$(echo "$GETFPS"| awk -F/ '{print $2}')" + OFPS="$(($FPS1*2))/$FPS2" + green "-> Detected: $FPS1/$FPS2 FPS" + green "-> Setting output FPS to: $OFPS" + echo + ofps="-r $OFPS" + else + error "-> Could not detect the FPS value!" + echo + fi video_deinterlace_func bob bob="1" ;; @@ -604,16 +630,10 @@ printf "Enable Interlace-aware encoding? [y/N]: " read intaw if [ "$intaw" = "y" -o "$intaw" = "Y" ]; then - printf "Specify the Field Parity of the Input File [tff/bff - default is tff]: " + video_field_parity_func + printf "Specify the Field Parity of the Input File [tff/bff - default is $defpar]: " read parity - case "$parity" in - t*|T*|"") interlaced=":interlace=tff" ;; - b*|B*) interlaced=":interlace=bff" ;; - *) - error "-> Invalid option!" - exit 1 - ;; - esac + test -z "$parity" && interlaced=":interlaced=$defpar" || interlaced=":interlaced=$parity" X265PARAMS="$X265PARAMS$interlaced" fi fi @@ -621,7 +641,7 @@ if [ "$AUTOCROP" = "y" ]; then echo green "-> Detecting crop values..." - VDUR="$($FFPROBE -i "$input" -select_streams v:0 -show_format 2>&1 | sed -n 's|duration=||p' | awk -F. '{print $1}')" + VDUR="$($FFPROBE -i "$input" -select_streams v:0 -show_format 2>&1 | sed -n 's|^duration=||p' | awk -F. '{print $1}')" CROPVAL="$($FFMPEG -ss $(($VDUR/2)) -i "$input" -map 0:0 -vf cropdetect=24:4 -frames:v 1000 -f null - 2>&1 | awk '/crop/ {print $NF}' | awk -F= '{print $2}' | tail -1)" if [ ! -z "$CROPVAL" ]; then green "-> Found crop values: $CROPVAL" @@ -729,12 +749,14 @@ green "-> Detecting FPS value..." sleep 1 video_fps_func - FPS="$(cat "$FPSOUT" | sed -n 's|r_frame_rate=||p')" - rm -f "$FPSOUT" - green "-> Detected: $FPS FPS" - case "$FPS" in + if [ ! -z "$GETFPS" ]; then + green "-> Detected: $GETFPS FPS" + else + error "-> Could not detect the FPS value!" + fi + case "$GETFPS" in 24/1|25/1|24000/1001|30000/1001) true ;; - *) + ""|*) echo error "-> Detected FPS is not supported yet!" error "-> Supported FPS are: 24/1, 25/1, 24000/1001 and 30000/1001" @@ -948,11 +970,11 @@ defaudtrk="press 'Enter' to skip" fi printf "Track $i: Specify the Audio Track to Encode or Copy [$defaudtrk]: " - read astrm[i] - if [ -z "${astrm[1]}" -a "$ATRKS" != "0" ]; then - astrm[1]="0:1" + read astream[i] + if [ -z "${astream[1]}" -a "$ATRKS" != "0" ]; then + astream[1]="0:1" fi - if [ ! -z "${astrm[i]}" ]; then + if [ ! -z "${astream[i]}" ]; then printf "Track $i: Specify the 3-letter Language Code for Metadata [press 'Enter' to skip]: " read alang[i] if [ ! -z "${alang[i]}" ]; then
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
.