other_video_transcoding 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/bin/ask-ffmpeg-log +5 -5
- data/bin/other-transcode +75 -43
- data/other_video_transcoding-0.1.0.gem +0 -0
- data/other_video_transcoding-0.1.1.gem +0 -0
- data/other_video_transcoding-0.2.0.gem +0 -0
- data/other_video_transcoding-0.3.0.gem +0 -0
- data/other_video_transcoding-0.3.1.gem +0 -0
- data/other_video_transcoding.gemspec +1 -1
- metadata +10 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfd039fdab5dca779448614baaf5f0e99b3d7dc883f97693919a016224e4b7aa
|
4
|
+
data.tar.gz: c97d8899ea867a018059d1896c3608e3982f8677f8fe81c7506097171c7591e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1915b0bdacf95a0bdfe5e825497f9081571318aaf9423a10df614b0f5ab7a74949ebd6c6039c4ef09c5ce2d567dbe6a851019f996d64284a1ab0525a0a7c10e2
|
7
|
+
data.tar.gz: 64f23ade8dc74a15f8024313b66cd91b3298e80d4e39be391f47630ddd2aa812c67271bfa522794202dd33b4ce18b601c8cbf77a8b46078f288c050afd5eef3a
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
This single document contains all of the notes created for each [release](https://github.com/donmelton/other_video_transcoding/releases).
|
4
4
|
|
5
|
+
## [0.3.2](https://github.com/donmelton/other_video_transcoding/releases/tag/0.3.2)
|
6
|
+
|
7
|
+
Friday, September 11, 2020
|
8
|
+
|
9
|
+
* Modify `other-transcode` to use a new `ffmpeg` Matroksa muxer option so the `-disposition` option is once again honored when using `ffmpeg` version 4.3 and later.
|
10
|
+
* Change the codec ID from the default of `hev1` to `hvc1` for HEVC video in MP4 output from `other-transcode` to enable playback in QuickTime on macOS. Via [ #50](https://github.com/donmelton/other_video_transcoding/issues/50).
|
11
|
+
* Convert added SRT format subtitles to MOV-compatible format in MP4 output from `other-transcode`. Via [ #55](https://github.com/donmelton/other_video_transcoding/issues/55).
|
12
|
+
|
5
13
|
## [0.3.1](https://github.com/donmelton/other_video_transcoding/releases/tag/0.3.1)
|
6
14
|
|
7
15
|
Tuesday, May 26, 2020
|
data/bin/ask-ffmpeg-log
CHANGED
@@ -15,14 +15,14 @@ module Transcoding
|
|
15
15
|
|
16
16
|
class Command
|
17
17
|
def about
|
18
|
-
|
19
|
-
ask-ffmpeg-log 0.3.
|
18
|
+
<<-HERE
|
19
|
+
ask-ffmpeg-log 0.3.2
|
20
20
|
Copyright (c) 2019-2020 Don Melton
|
21
|
-
HERE
|
21
|
+
HERE
|
22
22
|
end
|
23
23
|
|
24
24
|
def usage
|
25
|
-
|
25
|
+
<<-HERE
|
26
26
|
Report temporal information from ffmpeg-generated `.log` files
|
27
27
|
containing encoding statistics.
|
28
28
|
|
@@ -34,7 +34,7 @@ Options:
|
|
34
34
|
--tabular use tab character as field delimiter and suppress labels
|
35
35
|
-h, --help display this help and exit
|
36
36
|
--version output version information and exit
|
37
|
-
HERE
|
37
|
+
HERE
|
38
38
|
end
|
39
39
|
|
40
40
|
def initialize
|
data/bin/other-transcode
CHANGED
@@ -17,14 +17,14 @@ module Transcoding
|
|
17
17
|
|
18
18
|
class Command
|
19
19
|
def about
|
20
|
-
|
21
|
-
other-transcode 0.3.
|
20
|
+
<<-HERE
|
21
|
+
other-transcode 0.3.2
|
22
22
|
Copyright (c) 2019-2020 Don Melton
|
23
|
-
HERE
|
23
|
+
HERE
|
24
24
|
end
|
25
25
|
|
26
26
|
def usage1
|
27
|
-
|
27
|
+
<<-HERE
|
28
28
|
Transcode Blu-ray Disc or DVD rip into a smaller, more portable format
|
29
29
|
while remaining high enough quality to be mistaken for the original.
|
30
30
|
|
@@ -34,55 +34,55 @@ Creates Matroska `.mkv` format file in current working directory.
|
|
34
34
|
|
35
35
|
Automatically selects a platform-specific hardware video encoder.
|
36
36
|
|
37
|
-
HERE
|
37
|
+
HERE
|
38
38
|
end
|
39
39
|
|
40
40
|
def usage2
|
41
|
-
|
41
|
+
<<-HERE
|
42
42
|
Input options:
|
43
43
|
--position TIME, --duration TIME
|
44
44
|
start transcoding at position and/or limit to duration
|
45
45
|
in seconds[.milliseconds] or [HH:]MM:SS[.m...] format
|
46
46
|
|
47
|
-
HERE
|
47
|
+
HERE
|
48
48
|
end
|
49
49
|
|
50
50
|
def usage3
|
51
|
-
|
51
|
+
<<-HERE
|
52
52
|
Output options:
|
53
53
|
--debug increase diagnostic information
|
54
54
|
--scan print media information and exit
|
55
55
|
--preview-crop show commands to preview detected video crop and exit
|
56
|
-
HERE
|
56
|
+
HERE
|
57
57
|
end
|
58
58
|
|
59
59
|
def usage4
|
60
|
-
|
60
|
+
<<-HERE
|
61
61
|
--print-crop print only detected video crop geometry and exit
|
62
62
|
--mp4 output MP4 instead of Matroska `.mkv` format
|
63
63
|
--copy-track-names
|
64
64
|
copy all input audio track names to output
|
65
|
-
HERE
|
65
|
+
HERE
|
66
66
|
end
|
67
67
|
|
68
68
|
def usage5
|
69
|
-
|
69
|
+
<<-HERE
|
70
70
|
--max-muxing-queue-size SIZE
|
71
71
|
set maximum number of packets to buffer when muxing
|
72
|
-
HERE
|
72
|
+
HERE
|
73
73
|
end
|
74
74
|
|
75
75
|
def usage6
|
76
|
-
|
76
|
+
<<-HERE
|
77
77
|
-n, --dry-run don't transcode, just show `ffmpeg` command and exit
|
78
78
|
|
79
79
|
Video options:
|
80
80
|
--hevc use HEVC version of platform-specific video encoder
|
81
|
-
HERE
|
81
|
+
HERE
|
82
82
|
end
|
83
83
|
|
84
84
|
def usage7
|
85
|
-
|
85
|
+
<<-HERE
|
86
86
|
--vt use Apple Video Toolbox encoder
|
87
87
|
--nvenc use Nvidia video encoder
|
88
88
|
--qsv use Intel Quick Sync video encoder
|
@@ -101,11 +101,11 @@ HERE
|
|
101
101
|
--cuvid use Nvidia video decoder
|
102
102
|
for H.264, VC-1, MPEG-2 and other formats
|
103
103
|
(ignores scope set by `--decode`)
|
104
|
-
HERE
|
104
|
+
HERE
|
105
105
|
end
|
106
106
|
|
107
107
|
def usage8
|
108
|
-
|
108
|
+
<<-HERE
|
109
109
|
--target [2160p=|1080p=|720p=|480p=]BITRATE
|
110
110
|
set video bitrate target (default: based on input)
|
111
111
|
or target for specific input resolution
|
@@ -113,11 +113,11 @@ HERE
|
|
113
113
|
set video crop geometry (default: none)
|
114
114
|
or automatically detect it
|
115
115
|
--720p fit video within 1280x720 pixel bounds
|
116
|
-
HERE
|
116
|
+
HERE
|
117
117
|
end
|
118
118
|
|
119
119
|
def usage9
|
120
|
-
|
120
|
+
<<-HERE
|
121
121
|
--1080p " " " 1920x1080 " "
|
122
122
|
--deinterlace reduce interlace artifacts without changing frame rate
|
123
123
|
(applied automatically for some inputs)
|
@@ -126,11 +126,11 @@ HERE
|
|
126
126
|
--detelecine drop duplicate frames to restore original frame rate
|
127
127
|
(disables any deinterlacing and forced frame rate)
|
128
128
|
--no-filters disable any automatic adjustments via filters
|
129
|
-
HERE
|
129
|
+
HERE
|
130
130
|
end
|
131
131
|
|
132
132
|
def usage10
|
133
|
-
|
133
|
+
<<-HERE
|
134
134
|
--rc-maxrate FACTOR, --rc-bufsize FACTOR
|
135
135
|
set ratecontrol maximum rate and/or buffer size
|
136
136
|
as multiple of video bitrate target
|
@@ -179,27 +179,27 @@ x264 software video encoder options:
|
|
179
179
|
--x264-quick increase encoding speed by 70-80%
|
180
180
|
with no easily perceptible loss in video quality
|
181
181
|
(avoids quality problems with some encoder presets)
|
182
|
-
HERE
|
182
|
+
HERE
|
183
183
|
end
|
184
184
|
|
185
185
|
def usage11
|
186
|
-
|
186
|
+
<<-HERE
|
187
187
|
|
188
188
|
Audio options:
|
189
189
|
--main-audio TRACK[=WIDTH]
|
190
190
|
select main audio track by number (default: 1)
|
191
191
|
with optional width (default: surround)
|
192
|
-
HERE
|
192
|
+
HERE
|
193
193
|
end
|
194
194
|
|
195
195
|
def usage12
|
196
|
-
|
196
|
+
<<-HERE
|
197
197
|
(use `original` to disable transcoding)
|
198
|
-
HERE
|
198
|
+
HERE
|
199
199
|
end
|
200
200
|
|
201
201
|
def usage13
|
202
|
-
|
202
|
+
<<-HERE
|
203
203
|
--add-audio TRACK|all|LANGUAGE|STRING[=WIDTH]
|
204
204
|
add single audio track by number
|
205
205
|
including main audio track
|
@@ -212,49 +212,49 @@ HERE
|
|
212
212
|
excluding main audio track
|
213
213
|
(comparison is case-insensitve)
|
214
214
|
with optional width (default: stereo)
|
215
|
-
HERE
|
215
|
+
HERE
|
216
216
|
end
|
217
217
|
|
218
218
|
def usage14
|
219
|
-
|
219
|
+
<<-HERE
|
220
220
|
(use `original` to disable transcoding)
|
221
|
-
HERE
|
221
|
+
HERE
|
222
222
|
end
|
223
223
|
|
224
224
|
def usage15
|
225
|
-
|
225
|
+
<<-HERE
|
226
226
|
--surround-bitrate BITRATE
|
227
227
|
set surround audio bitrate (default: 640)
|
228
228
|
--stereo-bitrate BITRATE
|
229
229
|
set stereo audio bitrate (default: 256)
|
230
|
-
HERE
|
230
|
+
HERE
|
231
231
|
end
|
232
232
|
|
233
233
|
def usage16
|
234
|
-
|
234
|
+
<<-HERE
|
235
235
|
--mono-bitrate BITRATE
|
236
236
|
set mono audio bitrate (default: 50% of stereo bitrate)
|
237
|
-
HERE
|
237
|
+
HERE
|
238
238
|
end
|
239
239
|
|
240
240
|
def usage17
|
241
|
-
|
241
|
+
<<-HERE
|
242
242
|
--eac3 use Enhanced AC-3 format for surround audio
|
243
|
-
HERE
|
243
|
+
HERE
|
244
244
|
end
|
245
245
|
|
246
246
|
def usage18
|
247
|
-
|
247
|
+
<<-HERE
|
248
248
|
--all-eac3 " " " " " all audio
|
249
249
|
--keep-ac3-stereo
|
250
250
|
copy stereo and mono audio in AC-3 format
|
251
251
|
even when orginal bitrate is above transcoding bitrate
|
252
252
|
--pass-dts enable passthrough of audio in DTS and DTS-ES formats
|
253
|
-
HERE
|
253
|
+
HERE
|
254
254
|
end
|
255
255
|
|
256
256
|
def usage19
|
257
|
-
|
257
|
+
<<-HERE
|
258
258
|
|
259
259
|
Subtitle options:
|
260
260
|
--add-subtitle TRACK[=forced]|auto|all|LANGUAGE|STRING
|
@@ -279,7 +279,7 @@ Other options:
|
|
279
279
|
--version output version information and exit
|
280
280
|
|
281
281
|
Requires `ffprobe`, `ffmpeg` and `mkvpropedit`.
|
282
|
-
HERE
|
282
|
+
HERE
|
283
283
|
end
|
284
284
|
|
285
285
|
def initialize
|
@@ -290,6 +290,7 @@ HERE
|
|
290
290
|
@detect = false
|
291
291
|
@preview = false
|
292
292
|
@format = :mkv
|
293
|
+
@mkv_options = []
|
293
294
|
@copy_track_names = false
|
294
295
|
@max_muxing_queue_size = nil
|
295
296
|
@dry_run = false
|
@@ -887,6 +888,11 @@ HERE
|
|
887
888
|
@stereo_encoder = 'aac'
|
888
889
|
end
|
889
890
|
end
|
891
|
+
|
892
|
+
if @format == :mkv
|
893
|
+
capabilities = get_muxer_capabilities
|
894
|
+
@mkv_options = ['-default_mode', 'passthrough'] if capabilities =~ /passthrough/
|
895
|
+
end
|
890
896
|
end
|
891
897
|
|
892
898
|
def verify_tool_availability(command)
|
@@ -964,6 +970,30 @@ HERE
|
|
964
970
|
$CHILD_STATUS.exitstatus == 0
|
965
971
|
end
|
966
972
|
|
973
|
+
def get_muxer_capabilities
|
974
|
+
Kernel.warn 'Getting muxer capabilities...'
|
975
|
+
output = ''
|
976
|
+
|
977
|
+
begin
|
978
|
+
IO.popen([
|
979
|
+
'ffmpeg',
|
980
|
+
'-loglevel', 'quiet',
|
981
|
+
'-h', 'muxer=matroska'
|
982
|
+
], :err=>[:child, :out]) do |io|
|
983
|
+
io.each do |line|
|
984
|
+
Kernel.warn line if @debug
|
985
|
+
output += line
|
986
|
+
end
|
987
|
+
end
|
988
|
+
rescue SystemCallError => e
|
989
|
+
raise "getting muxer capabilities failed: #{e}"
|
990
|
+
end
|
991
|
+
|
992
|
+
fail 'getting muxer capabilities failed' unless $CHILD_STATUS.exitstatus == 0
|
993
|
+
|
994
|
+
output
|
995
|
+
end
|
996
|
+
|
967
997
|
def process_input(path)
|
968
998
|
seconds = Time.now.tv_sec
|
969
999
|
|
@@ -1034,7 +1064,7 @@ HERE
|
|
1034
1064
|
get_audio_options(media_info) +
|
1035
1065
|
get_subtitle_options(media_info, burn_subtitle) + [
|
1036
1066
|
'-metadata:g', 'title='
|
1037
|
-
] + (@format == :
|
1067
|
+
] + (@format == :mkv ? @mkv_options : ['-movflags', 'disable_chpl']) + [
|
1038
1068
|
output_path
|
1039
1069
|
]
|
1040
1070
|
|
@@ -1823,6 +1853,8 @@ HERE
|
|
1823
1853
|
'-disposition:v', 'default'
|
1824
1854
|
]
|
1825
1855
|
|
1856
|
+
encode_options += ['-tag:v', 'hvc1'] if @format == :mp4 and @hevc
|
1857
|
+
|
1826
1858
|
[decode_options, encode_options]
|
1827
1859
|
end
|
1828
1860
|
|
@@ -2095,7 +2127,7 @@ HERE
|
|
2095
2127
|
|
2096
2128
|
options += [
|
2097
2129
|
'-map', "0:#{subtitle['index']}",
|
2098
|
-
"-c:s:#{index}", 'copy',
|
2130
|
+
"-c:s:#{index}", ((@format == :mp4 and subtitle['codec_name'] == 'subrip') ? 'mov_text' : 'copy'),
|
2099
2131
|
"-disposition:s:#{index}", (force ? 'default+forced' : '0')
|
2100
2132
|
]
|
2101
2133
|
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: other_video_transcoding
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Don Melton
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: " Other Video Transcoding is a package of tools to transcode videos.\n"
|
14
14
|
email: don@blivet.com
|
@@ -25,12 +25,17 @@ files:
|
|
25
25
|
- README.md
|
26
26
|
- bin/ask-ffmpeg-log
|
27
27
|
- bin/other-transcode
|
28
|
+
- other_video_transcoding-0.1.0.gem
|
29
|
+
- other_video_transcoding-0.1.1.gem
|
30
|
+
- other_video_transcoding-0.2.0.gem
|
31
|
+
- other_video_transcoding-0.3.0.gem
|
32
|
+
- other_video_transcoding-0.3.1.gem
|
28
33
|
- other_video_transcoding.gemspec
|
29
34
|
homepage: https://github.com/donmelton/other_video_transcoding
|
30
35
|
licenses:
|
31
36
|
- MIT
|
32
37
|
metadata: {}
|
33
|
-
post_install_message:
|
38
|
+
post_install_message:
|
34
39
|
rdoc_options: []
|
35
40
|
require_paths:
|
36
41
|
- lib
|
@@ -46,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
46
51
|
version: '0'
|
47
52
|
requirements: []
|
48
53
|
rubygems_version: 3.1.2
|
49
|
-
signing_key:
|
54
|
+
signing_key:
|
50
55
|
specification_version: 4
|
51
56
|
summary: Other tools to transcode videos.
|
52
57
|
test_files: []
|