Projects
Multimedia
ffx264
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 68
View file
ffx264.changes
Changed
@@ -1,3 +1,17 @@ + +------------------------------------------------------------------- +Mon Jan 01 10:18:00 UTC 2018 - neutrino8@opensuse.org + +- Update to version 3.5.7 + * 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) + * Added HDR_to_SDR_instructions.txt file to the package + * Cosmetics + ------------------------------------------------------------------- Wed Dec 27 11:37:00 UTC 2017 - neutrino8@opensuse.org
View file
ffx264.spec
Changed
@@ -1,7 +1,7 @@ # # spec file for package ffx264 # -# 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: ffx264 -Version: 3.5.6 +Version: 3.5.7 Release: 0 Summary: A small shell script for encoding to H.264 with ffmpeg License: GPL-2.0+
View file
ffx264-3.5.6.tar.gz/ChangeLog -> ffx264-3.5.7.tar.gz/ChangeLog
Changed
@@ -1,3 +1,13 @@ +2018-01-01 - ffx264 3.5.7 + * 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) + * Added HDR_to_SDR_instructions.txt file to the package + * Cosmetics + 2017-12-27 - ffx264 3.5.6 * Renamed array variable CHARS to VCHARS in the video_chars_func() function
View file
ffx264-3.5.7.tar.gz/HDR_to_SDR_instructions.txt
Added
@@ -0,0 +1,33 @@ +Here you'll find instructions on how to convert High Dynamic Range (HDR) files +to Standard Dynamic Range (SDR) ones. The below assumes you already have FFmpeg +compiled with support for the "z library" (zimg) as it needs the zscale filter +(--enable-libzimg in FFmpeg's configure script). + +https://github.com/sekrit-twc/zimg + +Most UltraHD Blu-Ray releases come in 10-bits (YUV420P10 pixel format), +BT.2020 color space and HDR tone mapping. To convert them to SDR with ffx264, +follow the below instructions. + +- Answer 'y' to "Pixel Format Conversion" and select YUV420P (for 8-bit + encoding), YUV420P10 (for 10-bit) or YUV420P12 (for 12-bit). If you're + using the latest git master of x264 and did not force the configure option + --bit-depth during configure time of x264, simply choosing YUV420P10 will + make your encode 10-bit as libx264 will automatically switch to 10-bit mode. + If you choose YUV420P instead, the encode will be in 8-bit. + +- Answer 'y' to "HDR to SDR Conversion" and choose the tone mapping algorithm. + I prefer Mobius but you are free to experiment with the other options. Next, + choose the color space option you want. The options presented are pretty + straight-forward. + +- (Optional): Scale down the input to appropriate resolution if you are targeting + HD/Full HD/NTSC/PAL output. + +That's all there really is to it. The zscale and tonemap filters will do all the +work for you. I cannot guarantee 100% success rate, but I've done a handful of +HDR to SDR conversions myself of UHD Blu-rays targeting Full HD output and all +of the encodes were able to be decoded by my (a bit ageing) devices without a +single issue and everything looks OK to my eyes. + +If you have further questions, don't hesitate to contact me. :)
View file
ffx264-3.5.6.tar.gz/Makefile -> ffx264-3.5.7.tar.gz/Makefile
Changed
@@ -9,7 +9,7 @@ cp -f ffx264 $(PREFIX)/bin chmod 755 $(PREFIX)/bin/ffx264 - cp -f AUTHORS LICENSE README ChangeLog preset.txt $(DOCDIR)/ffx264 + cp -f AUTHORS LICENSE README ChangeLog *.txt $(DOCDIR)/ffx264 chmod 644 $(DOCDIR)/ffx264/* cp -f ffx264.1 $(MANDIR) gzip -9 -f $(MANDIR)/ffx264.1
View file
ffx264-3.5.6.tar.gz/ffx264 -> ffx264-3.5.7.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.5.6 -# Date: 2017-11-27 +# Version: 3.5.7 +# 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="3.5.6" +version="3.5.7" CFG="$HOME/.ffx264" cfgversion="34" @@ -909,15 +909,50 @@ 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 " ~~~~~~~~~~~~~" @@ -952,34 +987,14 @@ 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" + green " zscale filter!" error " https://github.com/sekrit-twc/zimg" echo printf "Continue? [y/N]: " @@ -1012,13 +1027,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)" @@ -1051,9 +1064,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 @@ -1461,9 +1472,7 @@ read cprim if [ "$cprim" = "y" -o "$cprim" = "Y" ]; then echo - green "-> Detecting Video Characteristics..." - sleep 1 - video_chars_func + video_chars_func vchars echo brown " Color Primaries" brown " ~~~~~~~~~~~~~~~" @@ -2070,7 +2079,7 @@ acdc[i]="eac3" ameta[i]="E-AC-3" abropts[i]="32-6144" - abrdef[i]="768" + abrdef[i]="960" ;; truehd) acdc[i]="truehd" @@ -2627,9 +2636,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 @@ -2862,6 +2871,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
.