Projects
Multimedia
ffxvid
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 25
View file
ffxvid.changes
Changed
@@ -1,4 +1,20 @@ ------------------------------------------------------------------- +Mon Jan 01 23:08:00 UTC 2018 - neutrino8@opensuse.org + +- Update to version 1.2.4 + * Reworked the video_chars_func() function and added reporting + of video bit depth + * Initial support for audio codec metadata when doing audio + copy + * Increased default E-AC-3 audio bitrate from 768 to 960 kbps + * Set dialnorm for AC-3/E-AC-3 to its FFmpeg default (-31) + * Use a desat value of 2.5 for the tonemap filter when doing HDR + to SDR conversions + * Don't use pix_fmts in the format filter. It is not really needed + * Removed 12-bit options from the video_pixfmt_func() function + * Cosmetics + +------------------------------------------------------------------- Wed Dec 27 14:08:00 UTC 2017 - neutrino8@opensuse.org - Update to version 1.2.3
View file
ffxvid.spec
Changed
@@ -1,7 +1,7 @@ # # spec file for package ffxvid # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: ffxvid -Version: 1.2.3 +Version: 1.2.4 Release: 0 Summary: A small shell script for encoding to H.264 with ffmpeg License: GPL-2.0+
View file
ffxvid-1.2.3.tar.gz/ChangeLog -> ffxvid-1.2.4.tar.gz/ChangeLog
Changed
@@ -1,3 +1,16 @@ +2018-01-01 - ffxvid 1.2.4 + * Reworked the video_chars_func() function and added reporting + of video bit depth + * Initial support for audio codec metadata when doing audio + copy + * Increased default E-AC-3 audio bitrate from 768 to 960 kbps + * Set dialnorm for AC-3/E-AC-3 to its FFmpeg default (-31) + * Use a desat value of 2.5 for the tonemap filter when doing HDR + to SDR conversions + * Don't use pix_fmts in the format filter. It is not really needed + * Removed 12-bit options from the video_pixfmt_func() function + * Cosmetics + 2017-12-27 - ffxvid 1.2.3 * Renamed array variable CHARS to VCHARS in the video_chars_func() function
View file
ffxvid-1.2.3.tar.gz/ffxvid -> ffxvid-1.2.4.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.2.3 -# Date: 2017-12-27 +# Version: 1.2.4 +# Date: 2018-01-01 # # 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,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="1.2.3" +version="1.2.4" CFG="$HOME/.ffxvid" cfgversion="8" @@ -835,77 +835,86 @@ fi } +video_chars_func() { + case "$1" in + pixfmt) green "-> Detecting Pixel Format..." ;; + vchars) green "-> Detecting Video Characteristics..." ;; + esac + sleep 1 + case "$1" in + pixfmt) + PIXFMT="$($FFPROBE -i "$input" -v quiet -select_streams v:0 -show_entries stream=pix_fmt -of default=noprint_wrappers=1:nokey=1 | tail -1 | tr '[a-z]' '[A-Z]')" + green "-> Detected $PIXFMT" + ;; + vchars) + for i in {1..6}; do + case "$i" in + 1) char[i]="color_range" ;; + 2) char[i]="color_space" ;; + 3) char[i]="color_transfer" ;; + 4) char[i]="color_primaries" ;; + 5) char[i]="pix_fmt" ;; + 6) char[i]="bits_per_raw_sample" ;; + esac + VCHARS[i]="$($FFPROBE -i "$input" -v quiet -select_streams v:0 -show_entries stream=${char[i]} -of default=noprint_wrappers=1:nokey=1 | tail -1)" + done + to_upper() { + echo "$1" | tr '[a-z]' '[A-Z]' + } + echo + green "-> Color Range: $(to_upper "${VCHARS[1]}")" + green "-> Color Space: $(to_upper "${VCHARS[2]}")" + green "-> Color Transfer: $(to_upper "${VCHARS[3]}")" + green "-> Color Primaries: $(to_upper "${VCHARS[4]}")" + echo + green "-> Pixel Format: $(to_upper "${VCHARS[5]}")" + green "-> Bit Depth: $(to_upper "${VCHARS[6]}")" + ;; + esac +} + video_pixfmt_func() { printf "Do a Pixel Format Conversion? [y/N]: " read pix if [ "$pix" = "y" -o "$pix" = "Y" ]; then echo - green "-> Detecting Pixel Format..." - sleep 1 - PIXFMT="$($FFPROBE -i "$input" -v quiet -select_streams v:0 -show_entries stream=pix_fmt -of default=noprint_wrappers=1:nokey=1 | tail -1)" - green "-> Detected $(echo "$PIXFMT" | tr '[a-z]' '[A-Z]')" + video_chars_func pixfmt echo brown " Pixel Formats" brown " ~~~~~~~~~~~~~" echo " 0 -> YUV420P" echo " 1 -> YUV420P10 (requires 10-bits encoder)" - echo " 2 -> YUV420P12 (requires 12-bits encoder)" - echo " 3 -> YUV422" - echo " 4 -> YUV422P10 (requires 10-bits encoder)" - echo " 5 -> YUV422P12 (requires 12-bits encoder)" - echo " 6 -> YUV444P" - echo " 7 -> YUV444P10 (requires 10-bits encoder)" - echo " 8 -> YUV444P12 (requires 12-bits encoder)" + echo " 2 -> YUV422" + echo " 3 -> YUV422P10 (requires 10-bits encoder)" + echo " 4 -> YUV444P" + echo " 5 -> YUV444P10 (requires 10-bits encoder)" echo printf "Specify the Pixel Format option [default is 0]: " read pixopt case "$pixopt" in 0|"") pixfmt="yuv420p" ;; 1) pixfmt="yuv420p10" ;; - 2) pixfmt="yuv420p12" ;; - 3) pixfmt="yuv422p" ;; - 4) pixfmt="yuv422p10" ;; - 5) pixfmt="yuv422p12" ;; - 6) pixfmt="yuv444p" ;; - 7) pixfmt="yuv444p10" ;; - 8) pixfmt="yuv444p12" ;; + 2) pixfmt="yuv422p" ;; + 3) pixfmt="yuv422p10" ;; + 4) pixfmt="yuv444p" ;; + 5) pixfmt="yuv444p10" ;; *) error "-> Invalid option!" exit 1 ;; esac - pixformat="format=pix_fmts=$pixfmt," + pixformat="format=$pixfmt," fi } -video_chars_func() { - for i in ${1..5}; do - case "$i" in - 1) char[i]="color_range" ;; - 2) char[i]="color_space" ;; - 3) char[i]="color_transfer" ;; - 4) char[i]="color_primaries" ;; - 5) char[i]="pix_fmt" ;; - esac - VCHARS[i]="$($FFPROBE -i "$input" -v quiet -select_streams v:0 -show_entries stream=${char[i]} -of default=noprint_wrappers=1:nokey=1 | tail -1)" - done - to_upper() { - echo "$1" | tr '[a-z]' '[A-Z]' - } - green "-> Color Range: $(to_upper "${VCHARS[1]}")" - green "-> Color Space: $(to_upper "${VCHARS[2]}")" - green "-> Color Transfer: $(to_upper "${VCHARS[3]}")" - green "-> Color Primaries: $(to_upper "${VCHARS[4]}")" - green "-> Pixel Format: $(to_upper "${VCHARS[5]}")" -} - video_hdr_to_sdr_func() { printf "Do an HDR to SDR Conversion? [y/N]: " read hdr_sdr_conv if [ "$hdr_sdr_conv" = "y" -o "$hdr_sdr_conv" = "Y" ]; then echo error "-> NOTE: This function requires that FFmpeg be compiled with" - error " the zimg library as it uses the zscale filter!" + error " support for the the zimg library as it uses the" + error " zscale filter!" error " https://github.com/sekrit-twc/zimg" echo printf "Continue? [y/N]: " @@ -938,13 +947,11 @@ ;; esac echo - green "-> Detecting Video Characteristics..." - sleep 1 - video_chars_func + video_chars_func vchars echo brown " Colorspace/Transfer/Primaries Conversion" brown " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" - echo " 0 -> Copy input characteristics" + echo " 0 -> Copy color characteristics" echo " 1 -> Convert to BT709 (HD/FHD)" echo " 2 -> Convert to BT470BG (PAL)" echo " 3 -> Convert to SMPTE170M (NTSC)" @@ -961,7 +968,7 @@ exit 1 ;; esac - tonemap="zscale=transfer=linear,tonemap=$tm_algo:desat=0$zscale," + test ! -z "$zscale" && tonemap="zscale=transfer=linear,tonemap=$tm_algo:desat=2.5$zscale," fi fi } @@ -972,9 +979,7 @@ read ctp if [ "$ctp" = "y" -o "$ctp" = "Y" ]; then echo - green "-> Detecting Video Characteristics..." - sleep 1 - video_chars_func + video_chars_func vchars echo printf "Specify the Input/Output Color Range [tv|mpeg|pc|jpeg - default is tv:tv]: " read crange @@ -1904,7 +1909,7 @@ acdc[i]="eac3" ameta[i]="E-AC-3" abropts[i]="32-6144" - abrdef[i]="768" + abrdef[i]="960" ;; truehd) acdc[i]="truehd" @@ -2441,9 +2446,9 @@ case "${acodec[i]}" in ac3|eac3|"") - printf "Track $i: Specify the Dialog Level Normalization in dB [-31 to -1 - default is -27]: " + printf "Track $i: Specify the Dialog Level Normalization in dB [-31 to -1 - default is -31]: " read adn[i] - test -z "${adn[i]}" && auddialnorm[i]="-dialnorm:a:${audindex[i]} -27" || auddialnorm[i]="-dialnorm:a:${audindex[i]} ${adn[i]}" + test -z "${adn[i]}" && auddialnorm[i]="-dialnorm:a:${audindex[i]} -31" || auddialnorm[i]="-dialnorm:a:${audindex[i]} ${adn[i]}" ;; esac @@ -2676,6 +2681,17 @@ afilters[i]="$(echo "${aresample[i]}${anormalize[i]}${avolume[i]}$atempo" | sed 's|,$||')" test ! -z "${afilters[i]}" && audfilters[i]="-filter:a:${audindex[i]} ${afilters[i]}" + else + aindex[i]="$(($(echo "${atrack[i]}" | awk -F: '{print $2}')-1))" + 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}' | tr '[a-z]' '[A-Z]')" + 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}')" + + if [ ! -z "${GETAUDCDC[i]}" ]; then + test ! -z "${GETAUDBTR[i]}" && audbtrmeta[i]=" @ $(($(echo "${GETAUDBTR[i]}")/1000)) kbps" + audmeta[i]="-metadata:s:a:${audindex[i]} title=\"${GETAUDCDC[i]}${audbtrmeta[i]}\"" + fi fi audparams[i]="${audmap[i]} -c:a:${audindex[i]} ${acdc[i]} ${audprofile[i]} ${audcomplevel[i]} ${audbtr[i]} ${audchan[i]} ${auddialnorm[i]} ${audfilters[i]} ${audlang[i]} ${audmeta[i]} ${auddispo[i]}"
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
.