Projects
Multimedia
ffhevc
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 161
View file
ffhevc.changes
Changed
@@ -1,4 +1,15 @@ ------------------------------------------------------------------- +Tue Oct 22 04:20:00 UTC 2019 - neutrino8@opensuse.org + +- Update to version 3.9.5 + * Add support for SRT/SSA/AAS subtitles for the MOV container + * Add color characteristics to MP4Box if output is MOV + * Use smpte170m for option 0 in the color primaries code + * Update colormatrix in the video_colorspace_func() function + to smpte170m for NTSC + * Some code optimizations + +------------------------------------------------------------------- Mon Oct 21 08:43:00 UTC 2019 - neutrino8@opensuse.org - Update to version 3.9.4
View file
ffhevc.spec
Changed
@@ -17,7 +17,7 @@ Name: ffhevc -Version: 3.9.4 +Version: 3.9.5 Release: 0 Summary: A small shell script for encoding to H.265/HEVC with ffmpeg License: GPL-2.0+
View file
ffhevc-3.9.4.tar.gz/ChangeLog -> ffhevc-3.9.5.tar.gz/ChangeLog
Changed
@@ -1,3 +1,11 @@ +2019-10-22 - ffhevc 3.9.5 + * Add support for SRT/SSA/AAS subtitles for the MOV container + * Add color characteristics to MP4Box if output is MOV + * Use smpte170m for option 0 in the color primaries code + * Update colormatrix in the video_colorspace_func() function + to smpte170m for NTSC + * Some code optimizations + 2019-10-21 - ffhevc 3.9.4 * Renamed variables $MDATA and $CHPS to $METADATA and $CHAPS
View file
ffhevc-3.9.4.tar.gz/ffhevc -> ffhevc-3.9.5.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.9.4 -# Date: 2019-10-21 +# Version: 3.9.5 +# Date: 2019-10-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.9.4" +version="3.9.5" CFG="$HOME/.ffhevc" cfgversion="50" @@ -561,10 +561,10 @@ if [ "$LOG" = "y" ]; then if [ -z "$batchmode" ]; then - export FFREPORT="level=40:file=$(echo "${OUTPUT%.*}_verbose.log" | sed 's| |_|g')" + export FFREPORT="level=40:file=$(echo "${OUTPUT%.*}_verbose$$.log" | sed 's| |_|g')" else verbose_func() { - echo "export FFREPORT=\"level=40:file=\$(echo \"$(dirname "$OUTPUT")/\${i%.*}_verbose.log\" | sed 's| |_|g')\"" + echo "export FFREPORT=\"level=40:file=\$(echo \"$(dirname "$OUTPUT")/\${i%.*}_verbose$$.log\" | sed 's| |_|g')\"" } fi verbose="-v verbose" @@ -1307,7 +1307,7 @@ ;; 5) cspace="iall=smpte170m:ispace=smpte170m:itrc=smpte170m:iprimaries=smpte170m:irange=$irange:all=bt470m:space=bt470m:trc=bt470m:primaries=bt470m:range=$orange:dither=fsb" - colorprim=":colormatrix=bt470m:colorprim=bt470m:transfer=bt470m" + colorprim=":colormatrix=smpte170m:colorprim=bt470m:transfer=bt470m" ;; 6) cspace="iall=smpte170m:ispace=smpte170m:itrc=smpte170m:iprimaries=smpte170m:irange=$irange:all=bt470bg:space=bt470bg:trc=bt470bg:primaries=bt470bg:range=$orange:dither=fsb" @@ -1324,7 +1324,7 @@ ;; 9) cspace="iall=bt470bg:ispace=bt470bg:itrc=bt470bg:iprimaries=bt470bg:irange=$irange:all=bt470m:space=bt470m:trc=bt470m:primaries=bt470m:range=$orange:dither=fsb" - colorprim=":colormatrix=bt470m:colorprim=bt470m:transfer=bt470m" + colorprim=":colormatrix=smpte170m:colorprim=bt470m:transfer=bt470m" ;; 10) cspace="iall=bt470bg:ispace=bt470bg:itrc=bt470bg:iprimaries=bt470bg:irange=$irange:all=smpte170m:space=smpte170m:trc=smpte170m:primaries=smpte170m:range=$orange:dither=fsb" @@ -1341,7 +1341,7 @@ ;; 13) cspace="iall=bt709:ispace=bt709:itrc=bt709:iprimaries=bt709:irange=$irange:all=bt470m:space=bt470m:trc=bt470m:primaries=bt470m:range=$orange:dither=fsb" - colorprim=":colormatrix=bt470m:colorprim=bt470m:transfer=bt470m" + colorprim=":colormatrix=smpte170m:colorprim=bt470m:transfer=bt470m" ;; 14) cspace="iall=bt709:ispace=bt709:itrc=bt709:iprimaries=bt709:irange=$irange:all=smpte170m:space=smpte170m:trc=smpte170m:primaries=smpte170m:range=$orange:dither=fsb" @@ -1359,7 +1359,7 @@ 17) video_csmisc_func cspace="iall=bt2020:ispace=bt2020ncl:itrc=bt2020$bd:iprimaries=bt2020:irange=$irange:all=bt470m:space=bt470m:trc=bt470m:primaries=bt470m:range=$orange:dither=fsb" - colorprim=":colormatrix=bt470m:colorprim=bt470m:transfer=bt470m" + colorprim=":colormatrix=smpte170m:colorprim=bt470m:transfer=bt470m" ;; 18) video_csmisc_func @@ -1783,7 +1783,7 @@ printf "Specify the Color Primaries [default is 8]: " read cpopt case "$cpopt" in - 0) matrix="bt470m"; prim="bt470m"; transfer="bt470m" ;; + 0) matrix="smpte170m"; prim="bt470m"; transfer="bt470m" ;; 1) matrix="smpte170m"; prim="smpte170m"; transfer="smpte170m" ;; 2) matrix="bt470bg"; prim="bt470bg"; transfer="bt470bg" ;; 3) matrix="bt709"; prim="bt709"; transfer="bt709" ;; @@ -1807,6 +1807,13 @@ ;; esac colorprim=":colormatrix=$matrix:colorprim=$prim:transfer=$transfer" + # For MP4Box mov output + case "$cpopt" in + 0|1|2) colr=":colr=nclc,2,2,2" ;; + 3) colr=":colr=nclc,1,1,1" ;; + [4-7) colr=":colr=nclc,3,3,3" ;; + *) true ;; + esac fi fi @@ -2141,14 +2148,6 @@ exit 1 ;; esac - case "$CONFMT" in - mkv|mp4|m2ts|mts|ts) true ;; - *) - error "-> The $CONFMT container doesn't support SRT/SSA/ASS subtitles!" - error "-> Supported containers are: mkv, mp4, m2ts, mts and ts" - exit 1 - ;; - esac if [ "$SUBCP" != "0" ]; then for i in $(eval echo "{1..$SUBCP}"); do subindex[i]="$(($i-1))" @@ -2163,8 +2162,8 @@ # as default. test "$i" = "1" && sdis="default" || sdis="none" case "$CONFMT" in - mp4) submuxer_in="mov_text" ;; - *) submuxer_in="copy" ;; + mp4|mov) submuxer_in="mov_text" ;; + *) submuxer_in="copy" ;; esac subcopy[i]="-map ${subnr[i]} -c:s:${subindex[i]} $submuxer_in ${sublang[i]} -disposition:s:${subindex[i]} $sdis" else @@ -2176,29 +2175,6 @@ fi ;; ext) - case "$CONFMT" in - mkv|mp4|m2ts|mts|ts) true ;; - *) - error "-> The $CONFMT container doesn't support SRT/SSA/ASS subtitles!" - error "-> Supported containers are: mkv, mp4, m2ts, mts and ts" - exit 1 - ;; - esac - if [ ! -z "$remuxcon" ]; then - for i in $remuxcon; do - case "$i" in - mkv|mp4|m2ts|mts|ts) true ;; - *) - echo - error "-> Warning: One or more chosen additional container" - error " doesn't support SRT/SSA/ASS subtitles!" - error "-> Subtitles will be ignored during remuxing!" - echo - break - ;; - esac - done - fi printf "How many External Subtitles to Add? [0-inf - default is 1]: " read subext case "$subext" in @@ -2228,8 +2204,8 @@ test "$i" = "1" && sdispo="default" || sdispo="none" fi case "$CONFMT" in - mp4) submuxer_ext="mov_text" ;; - *) submuxer_ext="copy" ;; + mp4|mov) submuxer_ext="mov_text" ;; + *) submuxer_ext="copy" ;; esac EXTSUBS[i]="-i \"$(readlink -e "${subfile[i]}")\"" subcpy[i]="-map $i:0 -c:s:${subidx[i]} $submuxer_ext ${sublng[i]} -disposition:s:${subidx[i]} $sdispo" @@ -3514,9 +3490,12 @@ case "$CONFMT" in mp4|mov) if [ ! -z "$MP4COVER" ]; then + if [ "$CONFMT" = "mov" ]; then + color="$colr" + fi echo "echo" >> "$OUTFILE" echo "green \"-> Adding cover image...\"" >> "$OUTFILE" - echo "$MP4BOX -add \"$OUTPUT\" -itags cover=\"$(readlink -e "$cover")\":name=\"$(basename "${OUTPUT%.*}")\":genre=\"$genre\":created=\"$year\":comment=\"$COMMENT\" -mpeg4 -new \"${OUTPUT%.*}_COVER_$$.$CONFMT\" >/dev/null 2>&1" >> "$OUTFILE" + echo "$MP4BOX -add \"$OUTPUT\"$color -itags cover=\"$(readlink -e "$cover")\":name=\"$(basename "${OUTPUT%.*}")\":genre=\"$genre\":created=\"$year\":comment=\"$COMMENT\" -mpeg4 -new \"${OUTPUT%.*}_COVER_$$.$CONFMT\" >/dev/null 2>&1" >> "$OUTFILE" echo "RET=\$?" >> "$OUTFILE" echo "test \"\$RET\" = \"0\" && green \"-> Done\" || red \"-> Failed!\"" >> "$OUTFILE" echo "if [ \"\$RET\" = \"0\" ]; then" >> "$OUTFILE" @@ -3524,13 +3503,16 @@ echo "fi" >> "$OUTFILE" echo "echo" >> "$OUTFILE" echo "" >> "$OUTFILE" + COVER="1" fi ;; esac if [ ! -z "$remuxcon" ]; then for i in $remuxcon; do - echo "" >> "$OUTFILE" - echo "echo" >> "$OUTFILE" + if [ -z "$COVER" ]; then + echo "" >> "$OUTFILE" + echo "echo" >> "$OUTFILE" + fi echo "green \"-> Remuxing to $i...\"" >> "$OUTFILE" case "$i" in mkv) @@ -3538,21 +3520,21 @@ MKVCOVER2="-attach \"$(readlink -e "$cover")\" -metadata:s:t mimetype=\"image/$img\"" fi ;; + mov) color="$colr"; MKVCOVER2="" ;; *) MKVCOVER2="" ;; esac if [ "$subparams" != "-sn" ]; then case "$i" in - mp4) suboption="-c:s mov_text" ;; - mov) suboption="-sn" ;; + mp4|mov) suboption="-c:s mov_text" ;; *) case "$(basename "${OUTPUT##*.}")" in - mp4) suboption="-c:s srt" ;; - *) suboption="-c:s copy" ;; + mp4|mov) suboption="-c:s srt" ;; + *) suboption="-c:s copy" ;; esac ;; esac fi - echo "$FFMPEG -i \"$OUTPUT\" -map 0 -c:v copy -c:a copy $suboption $strict $MKVCOVER2 $METADATA $CHAPS $METATITLE $METAGENRE $METAYEAR $METACOMMENT ${audmeta[*]} ${audlang[*]} ${sublang[*]} ${sublng[*]} \"${OUTPUT%.*}.$i\" >/dev/null 2>&1" >> "$OUTFILE" + echo "$FFMPEG -i \"$OUTPUT\" -map 0 -c:v copy -c:a copy $suboption $strict $MKVCOVER2 $CHAPS $METATITLE $METAGENRE $METAYEAR $METACOMMENT ${audmeta[*]} ${audlang[*]} ${sublang[*]} ${sublng[*]} \"${OUTPUT%.*}.$i\" >/dev/null 2>&1" >> "$OUTFILE" echo "test \"\$?\" = \"0\" && green \"-> Done\" || red \"-> Failed!\"" >> "$OUTFILE" case "$i" in mp4|mov) @@ -3560,7 +3542,7 @@ echo "" >> "$OUTFILE" echo "echo" >> "$OUTFILE" echo "green \"-> Adding cover image...\"" >> "$OUTFILE" - echo "$MP4BOX -add \"${OUTPUT%.*}.$i\" -itags cover=\"$(readlink -e "$cover")\":name=\"$(basename "${OUTPUT%.*}")\":genre=\"$genre\":created=\"$year\":comment=\"$COMMENT\" -mpeg4 -new \"${OUTPUT%.*}_COVER_$$.$i\" >/dev/null 2>&1" >> "$OUTFILE" + echo "$MP4BOX -add \"${OUTPUT%.*}.$i\"$color -itags cover=\"$(readlink -e "$cover")\":name=\"$(basename "${OUTPUT%.*}")\":genre=\"$genre\":created=\"$year\":comment=\"$COMMENT\" -mpeg4 -new \"${OUTPUT%.*}_COVER_$$.$i\" >/dev/null 2>&1" >> "$OUTFILE" echo "RET=\$?" >> "$OUTFILE" echo "test \"\$RET\" = \"0\" && green \"-> Done\" || red \"-> Failed!\"" >> "$OUTFILE" echo "if [ \"\$RET\" = \"0\" ]; then" >> "$OUTFILE"
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
.