Fix #3826: Upload error: Could not parse output from FFProbe

This commit is contained in:
evazion
2018-08-19 18:22:49 -05:00
parent c504ad555d
commit e4286632f5

View File

@@ -185,8 +185,9 @@ class UploadService
end
def is_video_with_audio?(upload, file)
return false if !upload.is_video? # avoid ffprobe'ing the file if it's not a video (issue #3826)
video = FFMPEG::Movie.new(file.path)
upload.is_video? && video.audio_channels.present?
video.audio_channels.present?
end
def automatic_tags(upload, file)