Images -> video
ffmpeg -r 30 -f image2 -s 1280x720 -start_number 1 -i %06d.png -vframes 1000 -vcodec libx264 -crf 25 -pix_fmt yuv420p out.mp4
Video -> frames with specifc frame index
cmd = "ffmpeg -i {} -vf select='between(n\,{}\,{})' -vsync 0 -start_number {} {}/%06d.jpg".format(video_path, s, t, s, out_path)
No comments:
Post a Comment