video_transcoding 0.17.2 → 0.17.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +15 -0
- data/bin/convert-video +3 -3
- data/bin/detect-crop +1 -1
- data/bin/transcode-video +20 -7
- data/lib/video_transcoding/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 241a0deb1c290faf3bc3369d8ffe5553d50fe625
|
4
|
+
data.tar.gz: 6f86fc711f6c6987a43e49e809de4c40bcfc28f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57641bd39a63881135fb6107dd1db91e2376b81c785a2a107b62ab22cd7b5226719c3681e8d6a3f4e9b541955ace2f00c2c66631af455941f4c892571eb4e179
|
7
|
+
data.tar.gz: 3413a920260f3526f5cfcf3d4c863bf8d010d293a6815cad2bc3411ffe5e52e19d92af77f8321e9efeb8fc90fefde8cbd6d19d4a4f1c47b9caed1619fa4a8c79
|
data/README.md
CHANGED
@@ -329,6 +329,8 @@ Which prints out something like this:
|
|
329
329
|
|
330
330
|
Just copy and paste the sample commands to preview or transcode.
|
331
331
|
|
332
|
+
Please note that path names within the sample commands are not escaped properly when using `cmd.exe` or PowerShell on Windows. If you have [Git for Windows](https://git-for-windows.github.io/) or another Unix-like environment installed, you can use the [Bash shell](https://en.wikipedia.org/wiki/Bash_(Unix_shell)) (usually named `bash.exe`) to work around this issue.
|
333
|
+
|
332
334
|
If HandBrake and FFmpeg disagree about the cropping values, then `detect-crop` prints out something like this:
|
333
335
|
|
334
336
|
Results differ...
|
@@ -660,6 +662,19 @@ For a few problematic videos, I have to apply options like `--force-rate 23.976
|
|
660
662
|
|
661
663
|
## History
|
662
664
|
|
665
|
+
Sunday, May 14, 2017
|
666
|
+
|
667
|
+
### [0.17.3](https://github.com/donmelton/video_transcoding/releases/tag/0.17.3)
|
668
|
+
|
669
|
+
* `HandBrakeCLI` versions 1.0 and later changed the default frame rate mode from "constant" to "peak-limited" when a rate is specified. This new behavior in `HandBrakeCLI` requires two significant changes in `transcode-video`:
|
670
|
+
* Fix a bug where the `--force-rate` option failed to force a constant frame rate. This bug made it behave essentially the same at the `--limit-rate` option.
|
671
|
+
* Fix a bug where a constant frame rate was not forced for inputs containing [MPEG-2 video](https://en.wikipedia.org/wiki/MPEG-2). This bug affected the transcoding of all DVDs but very few Blu-ray Discs. The good news is that this bug probably didn't cause visual problems since the new default peak-limited implementation in `HandBrakeCLI` versions 1.0 and later worked like a constant frame rate most of the time.
|
672
|
+
* Modify `convert-video` to use binary file mode when reading and writing console and log output from `ffmpeg`. This eliminates redundant information and "console spew" on Windows by suppressing the EOL <-> CRLF conversion. Thanks, [@samhutchins](https://github.com/samhutchins)! Via [ #147](https://github.com/donmelton/video_transcoding/pull/147).
|
673
|
+
* Also modify `transcode-video` and `convert-video` to use binary file mode when processing console I/O from `mkvpropedit` and `mp4track` to eliminate that same "console spew" on Windows.
|
674
|
+
* Modify `detect-crop` to escape preview commands for `cmd.exe` and PowerShell on Windows in a manner that's still compatible with Bourne and Z shells. Also mention in the "Using `detect-crop`" section of the "README" document that path names within the sample commands are not escaped properly when using `cmd.exe` or PowerShell on Windows and that `bash.exe` can be used as a workaround. Via [ #146](https://github.com/donmelton/video_transcoding/issues/146).
|
675
|
+
* Modify `transcode-video` to accept `x264_10bit`, `x265_10bit`, `x265_12bit` and `x265_16bit` as supported encoders while also adjusting the encoder profile for these variants. Via [ #143](https://github.com/donmelton/video_transcoding/issues/143).
|
676
|
+
* Modify `transcode-video` to no longer set the x264 encoder level if a frame rate has been requested higher than `30` FPS. Via [ #141](https://github.com/donmelton/video_transcoding/issues/141).
|
677
|
+
|
663
678
|
### [0.17.2](https://github.com/donmelton/video_transcoding/releases/tag/0.17.2)
|
664
679
|
|
665
680
|
Monday, April 3, 2017
|
data/bin/convert-video
CHANGED
@@ -244,7 +244,7 @@ HERE
|
|
244
244
|
'--track-index', track.to_s,
|
245
245
|
'--enabled', enabled,
|
246
246
|
output,
|
247
|
-
], :err=>[:child, :out]) do |io|
|
247
|
+
], 'rb', :err=>[:child, :out]) do |io|
|
248
248
|
io.each do |line|
|
249
249
|
Console.debug line
|
250
250
|
end
|
@@ -385,7 +385,7 @@ HERE
|
|
385
385
|
MKVpropedit.command_name,
|
386
386
|
*mkvpropedit_options,
|
387
387
|
output,
|
388
|
-
], :err=>[:child, :out]) do |io|
|
388
|
+
], 'rb', :err=>[:child, :out]) do |io|
|
389
389
|
io.each do |line|
|
390
390
|
Console.debug line
|
391
391
|
end
|
@@ -410,7 +410,7 @@ HERE
|
|
410
410
|
Console.info 'Converting with ffmpeg...'
|
411
411
|
|
412
412
|
begin
|
413
|
-
IO.popen(ffmpeg_command, :err=>[:child, :out]) do |io|
|
413
|
+
IO.popen(ffmpeg_command, 'rb', :err=>[:child, :out]) do |io|
|
414
414
|
Signal.trap 'INT' do
|
415
415
|
Process.kill 'INT', io.pid
|
416
416
|
end
|
data/bin/detect-crop
CHANGED
@@ -104,7 +104,7 @@ HERE
|
|
104
104
|
puts
|
105
105
|
|
106
106
|
if @player == :mpv
|
107
|
-
puts "mpv --no-audio --vf
|
107
|
+
puts "mpv --no-audio --vf \"lavfi=[drawbox=#{Crop.drawbox_string(crop, width, height)}:invert:1]\" #{shell_path}"
|
108
108
|
puts "mpv --no-audio --vf crop=#{Crop.player_string(crop, width, height)} #{shell_path}"
|
109
109
|
else
|
110
110
|
str = Crop.player_string(crop, width, height)
|
data/bin/transcode-video
CHANGED
@@ -451,6 +451,7 @@ HERE
|
|
451
451
|
end
|
452
452
|
|
453
453
|
force_handbrake_option 'rate', arg
|
454
|
+
force_handbrake_option 'cfr', nil
|
454
455
|
@handbrake_options.delete 'vfr'
|
455
456
|
@handbrake_options.delete 'pfr'
|
456
457
|
end
|
@@ -908,11 +909,16 @@ HERE
|
|
908
909
|
end
|
909
910
|
|
910
911
|
handbrake_options['rate'] = rate
|
911
|
-
|
912
|
+
|
913
|
+
if rate == '30'
|
914
|
+
handbrake_options['pfr'] = nil
|
915
|
+
else
|
916
|
+
handbrake_options['cfr'] = nil
|
917
|
+
end
|
912
918
|
end
|
913
919
|
|
914
920
|
encoder = @handbrake_options.fetch('encoder', 'x264')
|
915
|
-
return unless encoder
|
921
|
+
return unless encoder =~ /^x264(?:_10bit)?$/ or encoder =~ /^x265(?:_1[026]bit)?$/
|
916
922
|
handbrake_options['encoder-preset'] = 'medium'
|
917
923
|
|
918
924
|
if width > 1920 or height > 1080
|
@@ -932,9 +938,16 @@ HERE
|
|
932
938
|
case encoder
|
933
939
|
when 'x264'
|
934
940
|
handbrake_options['encoder-profile'] = 'high'
|
935
|
-
|
941
|
+
|
942
|
+
if @handbrake_options.fetch('rate', '30').to_f <= 30.0
|
943
|
+
handbrake_options['encoder-level'] = encoder_level
|
944
|
+
end
|
945
|
+
when 'x264_10bit'
|
946
|
+
handbrake_options['encoder-profile'] = 'high10'
|
936
947
|
when 'x265'
|
937
948
|
handbrake_options['encoder-profile'] = 'main'
|
949
|
+
when 'x265_10bit', 'x265_12bit', 'x265_16bit'
|
950
|
+
handbrake_options['encoder-profile'] = 'main10'
|
938
951
|
end
|
939
952
|
|
940
953
|
if @vbr_quality.nil?
|
@@ -972,7 +985,7 @@ HERE
|
|
972
985
|
|
973
986
|
if (@quick or @veryquick) and
|
974
987
|
@handbrake_options.fetch('encoder-preset', 'medium') == 'medium' and
|
975
|
-
encoder
|
988
|
+
encoder =~ /^x264(?:_10bit)?$/
|
976
989
|
encoder_options['partitions'] = 'none'
|
977
990
|
encoder_options['ref'] = '1'
|
978
991
|
encoder_options['bframes'] = '1' if @veryquick
|
@@ -1306,7 +1319,7 @@ HERE
|
|
1306
1319
|
'--edit', 'track:s1',
|
1307
1320
|
'--set', 'flag-forced=1',
|
1308
1321
|
output,
|
1309
|
-
], :err=>[:child, :out]) do |io|
|
1322
|
+
], 'rb', :err=>[:child, :out]) do |io|
|
1310
1323
|
io.each do |line|
|
1311
1324
|
Console.debug line
|
1312
1325
|
end
|
@@ -1333,7 +1346,7 @@ HERE
|
|
1333
1346
|
'--edit', "track:a#{track}",
|
1334
1347
|
'--set', "name=#{original_name}",
|
1335
1348
|
output,
|
1336
|
-
], :err=>[:child, :out]) do |io|
|
1349
|
+
], 'rb', :err=>[:child, :out]) do |io|
|
1337
1350
|
io.each do |line|
|
1338
1351
|
Console.debug line
|
1339
1352
|
end
|
@@ -1353,7 +1366,7 @@ HERE
|
|
1353
1366
|
'--track-index', track.to_s,
|
1354
1367
|
"--#{property}", original_name,
|
1355
1368
|
output,
|
1356
|
-
], :err=>[:child, :out]) do |io|
|
1369
|
+
], 'rb', :err=>[:child, :out]) do |io|
|
1357
1370
|
io.each do |line|
|
1358
1371
|
Console.debug line
|
1359
1372
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: video_transcoding
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Don Melton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |2
|
14
14
|
Video Transcoding is a package of tools to transcode, inspect
|