Projects
Multimedia
ffhevc
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 14
View file
ffhevc.changes
Changed
@@ -1,4 +1,21 @@ ------------------------------------------------------------------- +Thu Nov 10 21:15:00 UTC 2016 - neutrino8@opensuse.org + +- Update to version 2.9.8 + * Check if name of input file matches that of output file and warn + and exit. Requires the realpath utility + * Added support for the m2ts, mts and ts containers + * Merged the code that checks if an audio codec is supported by a + container with that that checks for additional output containers. + Removes code duplication and maintainability + * Update to the audio sample rates. Sync them with + ffmpeg -h encoder=<encoder> + * Restrict TrueHD channels to 2, 5 and 6 as that's what the encoder + supports + * Updated the README file + + +------------------------------------------------------------------- Wed Nov 09 07:00:00 UTC 2016 - neutrino8@opensuse.org - Update to version 2.9.7
View file
ffhevc.spec
Changed
@@ -17,7 +17,7 @@ Name: ffhevc -Version: 2.9.7 +Version: 2.9.8 Release: 0 Summary: A small shell script for encoding to H.265/HEVC with ffmpeg License: GPL-2.0+
View file
ffhevc-2.9.7.tar.gz/ChangeLog -> ffhevc-2.9.8.tar.gz/ChangeLog
Changed
@@ -1,3 +1,15 @@ +2016-11-10 - ffhevc 2.9.8 + * Check if name of input file matches that of output file and warn + and exit. Requires the realpath utility + * Added support for the m2ts, mts and ts containers + * Merged the code that checks if an audio codec is supported by a + container with that that checks for additional output containers. + Removes code duplication and maintainability + * Update to the audio sample rates. Sync them with ffmpeg -h encoder=<encoder> + * Restrict TrueHD channels to 2, 5 and 6 as that's what the encoder + supports + * Updated the README file + 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
View file
ffhevc-2.9.7.tar.gz/README -> ffhevc-2.9.8.tar.gz/README
Changed
@@ -27,7 +27,7 @@ - it supports cover art for the MKV container. - it supports the x265 presets and tune profiles. - it supports custom written preset files. -- it can output to more than one container. +- it can output to more than one container format. Parameters:
View file
ffhevc-2.9.7.tar.gz/ffhevc -> ffhevc-2.9.8.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.7 -# Date: 2016-11-09 +# Version: 2.9.8 +# Date: 2016-11-10 # # 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,7 +23,7 @@ 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.7" +version="2.9.8" CFG="$HOME/.ffhevc" cfgversion="29" @@ -371,12 +371,28 @@ CONFMT="$(echo "$CONFMT" | tr '[:upper:]' '[:lower:]')" + OUTPUT="$OUTPUT.$CONFMT" + + if [ -x "$(which realpath 2>/dev/null)" ]; then + if [ "$(realpath -s "$input")" = "$(realpath -s "$OUTPUT")" ]; then + error "-> Input file matches output file!" + exit 1 + fi + fi + + if [ -e "$OUTPUT" ]; then + echo + error "-> Renaming existing file to '$OUTPUT.old'" + echo + mv -f "$OUTPUT" "$OUTPUT.old" + fi + case "$CONFMT" in - mp4|mov) movflags="-movflags +faststart" ;; - mkv) true ;; + mp4|mov) movflags="-movflags +faststart" ;; + mkv|m2ts|mts|ts) true ;; *) error "-> HEVC video not supported by chosen container!" - error "-> Supported containers are: mkv, mp4 and mov" + error "-> Supported containers are: mkv, mp4, mov, m2ts, mts and ts" error "-> Check your config file, if needed, in '$CFG'" exit 1 ;; @@ -385,7 +401,7 @@ printf "Output to Additional Container Formats? [y/N]: " read acf if [ "$acf" = "y" -o "$acf" = "Y" ]; then - printf "Specify the Container Formats [example: mkv,mp4,mov - press 'Enter' to skip]: " + printf "Specify the Container Formats [example: mp4,mov,m2ts - press 'Enter' to skip]: " read econ test ! -z "$econ" && extracon="$(echo "$econ" | sed 's|,| |g' | tr '[:upper:]' '[:lower:]')" if [ ! -z "$extracon" ]; then @@ -400,7 +416,7 @@ 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, mp4 and mov" + error "-> Supported containers are: mkv, mp4, mov, m2ts, mts and ts" echo exit 1 ;; @@ -414,20 +430,16 @@ fi echo case "$i" in - mkv) green "-> Note: additional container $i supports all the audio codecs" ;; - mp4) container_func mp4 ;; - mov) container_func mov ;; - *) container_func other ;; + mkv|m2ts|ts) 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.$CONFMT" - - test -e "$OUTPUT" && mv -f "$OUTPUT" "$OUTPUT.old" - METATITLE="-metadata title=\"$(basename "${OUTPUT%.*}")\" -metadata:s:v:0 title=\"$(basename "${OUTPUT%.*}")\"" fi @@ -1190,24 +1202,33 @@ ;; esac - case "$CONFMT" in - mp4) - case "${acodec[i]}" in - 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'" + conerror_func() { + if [ ! -z "$extracon" ]; then + error "-> Additional container $c does not support ${acodec[i]} audio!" + else + error "-> The $c container does not support ${acodec[i]} audio!" + error "-> Check your config file, if needed, in '$CFG'" + fi + error "-> See: https://en.wikipedia.org/wiki/Comparison_of_video_container_formats" exit 1 - fi + } + + # mkv/m2ts/mts/ts are missing from the list since they + # support all the audio codecs supported by the script + for c in $CONFMT $extracon; do + case "$c" in + mp4) + case "${acodec[i]}" in + pcm|opus|flac|truehd) conerror_func ;; + esac + ;; + mov) + case "${acodec[i]}" in + pcm|opus|truehd) conerror_func ;; + esac + ;; + esac + done if [ "${acodec[i]}" != "copy" ]; then case "${acodec[i]}" in @@ -1258,9 +1279,11 @@ esac case "${acodec[i]}" in - ac3|eac3|truehd|dts|"") chanrange[i]="1-6"; defchan[i]="6" ;; + ac3|eac3|"") 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" ;; + truehd) chanrange[i]="2/5/6"; defchan[i]="6" ;; + dts) chanrange[i]="1/2/4/5/6"; defchan[i]="6" ;; fdk*) case "${aacprof[i]}" in aac_low|aac_he) chanrange[i]="1-8"; defchan[i]="8" ;; @@ -1288,19 +1311,27 @@ esac case "${acodec[i]}" in - ac3|eac3|truehd|"") + ac3|eac3|"") case "${ach[i]}" in [1-6]) true ;; *) case "${acodec[i]}" in ac3|"") error "-> AC-3 supports only 1-6 channels!" ;; eac3) error "-> E-AC-3 encoder in ffmpeg supports only 1-6 channels!" ;; - truehd) error "-> TrueHD encoder in ffmpeg supports only 1-6 channels!" ;; esac exit 1 ;; esac ;; + truehd) + case "${ach[i]}" in + 2|5|6) true ;; + *) + error "-> TrueHD encoder in ffmpeg supports only 2, 5 and 6 channels!" + exit 1 + ;; + esac + ;; dts) case "${ach[i]}" in 1|2|4|5|6) true ;; @@ -1371,10 +1402,10 @@ error "-> Track $i: could not detect the audio sample rate!" fi echo + brown " Supported Sample Rates" + brown " ~~~~~~~~~~~~~~~~~~~~~~" case "${acodec[i]}" in - mp3|ac3|eac3|dts|"") - brown " Supported Sample Rates" - brown " ~~~~~~~~~~~~~~~~~~~~~~" + ac3|eac3|"")
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
.