Converting AVI Frames to JPGs on Linux

2020-02-26 07:31发布

What program on Linux would allow you to convert all the frames in an AVI into a series of JPEG files?

5条回答
看我几分像从前
2楼-- · 2020-02-26 07:49
avconv -i 'in.mov' -vsync 1 -r 100 'out-%03d.jpeg'

This will convert the input movie into individual frames. Using 100 after the r will pull 100 frames per second; using 1 will pull 1 frame per second. In this example the output files will be out-001, out-002, out-003, ...etc. Be careful when using a higher frame rate as the number of frames will be the framerate time the duration of the video +-1.

查看更多
▲ chillily
3楼-- · 2020-02-26 07:56

Use ffmpeg.

ffmpeg -i infile.avi -f image2 image-%03d.jpg

Check out this answer on stackoverflow, as pointed out by Chris S.

I also found this article entitled "Creating Animated Screenshots on Linux" which details the process of using mencoder to capture sequential screenshots. (The end of the article discusses taking those screenshots and encoding them into another format, but you can disregard that part.)

查看更多
The star\"
4楼-- · 2020-02-26 07:59

one word: mencoder

查看更多
劫难
5楼-- · 2020-02-26 08:01

MPlayer/MEncoder could be of help. I have used it to convert movie files into formats that occupied lesser space. But not for extracting jpegs yet.

查看更多
疯言疯语
6楼-- · 2020-02-26 08:02

convert your_clip.avi "%d.jpg" where %d will get replaced with a number.

Bonus: convert 1.jpg 2.jpg moving.gif makes a gif out of those two pictures.

The convert command comes from ImageMagick (apt-get install imagemagick).

查看更多
登录 后发表回答