Changes of Revision 27
ffhevc.changes
Changed
x
1
2
-------------------------------------------------------------------
3
+Wed Nov 23 15:20:00 UTC 2016 - neutrino8@opensuse.org
4
+
5
+- Update to version 3.0.5
6
+ * Added support for FLAC audio in MP4. Requires a very recent
7
+ ffmpeg version
8
+ * Added the $strict variable to the remuxing code
9
+ * Use the improved way of gathering info for the audio sample
10
+ rate detection
11
+ * Added the ability to flag the first internal or external
12
+ subtitle as default, when using the option for internal and
13
+ external subtitle copying
14
+ * Added support for LD-AAC audio encoding with libfdk-aac
15
+ * Removed stderr to stdout redirection (2>&1) for some of the
16
+ ffprobe lines. It is no longer needed
17
+
18
+-------------------------------------------------------------------
19
Sun Nov 20 16:44:00 UTC 2016 - neutrino8@opensuse.org
20
21
- Correct a small issue in the cropping code
22
ffhevc.spec
Changed
10
1
2
3
4
Name: ffhevc
5
-Version: 3.0.4
6
+Version: 3.0.5
7
Release: 0
8
Summary: A small shell script for encoding to H.265/HEVC with ffmpeg
9
License: GPL-2.0+
10
ffhevc-3.0.4.tar.gz/ChangeLog -> ffhevc-3.0.5.tar.gz/ChangeLog
Changed
18
1
2
+2016-11-23 - ffhevc 3.0.5
3
+ * Added support for FLAC audio in MP4. Requires a very recent
4
+ ffmpeg version
5
+ * Added the $strict variable to the remuxing code
6
+ * Use the improved way of gathering info for the audio sample
7
+ rate detection
8
+ * Added the ability to flag the first internal or external
9
+ subtitle as default, when using the option for internal and
10
+ external subtitle copying
11
+ * Added support for LD-AAC audio encoding with libfdk-aac
12
+ * Removed stderr to stdout redirection (2>&1) for some of the
13
+ ffprobe lines. It is no longer needed
14
+
15
2016-11-20 - ffhevc 3.0.4
16
* Moved checks for supported containers into its own function,
17
check_container_func()
18
ffhevc-3.0.4.tar.gz/Makefile -> ffhevc-3.0.5.tar.gz/Makefile
Changed
16
1
2
install:
3
mkdir -p -m 755 $(PREFIX)/bin $(DOCDIR)/ffhevc $(MANDIR)
4
5
- cp -fa ffhevc $(PREFIX)/bin
6
+ cp -f ffhevc $(PREFIX)/bin
7
chmod 755 $(PREFIX)/bin/ffhevc
8
- cp -fa AUTHORS LICENSE README ChangeLog preset.txt $(DOCDIR)/ffhevc
9
- cp -fa ffhevc.1 $(MANDIR)
10
+ cp -f AUTHORS LICENSE README ChangeLog preset.txt $(DOCDIR)/ffhevc
11
+ chmod 644 $(DOCDIR)/ffhevc/*
12
+ cp -f ffhevc.1 $(MANDIR)
13
gzip -9 $(MANDIR)/ffhevc.1
14
15
uninstall:
16
ffhevc-3.0.4.tar.gz/ffhevc -> ffhevc-3.0.5.tar.gz/ffhevc
Changed
170
1
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: 3.0.4
6
-# Date: 2016-11-20
7
+# Version: 3.0.5
8
+# Date: 2016-11-23
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
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.0.4"
17
+version="3.0.5"
18
19
CFG="$HOME/.ffhevc"
20
cfgversion="33"
21
22
if [ -z "$batchmode" ]; then
23
if [ -e "$OUTPUT" ]; then
24
echo
25
- error "-> Renaming existing file to '$OUTPUT.$$'"
26
+ error "-> Renaming existing file to '$OUTPUT.$$.old'"
27
echo
28
- mv -f "$OUTPUT" "$OUTPUT.$$"
29
+ mv -f "$OUTPUT" "$OUTPUT.$$.old"
30
fi
31
else
32
OUTPUT="$(readlink -f "$(dirname "$OUTPUT")/\${i%.*}.$CONFMT")"
33
34
;;
35
esac
36
case "$1" in
37
- mp4) green "-> ac3|eac3|dts|aac|fdk-aac|mp3|vorbis|copy|nosound" ;;
38
- mov) green "-> ac3|eac3|dts|aac|fdk-aac|mp3|vorbis|flac|copy|nosound" ;;
39
+ mp4) green "-> ac3|eac3|dts|aac|fdk-aac|mp3|vorbis|flac|copy" ;;
40
+ mov) green "-> ac3|eac3|dts|aac|fdk-aac|mp3|vorbis|copy" ;;
41
other)
42
error "-> HEVC video not supported by the $i container!"
43
error "-> Supported containers are: mkv, mp4, mov, m2ts, mts and ts"
44
45
46
# Used by mc/bobbing deinterlace and FPS conversion
47
video_fps_func() {
48
- GETFPS="$($FFPROBE -i "$input" -v error -select_streams v:0 -show_entries stream=r_frame_rate -of default=noprint_wrappers=1:nokey=1 2>&1)"
49
+ GETFPS="$($FFPROBE -i "$input" -v error -select_streams v:0 -show_entries stream=r_frame_rate -of default=noprint_wrappers=1:nokey=1)"
50
}
51
52
# Used by mc/bobbing deinterlace, IVTC and interlace-aware encoding
53
54
echo
55
green "-> Detecting Field Parity..."
56
sleep 1
57
- FPAR="$($FFPROBE -i "$input" -v error -select_streams v:0 -show_entries stream=field_order -of default=noprint_wrappers=1:nokey=1 2>&1)"
58
+ FPAR="$($FFPROBE -i "$input" -v error -select_streams v:0 -show_entries stream=field_order -of default=noprint_wrappers=1:nokey=1)"
59
case "$FPAR" in
60
t*|T*) fp="tff"; fparity="Top Field First (TFF)" ;;
61
b*|B*) fp="bff"; fparity="Bottom Field First (BFF)" ;;
62
63
# Used by cropping and bitrate
64
# calc for target file size
65
video_length_func() {
66
- VLENGTH="$($FFPROBE -i "$input" -v error -select_streams v:0 -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 2>&1 | awk -F. '{print $1}')"
67
+ 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}')"
68
}
69
70
if [ "$AUTOCROP" = "y" ]; then
71
72
2)
73
video_subtitles_func infile
74
video_subtitles_func ext
75
+ if [ ! -z "${subcopy[*]}" -a ! -z "${subcpy[*]}" ]; then
76
+ printf "Flag first Internal (i) or External (e) Sub as Default? [i/e - default is i]: "
77
+ read subdef
78
+ case "$subdef" in
79
+ i*|I*|"")
80
+ subcopy[1]="$(echo "${subcopy[1]}" | sed 's|none$|default|')"
81
+ subcpy[1]="$(echo "${subcpy[1]}" | sed 's|default$|none|')"
82
+ ;;
83
+ e*|E*)
84
+ subcopy[1]="$(echo "${subcopy[1]}" | sed 's|default$|none|')"
85
+ subcpy[1]="$(echo "${subcpy[1]}" | sed 's|none$|default|')"
86
+ ;;
87
+ *)
88
+ error "-> Invalid option!"
89
+ exit 1
90
+ ;;
91
+ esac
92
+ fi
93
;;
94
"")
95
true
96
97
abrdef[i]="448"
98
;;
99
flac)
100
+ test "$CONFMT" = "mp4" && strict="-strict -2"
101
acdc[i]="flac"
102
ameta[i]="FLAC"
103
abropts[i]="0-8"
104
105
case "$c" in
106
mp4)
107
case "${acodec[i]}" in
108
- pcm|opus|flac|truehd) conerror_func ;;
109
+ pcm|opus|truehd) conerror_func ;;
110
esac
111
;;
112
mov)
113
case "${acodec[i]}" in
114
- pcm|opus|truehd) conerror_func ;;
115
+ pcm|opus|flac|truehd) conerror_func ;;
116
esac
117
;;
118
esac
119
120
if [ "${acodec[i]}" != "copy" ]; then
121
case "${acodec[i]}" in
122
fdk*)
123
- printf "Track $i: Which AAC Profile to Use? [LC/HE/HEv2 - default is LC]: "
124
+ printf "Track $i: Which AAC Profile to Use? [LC/HE/HEv2/LD - default is LC]: "
125
read aprof[i]
126
case "${aprof[i]}" in
127
lc|LC|"") ameta[i]="LC-AAC"; aacprof[i]="aac_low" ;;
128
he|HE) ameta[i]="HE-AACv1"; aacprof[i]="aac_he" ;;
129
hev2|HEv2|HEV2) ameta[i]="HE-AACv2"; aacprof[i]="aac_he_v2" ;;
130
+ ld|LD) ameta[i]="LD-AAC"; aacprof[i]="aac_ld" ;;
131
*)
132
error "- Invalid AAC profile!"
133
exit 1
134
135
dts) chanrange[i]="1/2/4/5/6"; defchan[i]="6" ;;
136
fdk*)
137
case "${aacprof[i]}" in
138
- aac_low|aac_he) chanrange[i]="1-8"; defchan[i]="8" ;;
139
+ aac_low|aac_he|aac_ld) chanrange[i]="1-8"; defchan[i]="8" ;;
140
*) chanrange[i]="1-2"; defchan[i]="2" ;;
141
esac
142
;;
143
144
green "-> Track $i: detecting audio sample rate..."
145
sleep 1
146
aid[i]="$(($(echo "${atrack[i]}" | awk -F: '{print $2}')-1))"
147
- ASR[i]="$($FFPROBE -i "$input" -show_streams -select_streams a:${aid[i]} 2>&1 | sed -n 's|^sample_rate=||p')"
148
+ ASR[i]="$($FFPROBE -i "$input" -v error -select_streams a:${aid[i]} -show_entries stream=bit_rate -of default=noprint_wrappers=1:nokey=1)"
149
if [ ! -z "${ASR[i]}" ]; then
150
green "-> Track $i: detected ${ASR[i]} Hz"
151
else
152
153
for i in $(eval echo "{1..$ATRACKS}"); do
154
if [ "${acodec[i]}" = "copy" ]; then
155
aid[i]="$(($(echo "${atrack[i]}" | awk -F: '{print $2}')-1))"
156
- abtr[i]="$($FFPROBE -i "$input" -v error -select_streams a:${aid[i]} -show_entries stream=bit_rate -of default=noprint_wrappers=1:nokey=1 2>&1)"
157
+ abtr[i]="$($FFPROBE -i "$input" -v error -select_streams a:${aid[i]} -show_entries stream=bit_rate -of default=noprint_wrappers=1:nokey=1)"
158
case "${abtr[i]}" in
159
[1-9]*) abitrate[i]="$((${abtr[i]}/1000))" ;;
160
""|*) abitrate[i]="0" ;;
161
162
echo "echo" >> "$OUTFILE"
163
echo "green \"-> Remuxing to $i...\"" >> "$OUTFILE"
164
echo "" >> "$OUTFILE"
165
- echo "$FFMPEG -i \"$OUTPUT\" -map 0 -c copy \"${OUTPUT%.*}.$i\" >/dev/null 2>&1" >> "$OUTFILE"
166
+ echo "$FFMPEG -i \"$OUTPUT\" -map 0 -c copy $strict \"${OUTPUT%.*}.$i\" >/dev/null 2>&1" >> "$OUTFILE"
167
echo "test \"\$?\" = \"0\" && green \"-> Done\" || red \"-> Failed!\"" >> "$OUTFILE"
168
done
169
echo "echo" >> "$OUTFILE"
170