首先安装相关依赖:

sudo apt-get install mencoder
sudo apt-get install imagemagick

编辑 test.sh 脚本如下:

#!/bin/bash
echo $* | tr ' ' '\n' > files.txt
mencoder mf://@files.txt -mf fps=1 -ovc lavc \
-lavcopts vcodec=msmpeg4v2 -noskip -o movie.mpg

我的jpg文件都存放在 /home/zifeiy/图片/郑英辰 目录下,

在生成视频之前我需要使用image-magic将图片的大小都设置成一样的:

convert -sample 800x800 ~/图片/郑英辰/*.jpg

然后记得把原始文件移动到别的位置。

然后我执行如下命令:

convert -resize 800x800! ~/图片/郑英辰/*.jpg

在当前位置成功生成了视频文件 movie.mpg。

视频链接

相关文章:

  • 2021-06-27
  • 2022-02-11
  • 2021-06-19
  • 2022-12-23
  • 2021-12-14
  • 2021-11-10
  • 2022-01-07
猜你喜欢
  • 2021-08-06
  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
  • 2021-05-26
  • 2021-03-31
  • 2021-06-02
相关资源
相似解决方案