Projects
Multimedia
ffxvid
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 60
View file
ffxvid.changes
Changed
@@ -1,4 +1,19 @@ ------------------------------------------------------------------- +Fri Oct 18 04:56:00 UTC 2019 - neutrino8@opensuse.org + +- Update to version 1.4.7 + * Bugfix: use correct video track for crop preview with MPlayer + * Bugfix: missing ;; in the additional container formats code + * Renamed variable SCAN_MULTIPLE_VID_TRACKS to SCAN_MULTI_VID_TRACKS + * Some reordering in the config file + * Set Catmull-Rom as default Bicubic/Spline tuning + * Add LPCM detection for audio copy + * Support the mp4/m4v containers + * Add support for cover art for the mp4/m4v/mov containers. + Requires MP4Box from GPAC + * Some code optimization + +------------------------------------------------------------------- Thu Oct 17 05:40:00 UTC 2019 - neutrino8@opensuse.org - Update to version 1.4.6
View file
ffxvid.spec
Changed
@@ -17,7 +17,7 @@ Name: ffxvid -Version: 1.4.6 +Version: 1.4.7 Release: 0 Summary: A small shell script for encoding to H.264 with ffmpeg License: GPL-2.0+ @@ -27,6 +27,7 @@ Requires: ffmpeg Requires: bc Requires: MPlayer +Requires: gpac BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch
View file
ffxvid-1.4.6.tar.gz/ChangeLog -> ffxvid-1.4.7.tar.gz/ChangeLog
Changed
@@ -1,3 +1,18 @@ +2019-10-18 - ffxvid 1.4.7 + * Bugfix: use correct video track for crop + preview with MPlayer + * Bugfix: missing ;; in the additional container + formats code + * Renamed variable SCAN_MULTIPLE_VID_TRACKS to + SCAN_MULTI_VID_TRACKS + * Some reordering in the config file + * Set Catmull-Rom as default Bicubic/Spline tuning + * Add LPCM detection for audio copy + * Support the mp4/m4v containers + * Add support for cover art for the mp4/m4v/mov + containers. Requires MP4Box from GPAC + * Some code optimization + 2019-10-17 - ffxvid 1.4.6 * Support the WMV container format
View file
ffxvid-1.4.6.tar.gz/ffxvid -> ffxvid-1.4.7.tar.gz/ffxvid
Changed
@@ -2,8 +2,8 @@ # # Small script to encode to Xvid video using FFmpeg. # Author: Grozdan "microchip" Nikolov <neutrino8@opensuse.org> -# Version: 1.4.6 -# Date: 2019-10-17 +# Version: 1.4.7 +# Date: 2019-10-18 # # ffx264 is free software ; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -24,10 +24,10 @@ brown() { echo -e "\e[0;33m$1\e[0;39;49m"; } error() { echo -e "\e[1;31m$1\e[0;39;49m"; } -version="1.4.6" +version="1.4.7" CFG="$HOME/.ffxvid" -cfgversion="10" +cfgversion="11" genconfig_func() { cat<<EOF>>"$CFG" @@ -45,10 +45,12 @@ # Container format extension # Leave empty to ask each time +# Supported are: +# avi/mkv/mp4/m4v/mov/wmv CONFMT="" # Scan for multiple video tracks? -SCAN_MULTIPLE_VID_TRACKS="y" +SCAN_MULTI_VID_TRACKS="y" # Nice value (0-19) NICE="19" @@ -80,9 +82,6 @@ # SCALER="" -# Support FPS conversion? -VID_FPS_CONVERT="y" - # Video filters VID_DENOISE="y" VID_DEBLOCK="y" @@ -93,6 +92,7 @@ VID_HDR_TO_SDR="y" VID_PIXEL_FORMAT="y" VID_COLORSPACE="y" +VID_FPS_CONVERT="y" # Audio filters AUD_NORMALIZE="y" @@ -122,6 +122,7 @@ FFMPEG="" FFPROBE="" MPLAYER="" +MP4BOX="" # Add a custom comment to your encodes # Leave empty to disable/ask each time @@ -323,6 +324,22 @@ fi fi +if [ ! -z "$MP4BOX" ]; then + if [ ! -x "$MP4BOX" ]; then + error "-> MP4Box is missing from your system!" + error "-> Check the config in '$CFG'" + echo + exit 1 + fi +else + MP4BOX="$(which MP4Box 2>/dev/null)" + if [ ! -x "$MP4BOX" ]; then + error "-> MP4Box is missing from your system!" + echo + exit 1 + fi +fi + BC="$(which bc 2>/dev/null)" if [ ! -x "$BC" ]; then error "-> Utility 'bc' is missing from your system!" @@ -353,7 +370,7 @@ CONFMT="$(echo "$CONFMT" | tr '[:upper:]' '[:lower:]')" if [ ! -z "$CONFMT" ]; then case "$CONFMT" in - mov) movflags="-movflags +faststart" ;; + mp4|m4v|mov) movflags="-movflags +faststart" ;; avi|mkv|wmv) true ;; *) error "-> Xvid video not supported by the chosen container!" @@ -388,7 +405,7 @@ input="$(readlink -e "$input")" fi -if [ "$SCAN_MULTIPLE_VID_TRACKS" = "y" ]; then +if [ "$SCAN_MULTI_VID_TRACKS" = "y" ]; then printf "Scan for Multiple Video Tracks? [y/N]: " read mvt if [ "$mvt" = "y" -o "$mvt" = "Y" ]; then @@ -467,7 +484,7 @@ fi if [ -z "$CONFMT" ]; then - printf "Which Container Format to use? [avi/mkv/mov/wmv - default is avi]: " + printf "Which Container Format to Use? [avi/mkv/mp4/m4v/mov/wmv - default is avi]: " read confmt test -z "$confmt" && CONFMT="avi" || CONFMT="$confmt" fi @@ -514,17 +531,19 @@ if [ ! -z "$remuxcon" ]; then container_func() { case "$1" in - avi|mov|wmv) + avi|mp4|m4v|mov|wmv) green "-> Note: additional container $i supports the following audio codecs:" ;; esac case "$1" in + mp4) green "-> ac3|eac3|dts|aac|fdk-aac|mp3|vorbis|flac|copy" ;; + m4v) green "-> ac3|aac|fdk-aac|alac|copy" ;; mov) green "-> ac3|eac3|dts|aac|fdk-aac|mp3|vorbis|alac|copy" ;; avi) green "-> ac3|dts|aac|fdk-aac|mp3|vorbis|wmav1|wmav2|pcm|flac|copy" ;; - wmv) green "-> ac3|eac3|dts|aac|fdk-aac|mp3|vorbis|wmav1|wmav2|flac|copy" + wmv) green "-> ac3|eac3|dts|aac|fdk-aac|mp3|vorbis|wmav1|wmav2|flac|copy" ;; other) error "-> Xvid video not supported by the $i container!" - error "-> Supported containers are: avi, mov, mkv, wmv" + error "-> Supported containers are: avi, mp4, m4v, mov, mkv, wmv" echo exit 1 ;; @@ -548,6 +567,8 @@ mkv) green "-> Note: additional container $i supports all the audio codecs" ;; + mp4) container_func mp4 ;; + m4v) container_func m4v ;; mov) container_func mov ;; avi) container_func avi ;; wmv) container_func wmv ;; @@ -572,7 +593,8 @@ test ! -z "$comment" && COMMENT="$comment" fi -if [ "$CONFMT" = "mkv" ]; then +case "$CONFMT" in + mkv|mp4|m4v|mov) printf "Specify a Cover Image in JPG/PNG format [press 'Enter' to skip]: " read -e cover if [ ! -z "$cover" ]; then @@ -588,10 +610,21 @@ exit 1 ;; esac - METACOVER="-attach \"$(readlink -e "$cover")\" -metadata:s:t mimetype=\"image/$img\"" + case "$CONFMT" in + mkv) METACOVER="-attach \"$(readlink -e "$cover")\" -metadata:s:t mimetype=\"image/$img\"" ;; + *) MP4COVER="-itags cover=\"$(readlink -e "$cover")\"" ;; + esac + if [ ! -z "$remuxcon" ]; then + for i in $remuxcon; do + case "$i" in + mp4|m4v|mov) MP4COVER2="-itags cover=\"$(readlink -e "$cover")\"" ;; + esac + done + fi fi fi -fi + ;; +esac case "$encmode" in [1-2]p) @@ -599,7 +632,7 @@ read vbtr test -z "$vbtr" && vbitrate="8000k" || vbitrate="${vbtr}k" ;; - *|"") + ""|cq) if [ -z "$CQ" ]; then printf "Specify a CQ Value for the Encoding [0-31 - default is 2]: " read cq @@ -1365,7 +1398,7 @@ else startpos="$timepos" fi - $MPLAYER "$input" -vf rectangle=$crop_preview -noconfig all -nocache -ao null -ss $startpos -endpos 10 >/dev/null 2>&1 + $MPLAYER "$input" -vid $vidtrack -vf rectangle=$crop_preview -noconfig all -nocache -ao null -ss $startpos -endpos 10 >/dev/null 2>&1 fi fi printf "Are you Satisfied with the Crop Area? [y/N]: " @@ -1470,11 +1503,11 @@ echo " 3 -> Cubic B-Spline (1.00, 0.00)" echo " 4 -> Custom" echo - printf "Specify the Scaler Tuning option [default is 0]: " + printf "Specify the Scaler Tuning Option [default is 1]: " read swstune case "$swstune" in - 0|"") swsparam0=":param0=0.00"; swsparam1=":param1=0.60" ;; - 1) swsparam0=":param0=0.00"; swsparam1=":param1=0.50" ;; + 0) swsparam0=":param0=0.00"; swsparam1=":param1=0.60" ;; + 1|"") swsparam0=":param0=0.00"; swsparam1=":param1=0.50" ;; 2) swsparam0=":param0=0.33"; swsparam1=":param1=0.33" ;; 3) swsparam0=":param0=1.00"; swsparam1=":param1=0.00" ;; 4) @@ -2226,6 +2259,16 @@ # all the audio codecs supported by the script for c in $CONFMT $remuxcon; do case "$c" in + mp4) + case "${acodec[i]}" in + pcm|libopus|opus|truehd|alac|wmav1|wmav2) conerror_func ;; + esac + ;; + m4v) + case "${acodec[i]}" in + eac3|dts|vorbis|flac|pcm|libopus|opus|truehd|wmav1|wmav2) conerror_func ;; + esac + ;; mov) case "${acodec[i]}" in pcm|libopus|opus|wmav1|wmav2|truehd|flac) conerror_func ;; @@ -2914,14 +2957,16 @@ test "${aindex[i]}" = "-1" && aindex[i]="0" GETAUDCDC[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^codec_name' | awk -F= '{print $2}')" - GETAUDBTR[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^bit_rate' | awk -F= '{print $2}')" - GETAUDSR[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^sample_rate' | awk -F= '{print $2}')" - GETAUDCL[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^channel_layout' | awk -F= '{print $2}')" if [ ! -z "${GETAUDCDC[i]}" ]; then + GETAUDBTR[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^bit_rate' | awk -F= '{print $2}')" + GETAUDSR[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^sample_rate' | awk -F= '{print $2}')" + GETAUDCL[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^channel_layout' | awk -F= '{print $2}')" + get_audio_profile_func() { GETAUDPROF[i]="$($FFPROBE -i "$input" -v quiet -select_streams a:${aindex[i]} -show_streams -of default=noprint_wrappers=1 | grep '^profile' | awk -F= '{print $2}')" } + case "${GETAUDCDC[i]}" in ac3) GETAUDCDC[i]="AC-3" ;; eac3) GETAUDCDC[i]="E-AC-3" ;; @@ -2952,6 +2997,7 @@ wmav2) GETAUDCDC[i]="WMAv2" ;; opus) GETAUDCDC[i]="Opus" ;; pcm*) GETAUDCDC[i]="PCM" ;; + lpcm*) GETAUDCDC[i]="LPCM" ;; flac) GETAUDCDC[i]="FLAC" ;; alac) GETAUDCDC[i]="ALAC" ;; *) GETAUDCDC[i]="$(echo "${GETAUDCDC[i]}" | tr '[a-z]' '[A-Z]')" ;; @@ -3161,6 +3207,18 @@ fi encoder_func $encmode >> "$OUTFILE" echo "" >> "$OUTFILE" +case "$CONFMT" in + mp4|m4v|mov) + if [ ! -z "$MP4COVER" ]; then + case "$CONFMT" in + mp4|m4v) hint="-hint" ;; + esac + echo "$MP4BOX -add \"$OUTPUT\" $MP4COVER -mpeg4 $hint -new \"${OUTPUT%.*}_tmp$$.$CONFMT\" >/dev/null 2>&1" >> "$OUTFILE" + echo "rm -f \"$OUTPUT\"" >> "$OUTFILE" + echo "mv -f \"${OUTPUT%.*}_tmp$$.$CONFMT\" \"$OUTPUT\"" >> "$OUTFILE" + fi + ;; +esac if [ ! -z "$remuxcon" ]; then for i in $remuxcon; do echo "" >> "$OUTFILE" @@ -3172,6 +3230,19 @@ *) echo "$FFMPEG -i \"$OUTPUT\" -map 0 -c copy $strict \"${OUTPUT%.*}.$i\" >/dev/null 2>&1" >> "$OUTFILE" ;; esac echo "test \"\$?\" = \"0\" && green \"-> Done\" || red \"-> Failed!\"" >> "$OUTFILE" + case "$i" in + mp4|m4v|mov) + if [ ! -z "$MP4COVER2" ]; then + case "$i" in + mp4|m4v) hint2="-hint" ;; + esac + echo "" >> "$OUTFILE" + echo "$MP4BOX -add \"${OUTPUT%.*}.$i\" $MP4COVER2 -mpeg4 $hint2 -new \"${OUTPUT%.*}.$i-tmp$$\" >/dev/null 2>&1" >> "$OUTFILE" + echo "rm -f \"${OUTPUT%.*}.$i\"" >> "$OUTFILE" + echo "mv -f \"${OUTPUT%.*}.$i-tmp$$\" \"${OUTPUT%.*}.$i\"" >> "$OUTFILE" + fi + ;; + esac done echo "echo" >> "$OUTFILE" fi
View file
ffxvid-1.4.6.tar.gz/preset.txt -> ffxvid-1.4.7.tar.gz/preset.txt
Changed
@@ -4,4 +4,4 @@ # Constant quantizer CQ="2" -XVIDPARAMS="-flags +mv4+aic+cgop -bf 2 -mbd 2 -mpeg_quant 1 -variance_aq 1 -trellis 1" +XVIDPARAMS="-flags +mv4+aic+cgop -me_quality 6 -bf 2 -mbd 2 -mpeg_quant 1 -variance_aq 1 -trellis 1"
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
.