Projects
Multimedia
ffx264
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 8
View file
ffx264.changes
Changed
@@ -1,4 +1,20 @@ ------------------------------------------------------------------- +Sat Nov 05 10:56: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 + +------------------------------------------------------------------- Fri Nov 04 10:43:00 UTC 2016 - neutrino8@opensuse.org - Update to version 3.0.8
View file
ffx264-3.0.8.tar.gz/ChangeLog -> ffx264-3.0.9.tar.gz/ChangeLog
Changed
@@ -1,3 +1,16 @@ +2016-11-05 - ffx264 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 + 2016-11-04 - ffx264 3.0.8 * Bugfix: the scale variable was used twice for different things causing an overwrite of the scale filter parameters, which
View file
ffx264-3.0.8.tar.gz/ffx264 -> ffx264-3.0.9.tar.gz/ffx264
Changed
@@ -2,15 +2,15 @@ # # Small script to encode to H.264/AVC video using FFmpeg and libx264. # Author: Grozdan "microchip" Nikolov <neutrino8@gmail.com> -# Version: 3.0.8 -# Date: 2016-11-04 +# Version: 3.0.9 +# Date: 2016-11-05 # 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.8" +version="3.0.9" CFG="$HOME/.ffx264" cfgversion="24" @@ -523,8 +523,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 @@ -532,8 +532,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 } @@ -554,13 +554,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!" @@ -721,7 +723,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 @@ -744,6 +746,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" @@ -766,63 +783,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" ;; "") @@ -932,6 +973,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)" @@ -981,6 +1023,11 @@ abropts[i]="32-512" abrdef[i]="448" ;; + fdk-aac) + acdc[i]="libfdk_aac" + abropts[i]="8-512" + abrdef[i]="448" + ;; mp3) acdc[i]="libmp3lame" ameta[i]="MP3" @@ -1017,8 +1064,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) audparams[1]="-an" @@ -1063,6 +1116,21 @@ if [ "${acodec[i]}" != "copy" ]; then if [ "${acodec[i]}" != "flac" ]; then if [ "${acodec[i]}" != "pcm" ]; then + if [ "${acodec[i]}" = "fdk-aac" ]; then + printf "Track $i: Which AAC Profile to Use? [LC/HE/HEv2 - default is LC]: " + read aprof[i] + case "${aprof[i]}" in + lc|LC|"") ameta[i]="LC-AAC"; aacprof[i]="aac_low" ;; + he|HE) ameta[i]="HE-AACv1"; aacprof[i]="aac_he" ;; + hev2|HEv2|HEV2) ameta[i]="HE-AACv2"; aacprof[i]="aac_he_v2" ;; + *) + error "- Invalid AAC profile!" + exit 1 + ;; + esac + audprofile[i]="-profile:a:${audmapval[i]} ${aacprof[i]} -afterburner:a:${audmapval[i]} 1" + + fi printf "Track $i: Specify the Audio Bitrate in kbps [${abropts[i]} - default is ${abrdef[i]}]: " read abr[i] test -z "${abr[i]}" && abitrate[i]="${abrdef[i]}k" || abitrate[i]="${abr[i]}k" @@ -1089,6 +1157,12 @@ ac3|eac3|dts|"") chanrange[i]="1-6"; defchan[i]="6" ;; aac|opus|vorbis|flac|pcm) chanrange[i]="1-8"; defchan[i]="8" ;; mp3) chanrange[i]="1-2"; defchan[i]="2" ;; + fdk-aac) + case "${aacprof[i]}" in + aac_low|aac_he) chanrange[i]="1-8"; defchan[i]="8" ;; + *) chanrange[i]="1-2"; defchan[i]="2" ;; + esac + ;; esac printf "Track $i: How many Channels to Encode? [${chanrange[i]} - default is ${defchan[i]}]: " read achan[i] @@ -1129,6 +1203,19 @@ ;; esac ;; + fdk-aac) + case "${aacprof[i]}" in + aac_he_v2) + case "${ach[i]}" in + 1|2) true ;; + *) + error "-> HE-AACv2 supports only 1-2 channels!" + exit 1 + ;; + esac + ;; + esac + ;; mp3) case "${ach[i]}" in 1|2) true ;; @@ -1290,11 +1377,17 @@ fi fi - audparams[i]="${audmap[i]} -c:a:${audmapval[i]} ${acdc[i]} ${audbtr[i]} ${audchan[i]} ${audfilters[i]} ${audlang[i]} ${audmeta[i]}" + audparams[i]="${audmap[i]} -c:a:${audmapval[i]} ${acdc[i]} ${audprofile[i]} ${audbtr[i]} ${audchan[i]} ${audfilters[i]} ${audlang[i]} ${audmeta[i]}" 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 @@ -1334,7 +1427,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" @@ -1378,7 +1471,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) @@ -1386,7 +1479,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
.