Skip to content

Instantly share code, notes, and snippets.

@yoggy
Created August 11, 2015 07:15
Show Gist options
  • Select an option

  • Save yoggy/0cdc9a96d5ddd00b4ae4 to your computer and use it in GitHub Desktop.

Select an option

Save yoggy/0cdc9a96d5ddd00b4ae4 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
Dir.glob("*.mp4") do |f|
next if /-org/ =~ f
vcopy_file = f;
org_file = f + ".-org.mp4"
File.rename(f, org_file);
cmd = "ffmpeg -i #{org_file} -vcodec copy -map 0:0 #{vcopy_file}"
puts "exec : #{cmd}"
system(cmd)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment