0

I have 100 uncompressed mov (Video files) and i want to convert all mov to sgi image sequences.

i have a list of all mov file path.

how to convert .mov (video) to .sgi (image sequence) using python and FFmpeg.

1 Answer 1

3

you can use ffmpeg to convert the video to sgi images using this ffmpeg command

ffmpeg -i inputVideo outputFrames_%04d.sgi

-replace inputVideo your input file path and name

-replace outputFrames with output file path and name

-replace '4' in _%04d with the number of digits you want for sequential image file naming.

now one way to process your files from python is to launch ffmpeg as a subprocess and providing the command you want executed by ffmpeg:

import subprocess as sp
cmd='ffmpeg -i inputVideo outputFrames_%04d.sgi'
sp.call(cmd,shell=True)

remember to use double \ in your file path in the cmd command string (at least for me on windows). If you want to loop over 100 movie files, write a loop that concatenates the command string with the appropriate input and output file names.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.