Changes of Revision 57

ffx264.changes Changed
x
 
1
@@ -1,4 +1,14 @@
2
 -------------------------------------------------------------------
3
+Sat Jun 10 07:55:00 UTC 2017 - neutrino8@opensuse.org
4
+
5
+- Update to version 3.4.7
6
+  * Replace numbers in array variable char of the video_chars_func()
7
+    function with the ones from the for loop
8
+  * Pipe the ffprobe string to tail -1 to work around issues
9
+    with some problematic files
10
+  * Some small improvements to the video_colorspace_func() function
11
+
12
+-------------------------------------------------------------------
13
 Fri Jun 09 08:50:00 UTC 2017 - neutrino8@opensuse.org
14
 
15
 - Update to version 3.4.6
16
ffx264.spec Changed
10
 
1
@@ -17,7 +17,7 @@
2
 
3
 
4
 Name:           ffx264
5
-Version:        3.4.6
6
+Version:        3.4.7
7
 Release:        0
8
 Summary:        A small shell script for encoding to H.264 with ffmpeg
9
 License:        GPL-2.0+
10
ffx264-3.4.6.tar.gz/ChangeLog -> ffx264-3.4.7.tar.gz/ChangeLog Changed
12
 
1
@@ -1,3 +1,10 @@
2
+2017-06-10 - ffx264 3.4.7
3
+   * Replace numbers in array variable char of the video_chars_func()
4
+     function with the ones from the for loop
5
+   * Pipe the ffprobe string to tail -1 to work around issues
6
+     with some problematic files
7
+   * Some small improvements to the video_colorspace_func() function
8
+     
9
 2017-06-09 - ffx264 3.4.6
10
    * New function, video_chars_func(), to detect and display video
11
      characteristics like color range/space/transfer/primaries
12
ffx264-3.4.6.tar.gz/ffx264 -> ffx264-3.4.7.tar.gz/ffx264 Changed
90
 
1
@@ -2,8 +2,8 @@
2
 #
3
 # Small script to encode to H.264/AVC video using FFmpeg and libx264.
4
 # Author: Grozdan "microchip" Nikolov <neutrino8@opensuse.org>
5
-# Version: 3.4.6
6
-# Date: 2017-06-09
7
+# Version: 3.4.7
8
+# Date: 2017-06-10
9
 #
10
 # ffx264 is free software ; you can redistribute it and/or modify
11
 # it under the terms of the GNU General Public License as published by
12
@@ -24,7 +24,7 @@
13
 brown() { echo -e "\e[0;33m$1\e[0;39;49m"; }
14
 error() { echo -e "\e[1;31m$1\e[0;39;49m"; }
15
 
16
-version="3.4.6"
17
+version="3.4.7"
18
 
19
 CFG="$HOME/.ffx264"
20
 cfgversion="32"
21
@@ -730,7 +730,7 @@
22
    echo
23
    green "-> Detecting Field Parity..."
24
    sleep 1
25
-   FPAR="$($FFPROBE -i "$input" -v error -select_streams v:0 -show_entries stream=field_order -of default=noprint_wrappers=1:nokey=1)"
26
+   FPAR="$($FFPROBE -i "$input" -v error -select_streams v:0 -show_entries stream=field_order -of default=noprint_wrappers=1:nokey=1 | tail -1)"
27
    case "$FPAR" in
28
        t*|T*)  fp="tff"; fparity="Top Field First (TFF)" ;;
29
        b*|B*)  fp="bff"; fparity="Bottom Field First (BFF)" ;;
30
@@ -902,10 +902,10 @@
31
 video_chars_func() {
32
    for i in {1..4}; do
33
        case "$i" in
34
-           1)  char[1]="color_range" ;;
35
-           2)  char[2]="color_space" ;;
36
-           3)  char[3]="color_transfer" ;;
37
-           4)  char[4]="color_primaries" ;;
38
+           1)  char[i]="color_range" ;;
39
+           2)  char[i]="color_space" ;;
40
+           3)  char[i]="color_transfer" ;;
41
+           4)  char[i]="color_primaries" ;;
42
        esac
43
        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)"
44
    done
45
@@ -933,8 +933,13 @@
46
            irange="mpeg"
47
            orange="tv"
48
        else
49
-           irange="$(echo "$crange" | awk -F/ '{print $1}')"
50
-           orange="$(echo "$crange" | awk -F/ '{print $2}')"
51
+           if [ ! -z "$(echo "$crange" | grep '/')" ]; then
52
+               irange="$(echo "$crange" | awk -F/ '{print $1}')"
53
+               orange="$(echo "$crange" | awk -F/ '{print $2}')"
54
+           else
55
+               error "-> Invalid format! Valid is: <input_range>/<output_range> (eg: mpeg/tv)"
56
+               exit 1
57
+           fi
58
        fi
59
        video_csmisc_func() {
60
            printf "Use 10- or 12-bits BT2020 Transfer? [default is 10]: "
61
@@ -1114,8 +1119,8 @@
62
 # calc for target file size
63
 video_length_func() {
64
    case "$1" in
65
-       file)   VLENGTH="$($FFPROBE -i "$input" -v error -select_streams v:0 -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 | awk -F. '{print $1}')" ;;
66
-       batch)  echo "VLENGTH=\"\$($FFPROBE -i \"\$i\" -v error -select_streams v:0 -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 | awk -F. '{print \$1}')\"" ;;
67
+       file)   VLENGTH="$($FFPROBE -i "$input" -v error -select_streams v:0 -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 | tail -1 | awk -F. '{print $1}')" ;;
68
+       batch)  echo "VLENGTH=\"\$($FFPROBE -i \"\$i\" -v error -select_streams v:0 -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 | tail -1 | awk -F. '{print \$1}')\"" ;;
69
    esac
70
 }
71
 
72
@@ -2477,7 +2482,7 @@
73
                    green "-> Track $i: detecting audio sample rate..."
74
                    sleep 1
75
                    aid[i]="$(($(echo "${atrack[i]}" | awk -F: '{print $2}')-1))"
76
-                   ASR[i]="$($FFPROBE -i "$input" -v error -select_streams a:${aid[i]} -show_entries stream=sample_rate -of default=noprint_wrappers=1:nokey=1)"
77
+                   ASR[i]="$($FFPROBE -i "$input" -v error -select_streams a:${aid[i]} -show_entries stream=sample_rate -of default=noprint_wrappers=1:nokey=1 | tail -1)"
78
                    if [ ! -z "${ASR[i]}" ]; then
79
                        green "-> Track $i: detected ${ASR[i]} Hz"
80
                    else
81
@@ -2727,7 +2732,7 @@
82
                for i in $(eval echo "{1..$ATRACKS}"); do
83
                    if [ "${acodec[i]}" = "copy" ]; then
84
                        aid[i]="$(($(echo "${atrack[i]}" | awk -F: '{print $2}')-1))"
85
-                       abtr[i]="$($FFPROBE -i "$input" -v error -select_streams a:${aid[i]} -show_entries stream=bit_rate -of default=noprint_wrappers=1:nokey=1)"
86
+                       abtr[i]="$($FFPROBE -i "$input" -v error -select_streams a:${aid[i]} -show_entries stream=bit_rate -of default=noprint_wrappers=1:nokey=1 | tail -1)"
87
                        case "${abtr[i]}" in
88
                            [1-9]*) abitrate[i]="$((${abtr[i]}/1000))" ;;
89
                            ""|*)   abitrate[i]="0" ;;
90