Projects
Multimedia
ffhevc
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 8
View file
ffhevc.changes
Changed
@@ -1,4 +1,20 @@ ------------------------------------------------------------------- +Sat Nov 05 10:56:00 UTC 2016 - neutrino8@opensuse.org + +- Update to version 2.9.3 + * 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 + +------------------------------------------------------------------- Fri Nov 04 10:43:00 UTC 2016 - neutrino8@opensuse.org - Update to version 2.9.2
View file
ffhevc.spec
Changed
@@ -17,7 +17,7 @@ Name: ffhevc -Version: 2.9.2 +Version: 2.9.3 Release: 0 Summary: A small shell script for encoding to H.265/HEVC with ffmpeg License: GPL-2.0+
View file
ffhevc-2.9.2.tar.gz/ChangeLog -> ffhevc-2.9.3.tar.gz/ChangeLog
Changed
@@ -1,3 +1,16 @@ +2016-11-05 - ffhevc 2.9.3 + * 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 + 2016-11-04 - ffhevc 2.9.2 * Bugfix: the scale variable was used twice for different things causing an overwrite of the scale filter parameters, which
View file
ffhevc-2.9.2.tar.gz/ffhevc -> ffhevc-2.9.3.tar.gz/ffhevc
Changed
@@ -2,15 +2,15 @@ # # Small script to encode to H.265/HEVC video using FFmpeg and libx265. # Author: Grozdan "microchip" Nikolov <neutrino8@gmail.com> -# Version: 2.9.2 -# Date: 2016-11-04 +# Version: 2.9.3 +# Date: 2016-11-05 # License: GNU GPLv2+ green() { echo -e "\e1;32m$1\e0;39;49m"; } brown() { echo -e "\e0;33m$1\e0;39;49m"; } error() { echo -e "\e1;31m$1\e0;39;49m"; } -version="2.9.2" +version="2.9.3" CFG="$HOME/.ffhevc" cfgversion="28" @@ -522,8 +522,8 @@ printf "Specify the Field Parity of the Input File tff/bff - default is tff: " read par case "$par" in - t*|T*|"") fp="tff" ;; - b*|B*) fp="bff" ;; + t*|T*|"") fpar="tff" ;; + b*|B*) fpar="bff" ;; *) error "-> Invalid option!" exit 1 @@ -531,8 +531,8 @@ esac fi case "$1" in - ofps) test ! -z "$fp" && deinterlace="yadif=1,mcdeint=mode=medium:parity=$fp:qp=10,framestep=step=2," || deinterlace="yadif=0," ;; - bob) test ! -z "$fp" && deinterlace="yadif=1,mcdeint=mode=medium:parity=$fp:qp=10," || deinterlace="yadif=1," ;; + ofps) test ! -z "$fpar" && deinterlace="yadif=1,mcdeint=mode=medium:parity=$fpar:qp=10,framestep=step=2," || deinterlace="yadif=0," ;; + bob) test ! -z "$fpar" && deinterlace="yadif=1,mcdeint=mode=medium:parity=$fpar:qp=10," || deinterlace="yadif=1," ;; esac } @@ -553,13 +553,15 @@ 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: $(($FPS1*2))/$FPS2" + green "-> Setting output FPS to: $OFPS" echo - fps="-r $(($FPS1*2))/$FPS2" + ofps="-r $OFPS" video_deinterlace_func bob + bob="1" ;; *) error "-> Invalid option!" @@ -719,7 +721,7 @@ if "$VID_FPS_CONVERT" = "y" ; then # Not supported with interlaced encoding # and deinterlacing with a bobber - if -z "$interlaced" -a -z "$fp" ; then + if -z "$interlaced" -a -z "$bob" ; then printf "Do an NTSC <-> PAL or NTSC <-> NTSC FPS conversion? y/N: " read fpscon if "$fpscon" = "y" -o "$fpscon" = "Y" ; then @@ -742,6 +744,21 @@ esac echo if -z "$skipfps" ; then + brown " FPS Conversion Filters" + brown " ~~~~~~~~~~~~~~~~~~~~~~" + echo " 0 -> fps (converts by duplicating/dropping of frames)" + echo " 1 -> setpts + atempo (converts by PTS + audio speedup/down)" + echo + printf "Specify the FPS conversion method default is 0: " + read fcm + case "$fcm" in + 0|1|"") true ;; + *) + error "-> Invalid option!" + exit 1 + ;; + esac + echo brown " NTSC <-> PAL and NTSC <-> NTSC FPS Conversion" brown " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo " 0 --> 23.976 FPS (24000/1001) to 24 FPS" @@ -764,63 +781,87 @@ read fpsopt case "$fpsopt" in 0) - setpts="setpts=23976/24000*PTS," - atempo="atempo=1.001001001," + case "$fcm" in + 0|"") fps="fps=fps=24," ;; + 1) setpts="setpts=23976/24000*PTS,"; atempo="atempo=1.001001001," ;; + esac ofps="-r 24/1" ;; 1) - setpts="setpts=23976/25000*PTS," - atempo="atempo=1.04270937604270937604," + case "$fcm" in + 0|"") fps="fps=fps=25," ;; + 1) setpts="setpts=23976/25000*PTS,"; atempo="atempo=1.04270937604270937604," ;; + esac ofps="-r 25/1" ;; 2) - setpts="setpts=23976/29970*PTS," - atempo="atempo=1.25," + case "$fcm" in + 0|"") fps="fps=fps=30000/1001," ;; + 1) setpts="setpts=23976/29970*PTS,"; atempo="atempo=1.25," ;; + esac ofps="-r 30000/1001" ;; 3) - setpts="setpts=24000/23976*PTS," - atempo="atempo=0.999," + case "$fcm" in + 0|"") fps="fps=fps=24000/1001," ;; + 1) setpts="setpts=24000/23976*PTS,"; atempo="atempo=0.999," ;; + esac ofps="-r 24000/1001" ;; 4) - setpts="setpts=24000/25000*PTS," - atempo="atempo=1.04166666667," + case "$fcm" in + 0|"") fps="fps=fps=25," ;; + 1) setpts="setpts=24000/25000*PTS,"; atempo="atempo=1.04166666667," ;; + esac ofps="-r 25/1" ;; 5) - setpts="setpts=24000/29970*PTS," - atempo="atempo=1.24875," + case "$fcm" in + 0|"") fps="fps=fps=30000/1001," ;; + 1) setpts="setpts=24000/29970*PTS,"; atempo="atempo=1.24875," ;; + esac ofps="-r 30000/1001" ;; 6) - setpts="setpts=25000/23976*PTS," - atempo="atempo=0.95904," + case "$fcm" in + 0|"") fps="fps=fps=24000/1001," ;; + 1) setpts="setpts=25000/23976*PTS,"; atempo="atempo=0.95904," ;; + esac ofps="-r 24000/1001" ;; 7) - setpts="setpts=25000/24000*PTS," - atempo="atempo=0.96," + case "$fcm" in + 0|"") fps="fps=fps=24," ;; + 1) setpts="setpts=25000/24000*PTS,"; atempo="atempo=0.96," ;; + esac ofps="-r 24/1" ;; 8) - setpts="setpts=25000/29970*PTS," - atempo="atempo=1.1988," + case "$fcm" in + 0|"") fps="fps=fps=30000/1001," ;; + 1) setpts="setpts=25000/29970*PTS,"; atempo="atempo=1.1988," ;; + esac ofps="-r 30000/1001" ;; 9) - setpts="setpts=29970/23976*PTS," - atempo="atempo=0.8," + case "$fcm" in + 0|"") fps="fps=fps=24000/1001," ;; + 1) setpts="setpts=29970/23976*PTS,"; atempo="atempo=0.8," ;; + esac ofps="-r 24000/1001" ;; 10) - setpts="setpts=29970/24000*PTS," - atempo="atempo=0.800800800801," + case "$fcm" in + 0|"") fps="fps=fps=24," ;; + 1) setpts="setpts=29970/24000*PTS,"; atempo="atempo=0.800800800801," ;; + esac ofps="-r 24/1" ;; 11) - setpts="setpts=29970/25000*PTS," - atempo="atempo=0.83416750083416750083," + case "$fcm" in + 0|"") fps="fps=fps=25," ;; + 1) setpts="setpts=29970/25000*PTS,"; atempo="atempo=0.83416750083416750083," ;; + esac ofps="-r 25/1" ;; "") @@ -930,6 +971,7 @@ echo " EAC3 ----> Channels Support: 6 (encoder max)" echo " DTS -----> Channels Support: 6 (codec max)" echo " AAC -----> Channels Support: 8 (ffmpeg max)" + echo " FDK-AAC -> Channels Support: 8 (ffmpeg max)" echo " Opus ----> Channels Support: 8 (ffmpeg max)" echo " Vorbis --> Channels Support: 8 (ffmpeg max)" echo " MP3 -----> Channels Support: 2 (codec max)" @@ -979,6 +1021,11 @@ abroptsi="32-512" abrdefi="448" ;; + fdk-aac) + acdci="libfdk_aac" + abroptsi="8-512" + abrdefi="448" + ;; mp3) acdci="libmp3lame" ametai="MP3" @@ -1015,8 +1062,14 @@ # We only clear the video filter and fps here. No need to # also clear the audio filter since it never reaches the # below $afilters filter chain. - setpts= - ofps= + # Exception is the 'fps' filter, which seems to work fine + # with audio copy and doesn't introduce any A/V desync, + # according to my testing + if ! -z "$setpts" ; then + skipsetpts="1" + setpts= + ofps= + fi ;; nosound) audparams1="-an" @@ -1061,6 +1114,21 @@ if "${acodeci}" != "copy" ; then if "${acodeci}" != "flac" ; then if "${acodeci}" != "pcm" ; then + if "${acodeci}" = "fdk-aac" ; then + printf "Track $i: Which AAC Profile to Use? LC/HE/HEv2 - default is LC: " + read aprofi + case "${aprofi}" in + lc|LC|"") ametai="LC-AAC"; aacprofi="aac_low" ;; + he|HE) ametai="HE-AACv1"; aacprofi="aac_he" ;; + hev2|HEv2|HEV2) ametai="HE-AACv2"; aacprofi="aac_he_v2" ;; + *) + error "- Invalid AAC profile!" + exit 1 + ;; + esac + audprofilei="-profile:a:${audmapvali} ${aacprofi} -afterburner:a:${audmapvali} 1" + + fi printf "Track $i: Specify the Audio Bitrate in kbps ${abroptsi} - default is ${abrdefi}: " read abri test -z "${abri}" && abitratei="${abrdefi}k" || abitratei="${abri}k" @@ -1087,6 +1155,12 @@ ac3|eac3|dts|"") chanrangei="1-6"; defchani="6" ;; aac|opus|vorbis|flac|pcm) chanrangei="1-8"; defchani="8" ;; mp3) chanrangei="1-2"; defchani="2" ;; + fdk-aac) + case "${aacprofi}" in + aac_low|aac_he) chanrangei="1-8"; defchani="8" ;; + *) chanrangei="1-2"; defchani="2" ;; + esac + ;; esac printf "Track $i: How many Channels to Encode? ${chanrangei} - default is ${defchani}: " read achani @@ -1127,6 +1201,19 @@ ;; esac ;; + fdk-aac) + case "${aacprofi}" in + aac_he_v2) + case "${achi}" in + 1|2) true ;; + *) + error "-> HE-AACv2 supports only 1-2 channels!" + exit 1 + ;; + esac + ;; + esac + ;; mp3) case "${achi}" in 1|2) true ;; @@ -1288,10 +1375,16 @@ fi fi - audparamsi="${audmapi} -c:a:${audmapvali} ${acdci} ${audbtri} ${audchani} ${audfiltersi} ${audlangi} ${audmetai}" + audparamsi="${audmapi} -c:a:${audmapvali} ${acdci} ${audprofilei} ${audbtri} ${audchani} ${audfiltersi} ${audlangi} ${audmetai}" fi done +if ! -z "$skipsetpts" ; then + echo + error "-> FPS conversion with the 'setpts' and 'atempo' filters has" + error " been disabled as it is incompatible with audio stream copy!" +fi + case "$mode" in 1p|2p) # Haven't found a reliable way to make it work with @@ -1331,7 +1424,7 @@ test "$CHAPS" = "n" && CHPS="-map_chapters -1" -vidfilters="$(echo "$deinterlace$crop$deblock$denoise$scale$rotate$setpts" | sed 's|,$||')" +vidfilters="$(echo "$deinterlace$crop$deblock$denoise$scale$rotate$setpts$fps" | sed 's|,$||')" test ! -z "$vidfilters" && vfilters="-vf $vidfilters" @@ -1375,7 +1468,7 @@ case "$1" in 1p|crf) test "$mode" = "1p" && pmode="bitrate=$vbitrate" || pmode="crf=$CRF" - OPTS1="-map 0:0 -disposition:v:0 default $fps $ofps $NOSUBS $MDATA $CHPS $METATITLE $METAGENRE $METAYEAR $METACOMMENT $vfilters $sws" + OPTS1="-map 0:0 -disposition:v:0 default $ofps $NOSUBS $MDATA $CHPS $METATITLE $METAGENRE $METAYEAR $METACOMMENT $vfilters $sws" OPTS2="${audparams*} ${auddis*} ${subcopy*} ${subdis*} $strict $movflags $METACOVER \"$OUTPUT\"" ;; 2p) @@ -1383,7 +1476,7 @@ passtwo="stats=\"$OUTFILE.log\":pass=2:bitrate=$vbitrate" OPTS1="-map 0:0" OPTS2="-an -f null -y /dev/null" - OPTS3="-map 0:0 -disposition:v:0 default $fps $ofps $NOSUBS $MDATA $CHPS $METATITLE $METAGENRE $METAYEAR $METACOMMENT $vfilters $sws" + OPTS3="-map 0:0 -disposition:v:0 default $ofps $NOSUBS $MDATA $CHPS $METATITLE $METAGENRE $METAYEAR $METACOMMENT $vfilters $sws" OPTS4="${audparams*} ${auddis*} ${subcopy*} ${subdis*} $strict $movflags $METACOVER \"$OUTPUT\"" ;; esac
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
.