Projects
Multimedia
ffhevc
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 13
View file
ffhevc.changes
Changed
@@ -1,4 +1,18 @@ ------------------------------------------------------------------- +Wed Nov 09 07:00:00 UTC 2016 - neutrino8@opensuse.org + +- Update to version 2.9.7 + * Renamed config var CON to CONFMT. Updates config file version + to 29 + * Reduced some duplication in the audio codec checks for the + container formats + * Reduced some error message duplication when checking if an + additional container supports an audio codec + * Rework to the additional container selection code + * Added color functions for the additional container conversion + * Added back support for the MOV container + +------------------------------------------------------------------- Tue Nov 08 10:10:00 UTC 2016 - neutrino8@opensuse.org - Update to version 2.9.6
View file
ffhevc.spec
Changed
@@ -17,7 +17,7 @@ Name: ffhevc -Version: 2.9.6 +Version: 2.9.7 Release: 0 Summary: A small shell script for encoding to H.265/HEVC with ffmpeg License: GPL-2.0+
View file
ffhevc-2.9.6.tar.gz/ChangeLog -> ffhevc-2.9.7.tar.gz/ChangeLog
Changed
@@ -1,3 +1,13 @@ +2016-11-09 - ffhevc 2.9.7 + * Renamed config var CON to CONFMT. Updates config file version to 29 + * Reduced some duplication in the audio codec checks for the container + formats + * Reduced some error message duplication when checking if an additional + container supports an audio codec + * Rework to the additional container selection code + * Added color functions for the additional container conversion + * Added back support for the MOV container + 2016-11-08 - ffhevc 2.9.6 * Added support for encoding to TrueHD audio. Requires a very recent ffmpeg version, preferably latest from git
View file
ffhevc-2.9.6.tar.gz/ffhevc -> ffhevc-2.9.7.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: 2.9.6 -# Date: 2016-11-08 +# Version: 2.9.7 +# Date: 2016-11-09 # # ffhevc is free software ; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -23,10 +23,10 @@ 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.6" +version="2.9.7" CFG="$HOME/.ffhevc" -cfgversion="28" +cfgversion="29" genconfig_func() { cat<<EOF>>"$CFG" @@ -42,9 +42,9 @@ # time if a path is provided OUTDIR="$HOME" -# Container extension +# Container format extension # Leave empty to ask each time -CON="mkv" +CONFMT="mkv" # Nice value (0-19) NICE="19" @@ -272,7 +272,7 @@ brown "| |_| |_| '_ \ / _ \ \ / / __|" brown "| _| _| | | | __/\ V / (__" brown "|_| |_| |_| |_|\___| \_/ \___|" -brown "v$version" +brown "v$version by microchip" echo if [ -f "$CFG" ]; then @@ -363,20 +363,20 @@ rm -f "$WRITE" fi - if [ -z "$CON" ]; then + if [ -z "$CONFMT" ]; then printf "Which Container Format to use? [default is mkv]: " read confmt - test -z "$confmt" && CON="mkv" || CON="$confmt" + test -z "$confmt" && CONFMT="mkv" || CONFMT="$confmt" fi - CON="$(echo "$CON" | tr '[:upper:]' '[:lower:]')" + CONFMT="$(echo "$CONFMT" | tr '[:upper:]' '[:lower:]')" - case "$CON" in - mp4) movflags="-movflags +faststart" ;; - mkv) true ;; + case "$CONFMT" in + mp4|mov) movflags="-movflags +faststart" ;; + mkv) true ;; *) error "-> HEVC video not supported by chosen container!" - error "-> Supported containers are: mkv and mp4" + error "-> Supported containers are: mkv, mp4 and mov" error "-> Check your config file, if needed, in '$CFG'" exit 1 ;; @@ -385,39 +385,46 @@ printf "Output to Additional Container Formats? [y/N]: " read acf if [ "$acf" = "y" -o "$acf" = "Y" ]; then - printf "Specify the Container Formats [example: mp4,mkv - press 'Enter' to skip]: " + printf "Specify the Container Formats [example: mkv,mp4,mov - press 'Enter' to skip]: " read econ test ! -z "$econ" && extracon="$(echo "$econ" | sed 's|,| |g' | tr '[:upper:]' '[:lower:]')" if [ ! -z "$extracon" ]; then - for i in $extracon; do - if [ "$i" = "$CON" ]; then - error "-> Additional container matches the main output container!" - exit 1 - fi - case "$i" in - mkv|mp4) true ;; - *) + container_func() { + case "$1" in + mp4|mov) + green "-> Note: additional container $i supports the following audio codecs:" + ;; + esac + case "$1" in + mp4) green "-> ac3|eac3|dts|aac|fdk-aac|mp3|vorbis|copy|nosound" ;; + mov) green "-> ac3|eac3|dts|aac|fdk-aac|mp3|vorbis|flac|copy|nosound" ;; + other) error "-> HEVC video not supported by the $i container!" - error "-> Supported containers are: mkv and mp4" + error "-> Supported containers are: mkv, mp4 and mov" + echo exit 1 ;; esac + } + + for i in $extracon; do + if [ "$i" = "$CONFMT" ]; then + error "-> Additional container matches the main output container!" + exit 1 + fi echo case "$i" in - mkv) - green "-> Note: additional container $i supports all the audio codecs" - ;; - mp4) - green "-> Note: additional container $i supports the following audio codecs:" - green "-> ac3|eac3|dts|aac|fdk-aac|mp3|vorbis|copy|nosound" - ;; + mkv) green "-> Note: additional container $i supports all the audio codecs" ;; + mp4) container_func mp4 ;; + mov) container_func mov ;; + *) container_func other ;; esac done echo fi fi - OUTPUT="$OUTPUT.$CON" + OUTPUT="$OUTPUT.$CONFMT" test -e "$OUTPUT" && mv -f "$OUTPUT" "$OUTPUT.old" @@ -438,7 +445,7 @@ test ! -z "$comment" && COMMENT="$comment" fi -if [ "$CON" = "mkv" ]; then +if [ "$CONFMT" = "mkv" ]; then printf "Specify a Cover Image in JPG/PNG format [press 'Enter' to skip]: " read -e cover if [ ! -z "$cover" ]; then @@ -1183,18 +1190,25 @@ ;; esac - case "$CON" in + case "$CONFMT" in mp4) case "${acodec[i]}" in - pcm|opus|flac|truehd) - error "-> $(echo "${acodec[i]}" | tr '[:lower:]' '[:upper:]') is not supported by the MP4 container!" - error "-> Check your config file, if needed, in '$CFG'" - exit 1 - ;; + pcm|opus|flac|truehd) asupport[i]="0" ;; + esac + ;; + mov) + case "${acodec[i]}" in + pcm|opus|truehd) asupport[i]="0" ;; esac ;; esac + if [ ! -z "${asupport[i]}" ]; then + error "-> ${acodec[i]} is not supported by the $CONFMT container!" + error "-> Check your config file, if needed, in '$CFG'" + exit 1 + fi + if [ "${acodec[i]}" != "copy" ]; then case "${acodec[i]}" in fdk*) @@ -1272,6 +1286,7 @@ exit 1 ;; esac + case "${acodec[i]}" in ac3|eac3|truehd|"") case "${ach[i]}" in @@ -1481,7 +1496,11 @@ done if [ ! -z "$extracon" ]; then - formats_url="https://en.wikipedia.org/wiki/Comparison_of_video_container_formats#Formats_supported" + conerror_func() { + error "-> Additional container $i does not support ${acodec[a]} audio!" + error "-> See: https://en.wikipedia.org/wiki/Comparison_of_video_container_formats#Formats_supported" + exit 1 + } for i in $extracon; do case "$i" in # MKV is missing from the list since it supports @@ -1489,11 +1508,14 @@ mp4) for a in $(eval echo "{1..$MAX_AUD_TRACKS}"); do case "${acodec[a]}" in - pcm|opus|flac|truehd) - error "-> Additional container $i does not support ${acodec[a]} audio!" - error "-> See: $formats_url" - exit 1 - ;; + pcm|opus|flac|truehd) conerror_func ;; + esac + done + ;; + mov) + for a in $(eval echo "{1..$MAX_AUD_TRACKS}"); do + case "${acodec[a]}" in + pcm|opus|truehd) conerror_func ;; esac done ;; @@ -1632,11 +1654,15 @@ encoder_func $mode >> "$OUTFILE.sh" echo "" >> "$OUTFILE.sh" if [ ! -z "$extracon" ]; then + echo "grn() { echo -e \"\e[1;32m\$1\e[0;39;49m\"; }" >> "$OUTFILE.sh" + echo "red() { echo -e \"\e[1;31m\$1\e[0;39;49m\"; }" >> "$OUTFILE.sh" for i in $extracon; do + echo "" >> "$OUTFILE.sh" echo "echo" >> "$OUTFILE.sh" - echo "echo -e \"\e[1;32m-> Converting to $i...\e[0;39;49m\"" >> "$OUTFILE.sh" + echo "grn \"-> Converting to $i...\"" >> "$OUTFILE.sh" + echo "" >> "$OUTFILE.sh" echo "$FFMPEG -i \"$OUTPUT\" -map 0 -c copy \"${OUTPUT%.*}.$i\" >/dev/null 2>&1" >> "$OUTFILE.sh" - echo "test \"\$?\" = \"0\" && echo -e \"\e[1;32m-> Done\e[0;39;49m\" || echo -e \"\e[1;31m-> Failed!\e[0;39;49m\"" >> "$OUTFILE.sh" + echo "test \"\$?\" = \"0\" && grn \"-> Done\" || red \"-> Failed!\"" >> "$OUTFILE.sh" done echo "echo" >> "$OUTFILE.sh" fi
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
.