class MultimediaParadise::FixMarriedWithChildrenVideos

Constants

START_TIME
#

START_TIME

This denotes where to start.

#

Public Class Methods

new( run_already = true ) click to toggle source
#

initialize

#
# File lib/multimedia_paradise/video/fix_married_with_children_videos.rb, line 30
def initialize(
    run_already = true
  )
  reset
  run if run_already
end

Public Instance Methods

obtain_all_videos() click to toggle source
#

obtain_all_videos

#
# File lib/multimedia_paradise/video/fix_married_with_children_videos.rb, line 47
def obtain_all_videos
  Dir['*'].select {|entry| is_video_file?(entry) }
end
reset() click to toggle source
#

reset

#
Calls superclass method MultimediaParadise::Base#reset
# File lib/multimedia_paradise/video/fix_married_with_children_videos.rb, line 40
def reset
  super()
end
run() click to toggle source
#

run

#
# File lib/multimedia_paradise/video/fix_married_with_children_videos.rb, line 54
def run
  _ = obtain_all_videos
  _.each {|old_video_file|
    extension_name = File.extname(old_video_file).delete('.')
    cmd = 'ffmpeg -ss '+START_TIME+' -i '+old_video_file+
          ' -c copy -t 00:50:10.0 '+old_video_file+'_shortened.'+
          extension_name
    e cmd
    system cmd
  }
end