Skip to content

Instantly share code, notes, and snippets.

View hwgusn's full-sized avatar

Henry Garrett hwgusn

  • Longview Area, Texas
View GitHub Profile
@hwgusn
hwgusn / NagOff.rb
Created September 14, 2019 21:13
[RUBY] executable that removes the first n and last m seconds from an MP4 video without re-encoding and saves it to an output directory out_dir.
#!/usr/bin/env ruby
# Removes first startTrim and last endTrim seconds of an MP4 file and stores the resulting file in out_dir.
FFMPEG = "ffmpeg" # => path to the FFmpeg
FFPROBE = "ffprobe" # => path to FFProbe
startTrim = 5
endTrim = 6
if RUBY_VERSION =~ /1\.8[\.\d]*/