spaceship/lib/spaceship/du/utilities.rb in fastlane-2.113.0.beta.20190106200016 vs spaceship/lib/spaceship/du/utilities.rb in fastlane-2.113.0.beta.20190107200010

- old
+ new

@@ -38,20 +38,20 @@ # Grabs a screenshot from the specified video at the specified timestamp using `ffmpeg` # @param video_path (String) the path to the video file # @param timestamp (String) the `ffmpeg` timestamp format (e.g. 00.00) # @param dimensions (Array) the dimension of the screenshot to generate - # @return the path to the TempFile containing the generated screenshot + # @return the TempFile containing the generated screenshot def grab_video_preview(video_path, timestamp, dimensions) width, height = dimensions require 'tempfile' tmp = Tempfile.new(['video_preview', ".jpg"]) file = tmp.path command = "ffmpeg -y -i \"#{video_path}\" -s #{width}x#{height} -ss \"#{timestamp}\" -vframes 1 \"#{file}\" 2>&1 >/dev/null" # puts "COMMAND: #{command}" `#{command}` raise "Failed to grab screenshot at #{timestamp} from #{video_path} (using #{command})" unless $CHILD_STATUS.to_i == 0 - tmp.path + tmp end # identifies the resolution of a video using `ffmpeg` # @param video_path (String) the path to the video file # @return [Array] the resolution of the video