video_transcoding 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ee983d26f8f0917b12a1fb308fc355e29d8a962
4
- data.tar.gz: 661e526c970648c3310536c752ffbb5dd721f6be
3
+ metadata.gz: 67f60e78685ea9de4f559a42a7cadd7bf1c0884f
4
+ data.tar.gz: f5df40678bbe9b2e820cb3ae9100c3ad31d46bf9
5
5
  SHA512:
6
- metadata.gz: c93342fcefcf7db80eed42254e687887f216970823f3a928aa8dd8a2bda26ade159eb413483bc01716ee19e85650b6a7875d61bb03a6369a44224391cc43195f
7
- data.tar.gz: e3b797d7d5280382c8faca62b9a709c22f57b927fe50312ac16d9781589515d5b274d04d58c5c1ca9a6fc82b81f948a3434e72e6fa14e174ce21ea350ba0f8c7
6
+ metadata.gz: f01de7a9f98c65359e5acfb6b0691ed663affa1c84d73ceefc64fd45b51245ac7440f52e2f724bc275128b81cb8bd4fd4a0b66b5540338496d791c1640d7a145
7
+ data.tar.gz: 039bc33d9efe16342818c70dae79c766c8509f7d3dbcc9657ac071aa997a027b016c28dba23aa5d0a60207871340836bcbeae7ff8aa6ee09fe6867d80777ee8d
data/README.md CHANGED
@@ -266,6 +266,8 @@ You can also give the main audio track a custom name:
266
266
 
267
267
  transcode-video --main-audio 3="Original Stereo" "/path/to/Movie.mkv"
268
268
 
269
+ Unlike `HandBrakeCLI`, custom track names are allowed to contain commas.
270
+
269
271
  By default, only one audio track is selected. But you can add additional tracks, also with custom names:
270
272
 
271
273
  transcode-video --add-audio 4 --add-audio 5="Director Commentary" "/path/to/Movie.mkv"
@@ -332,6 +334,8 @@ If and when you do have a subtitle in text format, specifically [SubRip](https:/
332
334
 
333
335
  transcode-video --add-srt "/path/to/Subtitle.srt" "/path/to/Movie.mkv"
334
336
 
337
+ Unlike `HandBrakeCLI`, external subtitle file names are allowed to contain commas.
338
+
335
339
  ### Using `detect-crop`
336
340
 
337
341
  The command to find the optimal video cropping bounds is as simple as:
data/bin/transcode-video CHANGED
@@ -115,11 +115,13 @@ Audio options:
115
115
  try to copy track selected by number in its original format
116
116
  falling back to AC-3 format if original not allowed
117
117
  or try to copy all tracks in same manner
118
+ (only applies to main and explicitly added audio tracks)
118
119
  (can be used multiple times)
119
120
  --copy-audio-name TRACK|all
120
121
  copy original track name selected by number
121
122
  unless the name is specified with another option
122
123
  or try to copy all track names in same manner
124
+ (only applies to main and explicitly added audio tracks)
123
125
  (can be used multiple times)
124
126
  --no-audio disable all audio output
125
127
 
@@ -807,25 +809,28 @@ HERE
807
809
  end
808
810
 
809
811
  unless @handbrake_options.has_key? 'rate'
812
+ rate = '30'
810
813
  fps = media.info[:fps]
811
814
 
812
815
  if fps == 29.97
813
- handbrake_options['rate'] = '23.976'
814
-
815
- unless @handbrake_options.has_key? 'deinterlace' or
816
- @handbrake_options.has_key? 'decomb' or
817
- @handbrake_options.has_key? 'detelecine'
818
- handbrake_options['deinterlace'] = nil
816
+ if media.info[:mpeg2]
817
+ rate = '23.976'
818
+ else
819
+ unless @handbrake_options.has_key? 'deinterlace' or
820
+ @handbrake_options.has_key? 'decomb' or
821
+ @handbrake_options.has_key? 'detelecine'
822
+ handbrake_options['deinterlace'] = nil
823
+ end
819
824
  end
820
825
  elsif media.info[:mpeg2]
821
826
  case fps
822
827
  when 23.976, 24.0, 25.0
823
- handbrake_options['rate'] = fps.to_s
828
+ rate = fps.to_s
824
829
  end
825
- else
826
- handbrake_options['rate'] = '30'
827
- handbrake_options['pfr'] = nil
828
830
  end
831
+
832
+ handbrake_options['rate'] = rate
833
+ handbrake_options['pfr'] = nil if rate == '30'
829
834
  end
830
835
  end
831
836
 
@@ -12,14 +12,14 @@ module VideoTranscoding
12
12
 
13
13
  def setup
14
14
  Tool.provide(COMMAND_NAME, ['-version']) do |output, _, _|
15
- unless output =~ /^MPlayer .*-([0-9]+)\.([0-9]+)\.[0-9]+ /
15
+ unless output =~ /^MPlayer .*-([0-9]+)\.([0-9]+)(?:\.[0-9]+)? /
16
16
  Console.debug output
17
17
  fail "#{COMMAND_NAME} version unknown"
18
18
  end
19
19
 
20
20
  major_version = $1.to_i
21
21
  minor_version = $2.to_i
22
- Console.info "#{$MATCH} found..."
22
+ Console.info "#{$MATCH}found..."
23
23
 
24
24
  unless ((major_version * 100) + minor_version) >= 402
25
25
  fail "#{COMMAND_NAME} version 4.2 or later required"
@@ -5,5 +5,5 @@
5
5
  #
6
6
 
7
7
  module VideoTranscoding
8
- VERSION = '0.1.4'
8
+ VERSION = '0.2.0'
9
9
  end
Binary file
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.1.4
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Don Melton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-08 00:00:00.000000000 Z
11
+ date: 2015-05-09 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  Video Transcoding is a package of tools to transcode, inspect
@@ -49,6 +49,7 @@ files:
49
49
  - video_transcoding-0.1.1.gem
50
50
  - video_transcoding-0.1.2.gem
51
51
  - video_transcoding-0.1.3.gem
52
+ - video_transcoding-0.1.4.gem
52
53
  - video_transcoding.gemspec
53
54
  homepage: https://github.com/donmelton/video_transcoding
54
55
  licenses: