Changes of Revision 175

ffhevc.changes Changed
x
 
1
@@ -1,4 +1,16 @@
2
 -------------------------------------------------------------------
3
+Tue Oct 29 06:17:00 UTC 2019 - neutrino8@opensuse.org
4
+
5
+- Update to version 4.0.2
6
+  * Removed an unneeded check for audio codec in the conerror_func() function
7
+  * Removed a stale "" in the case statement that checks the channels for AC3
8
+  * Support setting the matrixed stereo type when resampling stereo input
9
+  * Support setting the filter type of the audio resample filter
10
+  * Add the bsf bitstream filter to convert from length prefix to start
11
+    code prefix when remuxing to m2ts/mts/ts
12
+  * Cosmetics
13
+
14
+-------------------------------------------------------------------
15
 Mon Oct 28 05:30:00 UTC 2019 - neutrino8@opensuse.org
16
 
17
 - Update to version 4.0.1
18
ffhevc.spec Changed
10
 
1
@@ -17,7 +17,7 @@
2
 
3
 
4
 Name:           ffhevc
5
-Version:        4.0.1
6
+Version:        4.0.2
7
 Release:        0
8
 Summary:        A small shell script for encoding to H.265/HEVC with FFmpeg
9
 License:        GPL-2.0+
10
ffhevc-4.0.1.tar.gz/ChangeLog -> ffhevc-4.0.2.tar.gz/ChangeLog Changed
17
 
1
@@ -1,3 +1,15 @@
2
+2019-10-29 - ffhevc 4.0.2
3
+   * Removed an unneeded check for audio codec in the conerror_func()
4
+     function
5
+   * Removed a stale "" in the case statement that checks the channels
6
+     for AC3
7
+   * Support setting the matrixed stereo type when resampling stereo
8
+     input
9
+   * Support setting the filter type of the audio resample filter
10
+   * Add the bsf bitstream filter to convert from length prefix
11
+     to start code prefix when remuxing to m2ts/mts/ts
12
+   * Cosmetics
13
+   
14
 2019-10-28 - ffhevc 4.0.1
15
    * Added support for director/cast metadata for MP4/MOV
16
    * Added +use_metadata_tags to the $movflags variable for MP4/MOV
17
ffhevc-4.0.1.tar.gz/ffhevc -> ffhevc-4.0.2.tar.gz/ffhevc Changed
145
 
1
@@ -2,8 +2,8 @@
2
 #
3
 # Small script to encode to H.265/HEVC video using FFmpeg and libx265.
4
 # Author: Grozdan "microchip" Nikolov <neutrino8@opensuse.org>
5
-# Version: 4.0.1
6
-# Date: 2019-10-28
7
+# Version: 4.0.2
8
+# Date: 2019-10-29
9
 #
10
 # ffhevc 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="4.0.1"
17
+version="4.0.2"
18
 
19
 CFG="$HOME/.ffhevc"
20
 cfgversion="50"
21
@@ -437,7 +437,8 @@
22
    if [ ! -z "$CONFMT" ]; then
23
        case "$CONFMT" in
24
            mp4|mov)        movflags="-movflags +faststart+frag_keyframe+use_metadata_tags" ;;
25
-           mkv|m2ts|mts|ts)    true ;;
26
+           m2ts|mts|ts)        bsf="-bsf:v:0 hevc_mp4toannexb" ;;
27
+           mkv)            true ;;
28
            *)
29
            error "-> HEVC video not supported by the chosen container!"
30
            error "-> Supported containers are: mkv, mp4, mov, m2ts, mts and ts"
31
@@ -956,7 +957,7 @@
32
        printf "Specify the Deinterlace Method [default is 0]: "
33
        read dmethod
34
        case "$dmethod" in
35
-           0|"") video_deint_func ofps ;;
36
+           0|"")   video_deint_func ofps ;;
37
            1)
38
            echo
39
            green "-> Detecting FPS value..."
40
@@ -2644,11 +2645,10 @@
41
        esac
42
        
43
        conerror_func() {
44
-           test -z "${acodec[i]}" && audcodec[i]="ac3" || audcodec[i]="${acodec[i]}"
45
            if [ ! -z "$remuxcon" ]; then
46
-               error "-> Additional container $c does not support ${audcodec[i]} audio!"
47
+               error "-> Additional container $c does not support ${acodec[i]} audio!"
48
            else
49
-               error "-> The $c container does not support ${audcodec[i]} audio!"
50
+               error "-> The $c container does not support ${acodec[i]} audio!"
51
                error "-> Check your config file, if needed, in '$CFG'"
52
            fi
53
            error "-> See: https://en.wikipedia.org/wiki/Comparison_of_video_container_formats"
54
@@ -2791,7 +2791,7 @@
55
                    [1-6]) true ;;
56
                    *)
57
                    case "${acodec[i]}" in
58
-                       ac3|"") error "-> AC-3 supports only 1-6 channels!" ;;
59
+                       ac3)    error "-> AC-3 supports only 1-6 channels!" ;;
60
                        eac3)   error "-> E-AC-3 encoder in ffmpeg supports only 1-6 channels!" ;;
61
                    esac
62
                    exit 1
63
@@ -3360,7 +3360,32 @@
64
                        esac
65
                        ;;
66
                    esac
67
-                   aresample[i]="aresample=${audhz[i]},"
68
+                   echo
69
+                   brown " Resampling Filter Types"
70
+                   brown " ~~~~~~~~~~~~~~~~~~~~~~~"
71
+                   echo " 0 -> Cubic"
72
+                   echo " 1 -> Blackman-Nuttall windowed sinc"
73
+                   echo " 2 -> Kaiser windowed sinc"
74
+                   echo
75
+                   printf "Track $i: Specify the Resampling Filter Type [default is 2]: "
76
+                   read arft[i]
77
+                   case "${arft[i]}" in
78
+                       0)  audfiltype[i]=":filter_type=cubic" ;;
79
+                       1)  audfiltype[i]=":filter_type=blackman_nuttall" ;;
80
+                       2|"")   audfiltype[i]=":filter_type=kaiser" ;;
81
+                       *)
82
+                       error "-> Invalid option!"
83
+                       exit 1
84
+                       ;;
85
+                   esac
86
+                   case "${ach[i]}" in
87
+                       2)
88
+                       printf "Track $i: Specify the Matrixed Stereo Encoding [none/dolby/dplii - default is none]: "
89
+                       read amse[i]
90
+                       test -z "${amse[i]}" && audmatrix[i]=":matrix_encoding=none" || audmatrix[i]=":matrix_encoding=${amse[i]}"
91
+                       ;;
92
+                   esac
93
+                   aresample[i]="aresample=${audhz[i]}${audfiltype[i]}${audmatrix[i]},"
94
                    ahzmeta[i]=", ${audhz[i]} Hz"
95
                fi
96
            fi
97
@@ -3590,24 +3615,24 @@
98
 test ! -z "$COMMENT" && METACOMMENT="-metadata comment=\"$COMMENT\""
99
 
100
 encoder_func() {
101
-   VIDOPTS="${EXTSUBS[*]} $vidmap -disposition:v:0 default $aspect $ofps $METADATA $CHAPS $METATITLE $METAGENRE $METAYEAR $METADIRECTOR $METACAST $METACOMMENT $ffvbv_maxrate $ffvbv_bufsize $vfilters $coloroptions"
102
+   VIDOPTS="${EXTSUBS[*]} $vidmap -disposition:v:0 default $bsf $movflags $aspect $ofps $METADATA $CHAPS $METATITLE $METAGENRE $METAYEAR $METADIRECTOR $METACAST $METACOMMENT $ffvbv_maxrate $ffvbv_bufsize $vfilters $coloroptions"
103
    case "$1" in
104
        1p|crf)
105
        test "$encmode" = "1p" && passone="bitrate=$vbitrate" || passone="crf=$CRF"
106
-       OPTS1="${audparams[*]} $subparams $strict $movflags $MKVCOVER \"$OUTPUT\""
107
+       OPTS1="${audparams[*]} $strict $subparams $MKVCOVER \"$OUTPUT\""
108
        ;;
109
        2p)
110
        passone="stats=\"${OUTFILE%.*}.log\":pass=1:bitrate=$vbitrate"
111
        passtwo="stats=\"${OUTFILE%.*}.log\":pass=2:bitrate=$vbitrate"
112
        OPTS1="-an -f null -y /dev/null"
113
-       OPTS2="${audparams[*]} $subparams $strict $movflags $MKVCOVER \"$OUTPUT\""
114
+       OPTS2="${audparams[*]} $strict $subparams $MKVCOVER \"$OUTPUT\""
115
        ;;
116
        3p)
117
        passone="stats=\"${OUTFILE%.*}.log\":pass=1:bitrate=$vbitrate"
118
        passtwo="stats=\"${OUTFILE%.*}.log\":pass=3:bitrate=$vbitrate"
119
        OPTS1="-an -f null -y /dev/null"
120
        OPTS2="-an -f null -y /dev/null"
121
-       OPTS3="${audparams[*]} $subparams $strict $movflags $MKVCOVER \"$OUTPUT\""
122
+       OPTS3="${audparams[*]} $strict $subparams $MKVCOVER \"$OUTPUT\""
123
        ;;
124
    esac
125
    echo "nice -n $NICE $FFMPEG $verbose -i \"$input\" $VIDOPTS -c:v libx265 -x265-params $passone$X265PARAMS $OPTS1"
126
@@ -3665,7 +3690,8 @@
127
        echo "green \"-> Remuxing to $i...\"" >> "$OUTFILE"
128
        case "$i" in
129
            mp4|mov)    movflags2="-movflags +faststart+frag_keyframe+use_metadata_tags" ;;
130
-           *)      movflags2="" ;;
131
+           m2ts|ts|mts)    movflags2=""; vflags="-bsf:v:0 hevc_mp4toannexb" ;;
132
+           *)      movflags2=""; vflags="" ;;
133
        esac
134
        case "$i" in
135
            mkv)
136
@@ -3687,7 +3713,7 @@
137
                ;;
138
            esac
139
        fi
140
-       echo "$FFMPEG -i \"$OUTPUT\" -map 0 -c:v copy -c:a copy $suboption $strict $coloroptions $movflags2 $MKVCOVER2 $CHAPS $METATITLE $METAGENRE $METAYEAR $METADIRECTOR $METACAST $METACOMMENT ${audmeta[*]} ${audlang[*]} ${sublang[*]} ${sublng[*]} \"${OUTPUT%.*}.$i\" >/dev/null 2>&1" >> "$OUTFILE"
141
+       echo "$FFMPEG -i \"$OUTPUT\" -map 0 -c:v copy -c:a copy $suboption $vflags $movflags2 $strict $coloroptions $MKVCOVER2 $CHAPS $METATITLE $METAGENRE $METAYEAR $METADIRECTOR $METACAST $METACOMMENT ${audmeta[*]} ${audlang[*]} ${sublang[*]} ${sublng[*]} \"${OUTPUT%.*}.$i\" >/dev/null 2>&1" >> "$OUTFILE"
142
        echo "test \"\$?\" = \"0\" && green \"-> Done\" || red \"-> Failed!\"" >> "$OUTFILE"
143
        case "$i" in
144
            mp4|mov)
145