Projects
Multimedia
ffx264
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 56
View file
ffx264.changes
Changed
@@ -1,4 +1,13 @@ ------------------------------------------------------------------- +Fri Jun 09 08:50:00 UTC 2017 - neutrino8@opensuse.org + +- Update to version 3.4.6 + * New function, video_chars_func(), to detect and display video + characteristics like color range/space/transfer/primaries + * Detect and display video resolution if video scaling is enabled + * Detect and display pixel format + +------------------------------------------------------------------- Thu Jun 08 14:51:00 UTC 2017 - neutrino8@opensuse.org - Update to version 3.4.5
View file
ffx264.spec
Changed
@@ -17,7 +17,7 @@ Name: ffx264 -Version: 3.4.5 +Version: 3.4.6 Release: 0 Summary: A small shell script for encoding to H.264 with ffmpeg License: GPL-2.0+
View file
ffx264-3.4.5.tar.gz/ChangeLog -> ffx264-3.4.6.tar.gz/ChangeLog
Changed
@@ -1,3 +1,9 @@ +2017-06-09 - ffx264 3.4.6 + * New function, video_chars_func(), to detect and display video + characteristics like color range/space/transfer/primaries + * Detect and display video resolution if video scaling is enabled + * Detect and display pixel format + 2017-06-08 - ffx264 3.4.5 * Report software scaler set in the config file * Merge the bicubic and spline scaler tuning code
View file
ffx264-3.4.5.tar.gz/ffx264 -> ffx264-3.4.6.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.4.5 -# Date: 2017-06-08 +# Version: 3.4.6 +# Date: 2017-06-09 # # 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.4.5" +version="3.4.6" CFG="$HOME/.ffx264" cfgversion="32" @@ -861,6 +861,11 @@ read pix if [ "$pix" = "y" -o "$pix" = "Y" ]; then echo + green "-> Detecting Pixel Format..." + sleep 1 + PIXFMT="$($FFPROBE -i "$input" -v error -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]')" + echo brown " Pixel Formats" brown " ~~~~~~~~~~~~~" echo " 0 -> YUV420P" @@ -894,10 +899,34 @@ fi } +video_chars_func() { + for i in {1..4}; do + case "$i" in + 1) char[1]="color_range" ;; + 2) char[2]="color_space" ;; + 3) char[3]="color_transfer" ;; + 4) char[4]="color_primaries" ;; + esac + CHARS[i]="$($FFPROBE -i "$input" -v error -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 "${CHARS[1]}")" + green "-> Color Space: $(to_upper "${CHARS[2]}")" + green "-> Color Transfer: $(to_upper "${CHARS[3]}")" + green "-> Color Primaries: $(to_upper "${CHARS[4]}")" +} + video_colorspace_func() { printf "Do a Colorspace/Transfer/Primaries Conversion? [y/N]: " read ctp if [ "$ctp" = "y" -o "$ctp" = "Y" ]; then + echo + green "-> Detecting characteristics..." + sleep 1 + video_chars_func + echo printf "Specify the Input/Output Color Range [tv|mpeg|pc|jpeg - default is mpeg/tv]: " read crange if [ -z "$crange" ]; then @@ -1133,6 +1162,18 @@ fi if [ "$SCALE" = "y" ]; then + echo + green "-> Detecting video resolution..." + sleep 1 + WIDTH="$($FFPROBE -i "$input" -v error -select_streams v:0 -show_entries stream=width -of default=noprint_wrappers=1:nokey=1 | tail -1)" + HEIGHT="$($FFPROBE -i "$input" -v error -select_streams v:0 -show_entries stream=height -of default=noprint_wrappers=1:nokey=1 | tail -1)" + if [ ! -z "$crop" ]; then + green "-> Original resolution: ${WIDTH}x${HEIGHT}" + green "-> Cropped resolution: $(echo "$crop" | sed 's|crop=||' | awk -F: '{print $1}')x$(echo "$crop" | awk -F: '{print $2}')" + else + green "-> Detected ${WIDTH}x${HEIGHT}" + fi + echo printf "Specify the Desired Resolution [WxH - press 'Enter' to skip]: " read res if [ ! -z "$res" ]; then @@ -1265,6 +1306,10 @@ read cprim if [ "$cprim" = "y" -o "$cprim" = "Y" ]; then echo + green "-> Detecting characteristics..." + sleep 1 + video_chars_func + echo brown " Color Primaries" brown " ~~~~~~~~~~~~~~~" echo " 0 -> BT470M (NTSC)"
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
.