video_converter 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/video_converter/ffmpeg.rb +5 -6
- data/lib/video_converter/version.rb +1 -1
- metadata +3 -3
@@ -34,8 +34,8 @@ module VideoConverter
|
|
34
34
|
self.first_pass_command = '%{bin} -i %{input} -y -pass 1 -an %{options} /dev/null 1>>%{log} 2>&1 || exit 1'
|
35
35
|
self.second_pass_command = '%{bin} -i %{input} -y -pass 2 %{options} %{output} 1>>%{log} 2>&1 || exit 1'
|
36
36
|
self.keyframes_command = '%{ffprobe_bin} -show_frames -select_streams v:0 -print_format csv %{input} | grep frame,video,1 | cut -d\',\' -f5 | tr "\n" "," | sed \'s/,$//\''
|
37
|
-
self.split_command = '%{bin} -fflags +genpts -i %{input} -segment_time %{segment_time} -reset_timestamps 1 -c
|
38
|
-
self.concat_command = "%{bin} -f concat -i %{input} -c %{
|
37
|
+
self.split_command = '%{bin} -fflags +genpts -i %{input} -segment_time %{segment_time} -reset_timestamps 1 -c:v %{video_codec} -c:a %{audio_codec} -map 0:0 -map 0:1 -f segment %{output} 1>>%{log} 2>&1 || exit 1'
|
38
|
+
self.concat_command = "%{bin} -f concat -i %{input} -c:v %{video_codec} -c:a %{audio_codec} %{output} 1>>%{log} 2>&1 || exit 1"
|
39
39
|
|
40
40
|
attr_accessor :input, :group
|
41
41
|
|
@@ -88,9 +88,7 @@ module VideoConverter
|
|
88
88
|
end
|
89
89
|
|
90
90
|
def concat
|
91
|
-
|
92
|
-
output.codec ||= 'copy'
|
93
|
-
Command.new(self.class.concat_command, prepare_params(input, output)).execute
|
91
|
+
Command.new(self.class.concat_command, prepare_params(input, group.first)).execute
|
94
92
|
end
|
95
93
|
|
96
94
|
private
|
@@ -107,7 +105,8 @@ module VideoConverter
|
|
107
105
|
:input => input.to_s,
|
108
106
|
:log => output.log,
|
109
107
|
:output => output.ffmpeg_output,
|
110
|
-
:
|
108
|
+
:video_codec => output.video_codec,
|
109
|
+
:audio_codec => output.audio_codec,
|
111
110
|
:segment_time => output.segment_time,
|
112
111
|
:options => self.class.options.map do |output_option, ffmpeg_option|
|
113
112
|
if output.send(output_option).present?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: video_converter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -142,7 +142,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
142
142
|
version: '0'
|
143
143
|
segments:
|
144
144
|
- 0
|
145
|
-
hash:
|
145
|
+
hash: -1555004109844257794
|
146
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
147
|
none: false
|
148
148
|
requirements:
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
version: '0'
|
152
152
|
segments:
|
153
153
|
- 0
|
154
|
-
hash:
|
154
|
+
hash: -1555004109844257794
|
155
155
|
requirements:
|
156
156
|
- ffmpeg, version 1.2 or greated configured with libx264 and libfaac
|
157
157
|
- live_segmenter to convert to hls
|