Projects
Multimedia
ffx264
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 10
View file
ffx264.changes
Changed
@@ -1,18 +1,23 @@ ------------------------------------------------------------------- -Sat Nov 05 10:56:00 UTC 2016 - neutrino8@opensuse.org +Sun Nov 06 09:52:00 UTC 2016 - neutrino8@opensuse.org -- Update to version 3.0.9 - * Use a single var, $ofps, to set the output FPS for both - deinterlace bobbing and FPS conversion - * Use new $bob var to indicate that we do bobbing and use that - var to disable FPS conversion - * Renamed $fp var in video_deinterlace_func() to $fpar - * Print a warning message that FPS conversion gets disabled if - the user chooses audio copy - * Added support for the FDK-AAC audio codec. Requires ffmpeg - to be compiled with libfdk-aac support - * Support FPS conversion with the 'fps' filter - * Some minor code optimizations +- Update to version 3.1.0 + * 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 ------------------------------------------------------------------- Fri Nov 04 10:43:00 UTC 2016 - neutrino8@opensuse.org
View file
ffx264.spec
Changed
@@ -17,7 +17,7 @@ Name: ffx264 -Version: 3.0.9 +Version: 3.1.0 Release: 0 Summary: A small shell script for encoding to H.264 with ffmpeg License: GPL-2.0+
View file
ffx264-3.0.9.tar.gz/AUTHORS -> ffx264-3.1.0.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
ffx264-3.0.9.tar.gz/ChangeLog -> ffx264-3.1.0.tar.gz/ChangeLog
Changed
@@ -1,3 +1,21 @@ +2016-11-06 - ffx264 3.1.0 + * 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 - ffx264 3.0.9 * Use a single var, $ofps, to set the output FPS for both deinterlace bobbing and FPS conversion
View file
ffx264-3.0.9.tar.gz/ffx264 -> ffx264-3.1.0.tar.gz/ffx264
Changed
@@ -1,16 +1,16 @@ #!/usr/bin/env bash # # Small script to encode to H.264/AVC video using FFmpeg and libx264. -# Author: Grozdan "microchip" Nikolov <neutrino8@gmail.com> -# Version: 3.0.9 -# Date: 2016-11-05 +# Author: Grozdan "microchip" Nikolov <neutrino8@opensuse.org> +# Version: 3.1.0 +# 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="3.0.9" +version="3.1.0" CFG="$HOME/.ffx264" cfgversion="24" @@ -125,7 +125,7 @@ ;; m) case "$OPTARG" in - 1p|2p|crf) true ;; + [1-2]p|crf) true ;; *) error "-> Invalid mode!" error "-> Use: $(basename $0) -h" @@ -363,6 +363,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 @@ -402,7 +404,7 @@ fi case "$mode" in - 1p|2p) + [1-2]p) printf "Specify the desired Video Bitrate in kbps [default is 8000]: " read vbtr test -z "$vbtr" && vbitrate="8000" || vbitrate="$vbtr" @@ -511,8 +513,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 @@ -520,16 +546,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," ;; @@ -551,16 +571,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" ;; @@ -606,16 +632,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=":tff=1" ;; - b*|B*) interlaced=":bff=1" ;; - *) - error "-> Invalid option!" - exit 1 - ;; - esac + test -z "$parity" && interlaced=":${defpar}=1" || interlaced=":${parity}=1" X264PARAMS="$X264PARAMS$interlaced" fi fi @@ -623,7 +643,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" @@ -731,12 +751,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" @@ -950,11 +972,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
.