Skip to content

Instantly share code, notes, and snippets.

@vejuhust
Last active May 25, 2020 13:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vejuhust/679b5ecfc36e9488ba82 to your computer and use it in GitHub Desktop.
Save vejuhust/679b5ecfc36e9488ba82 to your computer and use it in GitHub Desktop.

ffmpeg

install

apt-add-repository ppa:jon-severinsson/ffmpeg
apt-get update
apt-get install ffmpeg

generate silent film

ffmpeg -i snap_%04d.jpg -vcodec mpeg4 timelapse.avi

MEncoder

install

apt-get install mencoder

generate avi silent film

mencoder mf://snap*.jpg -mf fps=20:type=jpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:vbitrate=7000 -oac copy -o timelapse2.avi

generate avi with bgm from douban.fm

mencoder mf://snap*.jpg -mf fps=20:type=jpg -ovc lavc -lavcopts vcodec=mpeg4:mbd=2:trell:vbitrate=7000 -audiofile bgm.mp4 -oac pcm -o timelapse3.avi

generate mp4 silent file

mencoder mf://"$dirtmp"snap*.jpg -mf fps=20:type=jpg -of lavf -lavfopts format=mp4 -ovc x264 -x264encopts pass=1:bitrate=3840000:crf=24 -nosound -o imelapse.mp4

image

apt-get install imagemagick
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment