wco_models 3.1.0.238 → 3.1.0.239

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/wco/newsvideo.rb +10 -6
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a1be09f93b71a5f3d7b0ba3a06100f2760f376d706f373ec6afe0d808e6e2ce
4
- data.tar.gz: 99efeb5ef454a43bde04d353e13b9252bcde62ecf9cb317c1f29f9e4b9de3566
3
+ metadata.gz: c576f18191bb68a7f538a7bf8eb0dca2c6929bb214a9a5ee1b14fb71c0d35cca
4
+ data.tar.gz: fdc09568a679cd65c9c1e1cc03003b8450d31a195f83f2a39b85219dc18a4123
5
5
  SHA512:
6
- metadata.gz: 84336980f1dd413188e331bd89eac8be7c8e691719970c9719c2a0ef32d69cc178308133a754429b31756111fda361e6059564542222a3e03ca284beaa97f7b1
7
- data.tar.gz: 07e0e432ccce8ad65fa6060a9bc0284f3e27541b4738ce18788062e57f3bb60f108c8e5d21a46b2a5310a399e82ec6897c193ca259c3e028c5fbf04acffb8f89
6
+ metadata.gz: e73a58486ee0c29b1cddd810d573007bbe239eb70d12263a15575cf91dda5a7282b4f3ad347fc839719e5a6f95424ae33e7a3bf738ba25eac08d9133d4b91106
7
+ data.tar.gz: fb61141a6c5f5109f40b76da7cb257d6da66563abd9cdeae5029db02bdc670cabd994aee4b8c9319b8e820c32c643830d4d8dbd6e92bb35f2d7c1dc2d3114467
@@ -68,7 +68,7 @@ class Wco::Newsvideo
68
68
  cmd = "cd #{Rails.root.join('tmp', @newsvideo.id)} ; "
69
69
  @newsvideo.newspartials.each_with_index do |part, idx|
70
70
  cmd = "#{cmd} wget -nc -O newspartial_#{idx}.webm #{part.video.video.url} ; "
71
- cmd = "#{cmd} [ -f newspartial_#{idx}.mp4 ] || ffmpeg -i newspartial_#{idx}.webm newspartial_#{idx}.mp4 ; "
71
+ cmd = "#{cmd} [ -f newspartial_#{idx}.mp4 ] || ffmpeg -y -i newspartial_#{idx}.webm newspartial_#{idx}.mp4 ; "
72
72
  cmd = "#{cmd} wget -nc -O newspartial_#{idx}.wav #{part.audio.url} ; "
73
73
  end
74
74
  puts "+++ base files cmd:"
@@ -90,7 +90,7 @@ class Wco::Newsvideo
90
90
  cmd = <<AOL
91
91
  cd #{Rails.root.join('tmp', @newsvideo.id)} ;
92
92
  rm -f video_concat.mp4 ;
93
- ffmpeg -f concat -safe 0 -i videolist.txt -c copy video_concat.mp4 ;
93
+ ffmpeg -y -f concat -safe 0 -i videolist.txt -c copy video_concat.mp4 ;
94
94
  AOL
95
95
  puts "+++ video concat cmd:"
96
96
  puts cmd
@@ -102,7 +102,7 @@ AOL
102
102
  cmd = <<AOL
103
103
  cd #{Rails.root.join('tmp', @newsvideo.id)} ;
104
104
  rm -f audio_concat.wav ;
105
- ffmpeg -f concat -safe 0 -i audiolist.txt -c copy audio_concat.wav ;
105
+ ffmpeg -y -f concat -safe 0 -i audiolist.txt -c copy audio_concat.wav ;
106
106
  AOL
107
107
  puts "+++ audio concat cmd:"
108
108
  puts cmd
@@ -113,7 +113,7 @@ AOL
113
113
  cmd = <<AOL
114
114
  cd #{Rails.root.join('tmp', @newsvideo.id)} ;
115
115
  rm -f output.mp4 ;
116
- ffmpeg -i video_concat.mp4 -i audio_concat.wav -c:v copy -c:a aac combined_base.mp4 ;
116
+ ffmpeg -y -i video_concat.mp4 -i audio_concat.wav -c:v copy -c:a aac combined_base.mp4 ;
117
117
  AOL
118
118
  puts "+++ combine base cmd:"
119
119
  puts cmd
@@ -123,7 +123,7 @@ AOL
123
123
  ## combine overlays
124
124
  nn = @newsvideo.newsoverlays.map { |ol| ol.start_at_ms }
125
125
  puts! nn, 'nn'
126
- ffmpeg_cmd = [ "ffmpeg -i combined_base.mp4 \\" ]
126
+ ffmpeg_cmd = [ "ffmpeg -y -i combined_base.mp4 \\" ]
127
127
  nn.each_with_index do |ms, idx|
128
128
  ffmpeg_cmd.push " -i overlay_#{idx}.mp4 \\"
129
129
  end
@@ -160,7 +160,11 @@ AOL
160
160
  @video = Wco::Video.new name: @newsvideo.title
161
161
  video_path = Rails.root.join("tmp", @newsvideo.id, "combined_fin.mp4")
162
162
  @video.video = File.open(video_path)
163
- @video.save!
163
+ flag = @video.save
164
+ if !flag
165
+ puts "Could not create video:"
166
+ puts @video.errors.full_messages.join(", ")
167
+ end
164
168
  end
165
169
 
166
170
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.238
4
+ version: 3.1.0.239
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev