Last active
November 13, 2015 07:43
-
-
Save peroon/7fd54cf9cd7e251c47af to your computer and use it in GitHub Desktop.
動画作成コード ffmpeg.rb
This file contains 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 characters
Dir.chdir("VR_Sequence") | |
def ffmpeg(start_frame, end_frame) | |
vframe = end_frame - start_frame - 1 | |
direction = "ffmpeg -f image2 -r 60 -start_number #{start_frame} -i img%05d.png -vframes #{vframe} -r 60 -an -vcodec libx264 -y -pix_fmt yuv420p #{start_frame}-#{end_frame}.mp4" | |
p direction | |
system(direction) | |
end | |
startf = 4; endf = startf + 6000 - 1 | |
ffmpeg(startf, endf) | |
#2フレ捨てる | |
startf = endf + 1 + 2; endf = startf + 3600 - 1 | |
ffmpeg(startf, endf) | |
#2フレ捨てる | |
startf = endf + 1 + 2; endf = startf + 28 * 60 - 1 | |
ffmpeg(startf, endf) | |
#2フレ捨てる | |
startf = endf + 1 + 2; endf = 14400 | |
ffmpeg(startf, endf) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment