Last active
September 29, 2023 05:02
-
-
Save kasimte/d3c708b993816c05599fd1a3d9dc438d to your computer and use it in GitHub Desktop.
Revisions
-
kasimte revised this gist
Nov 21, 2019 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,8 @@ # Usage: # # 1) cd <my-directory-with-mov-files> # 2) ruby convert-mov-to-mp4.rb # mov_files = Dir[Dir.pwd() + "/*.MOV"] mov_files.each do |file| -
kasimte created this gist
Nov 21, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ mov_files = Dir[Dir.pwd() + "/*.MOV"] mov_files.each do |file| puts "Processing file: #{ file }" # extract the basename for renaming basename = File.basename(file, File.extname(file)) # run the conversion in the shell command = "ffmpeg -i #{ file } -vcodec copy -acodec copy #{ basename }.mp4" puts "Run: #{ command }" wasGood = system( command ) puts wasGood end