Projects
Multimedia
ffx264
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 15
View file
ffx264.changes
Changed
@@ -1,4 +1,20 @@ ------------------------------------------------------------------- +Thu Nov 10 21:15:00 UTC 2016 - neutrino8@opensuse.org + +- Update to version 3.1.4 + * 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, ts and flv 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 + currently supports + * Updated the README file + +------------------------------------------------------------------- Wed Nov 09 07:00:00 UTC 2016 - neutrino8@opensuse.org - Update to version 3.1.3
View file
ffx264.spec
Changed
@@ -17,7 +17,7 @@ Name: ffx264 -Version: 3.1.3 +Version: 3.1.4 Release: 0 Summary: A small shell script for encoding to H.264 with ffmpeg License: GPL-2.0+
View file
ffx264-3.1.3.tar.gz/ChangeLog -> ffx264-3.1.4.tar.gz/ChangeLog
Changed
@@ -1,3 +1,15 @@ +2016-11-10 - ffx264 3.1.4 + * 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, ts and flv 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 + currently supports + * Updated the README file + 2016-11-09 - ffx264 3.1.3 * Renamed config var CON to CONFMT. Updates config file version to 25 * Reduced some duplication in the audio codec checks for the container
View file
ffx264-3.1.3.tar.gz/README -> ffx264-3.1.4.tar.gz/README
Changed
@@ -27,7 +27,7 @@ - it supports cover art for the MKV container. - it supports the x264 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
ffx264-3.1.3.tar.gz/ffx264 -> ffx264-3.1.4.tar.gz/ffx264
Changed
@@ -2,8 +2,8 @@ # # Small script to encode to H.264/AVC video using FFmpeg and libx264. # Author: Grozdan "microchip" Nikolov <neutrino8@opensuse.org> -# Version: 3.1.3 -# Date: 2016-11-09 +# Version: 3.1.4 +# Date: 2016-11-10 # # ffx264 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="3.1.3" +version="3.1.4" CFG="$HOME/.ffx264" cfgversion="25" @@ -372,13 +372,29 @@ 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|m4v|mov) movflags="-movflags +faststart" ;; - avi) annexb="-bsf:v h264_mp4toannexb" ;; - mkv) true ;; + mp4|m4v|mov) movflags="-movflags +faststart" ;; + avi|m2ts|mts|ts) annexb="-bsf:v h264_mp4toannexb" ;; + mkv|flv) true ;; *) error "-> H.264 video not supported by chosen container!" - error "-> Supported containers are: mkv, mp4, mov, m4v and avi" + error "-> Supported containers are: mkv, mp4, mov, m4v, m2ts, mts, ts, flv and avi" error "-> Check your config file, if needed, in '$CFG'" exit 1 ;; @@ -387,24 +403,25 @@ printf "Output to Additional Container Formats? [y/N]: " read acf if [ "$acf" = "y" -o "$acf" = "Y" ]; then - printf "Specify the Container Formats [example: mp4,mov,avi - press 'Enter' to skip]: " + printf "Specify the Container Formats [example: mp4,m2ts,mov - press 'Enter' to skip]: " read econ test ! -z "$econ" && extracon="$(echo "$econ" | sed 's|,| |g' | tr '[:upper:]' '[:lower:]')" if [ ! -z "$extracon" ]; then container_func() { case "$1" in - mp4|mov|m4v|avi) + mp4|mov|m4v|avi|flv) 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" ;; - m4v) green "-> ac3|aac|fdk-aac|copy|nosound" ;; - avi) green "-> ac3|eac3|dts|aac|fdk-aac|mp3|vorbis|pcm|flac|copy|nosound" ;; + 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" ;; + m4v) green "-> ac3|aac|fdk-aac|copy|nosound" ;; + avi) green "-> ac3|eac3|dts|aac|fdk-aac|mp3|vorbis|pcm|flac|copy|nosound" ;; + flv) green "-> aac|fdk-aac|mp3|copy|nosound" ;; other) error "-> H.264 video not supported by the $i container!" - error "-> Supported containers are: mkv, mp4, mov, m4v and avi" + error "-> Supported containers are: mkv, mp4, mov, m4v, m2ts, mts, ts, flv and avi" echo exit 1 ;; @@ -418,7 +435,13 @@ fi echo case "$i" in - mkv) green "-> Note: additional container $i supports all the audio codecs" ;; + mkv|m2ts|mts|ts) + green "-> Note: additional container $i supports all the audio codecs" + ;; + flv) + container_func flv + error "-> Note: you may need to resample the audio to 44100, 22050 or 11025 Hz!" + ;; mp4) container_func mp4 ;; mov) container_func mov ;; m4v) container_func m4v ;; @@ -430,10 +453,6 @@ 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 @@ -1197,34 +1216,49 @@ ;; 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 - ;; - m4v) - case "${acodec[i]}" in - eac3|dts|vorbis|flac|pcm|opus|truehd) asupport[i]="0" ;; - esac - ;; - avi) - case "${acodec[i]}" in - opus|truehd) asupport[i]="0" ;; - esac - ;; - esac - - if [ ! -z "${asupport[i]}" ]; then - error "-> ${acodec[i]} audio is not supported by the $CONFMT container!" - error "-> Check your config file, if needed, in '$CFG'" + conerror_func() { + test -z "${acodec[i]}" && audcodec[i]="ac3" || audcodec[i]="${acodec[i]}" + if [ ! -z "$extracon" ]; then + error "-> Additional container $c does not support ${audcodec[i]} audio!" + else + error "-> The $c container does not support ${audcodec[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 + ;; + m4v) + case "${acodec[i]}" in + eac3|dts|vorbis|flac|pcm|opus|truehd) conerror_func ;; + esac + ;; + avi) + case "${acodec[i]}" in + opus|truehd) conerror_func ;; + esac + ;; + flv) + case "${acodec[i]}" in + ac3|eac3|dts|vorbis|flac|opus|truehd|"") conerror_func ;; + esac + ;; + esac + done if [ "${acodec[i]}" != "copy" ]; then case "${acodec[i]}" in @@ -1275,9 +1309,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" ;;
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
.