Projects
Multimedia
ffhevc
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 76
View file
ffhevc.changes
Changed
@@ -1,4 +1,17 @@ ------------------------------------------------------------------- +Mon Jan 01 10:18:00 UTC 2018 - neutrino8@opensuse.org + +- Update to version 3.4.8 + * 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 - Update to version 3.4.7
View file
ffhevc.spec
Changed
@@ -1,7 +1,7 @@ # # spec file for package ffhevc # -# 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: ffhevc -Version: 3.4.7 +Version: 3.4.8 Release: 0 Summary: A small shell script for encoding to H.265/HEVC with ffmpeg License: GPL-2.0+
View file
ffhevc-3.4.7.tar.gz/ChangeLog -> ffhevc-3.4.8.tar.gz/ChangeLog
Changed
@@ -1,3 +1,13 @@ +2018-01-01 - ffhevc 3.4.8 + * 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 - ffhevc 3.4.7 * Renamed array variable CHARS to VCHARS in the video_chars_func() function
View file
ffhevc-3.4.8.tar.gz/HDR_to_SDR_instructions.txt
Added
@@ -0,0 +1,29 @@ +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 ffhevc, +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). + +- 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 + obvious. + +- (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
ffhevc-3.4.7.tar.gz/Makefile -> ffhevc-3.4.8.tar.gz/Makefile
Changed
@@ -9,7 +9,7 @@ cp -f ffhevc $(PREFIX)/bin chmod 755 $(PREFIX)/bin/ffhevc - cp -f AUTHORS LICENSE README ChangeLog preset.txt Dynamic_HDR10_Example.json $(DOCDIR)/ffhevc + cp -f AUTHORS LICENSE README ChangeLog Dynamic_HDR10_Example.json *.txt $(DOCDIR)/ffhevc chmod 644 $(DOCDIR)/ffhevc/* cp -f ffhevc.1 $(MANDIR) gzip -9 -f $(MANDIR)/ffhevc.1
View file
ffhevc-3.4.7.tar.gz/ffhevc -> ffhevc-3.4.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: 3.4.7 -# Date: 2017-12-27 +# Version: 3.4.8 +# Date: 2018-01-01 # # ffhevc 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.4.7" +version="3.4.8" CFG="$HOME/.ffhevc" cfgversion="38" @@ -895,15 +895,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 " ~~~~~~~~~~~~~" @@ -938,34 +973,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]: " @@ -998,13 +1013,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)" @@ -1037,9 +1050,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 @@ -1486,9 +1497,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 " ~~~~~~~~~~~~~~~" @@ -2095,7 +2104,7 @@ acdc[i]="eac3" ameta[i]="E-AC-3" abropts[i]="32-6144" - abrdef[i]="768" + abrdef[i]="960" ;; truehd) acdc[i]="truehd" @@ -2637,9 +2646,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 @@ -2872,6 +2881,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
.