Linux/ffmpeg
< Linux
Installation
sudo add-apt-repository ppa:mc3man/trusty-media sudo apt-get update sudo apt-get install ffmpeg # sudo apt-get install frei0r-plugins # sudo apt-get install ffmpeg gstreamer0.10-ffmpeg
convert flv to mp4
See flv
Extract Music from mp4
See mp4
m4a:
ffmpeg -i input.mp4 -vn -c:a copy output.m4a
jpeg slideshow
mkdir show x=1 ; for i in *jpg; do counter=$(printf %05d $x); ln "$i" show/img"$counter".jpg; x=$(($x+1)); done cd show ffmpeg -r 10 -i img%05d.jpg -c:v libx264 out.mp4
ffmpeg -r 1/5 -start_number 2 -i img%03d.png -c:v libx264 -r 30 -pix_fmt yuv420p out.mp4 ffmpeg -r 1/5 -i img%03d.png -c:v libx264 -vf fps=25 -pix_fmt yuv420p out.mp4
ffmpeg -framerate 1/5 -i img%03d.png -c:v libx264 -r 30 -pix_fmt yuv420p out.mp4
ffmpeg -f image2 -i /tmp/img%03d.jpg /tmp/a.mpg
ffmpeg -r 60 -f image2 -s 1920x1080 -i pic%04d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p test.mp4 # %04d means that zeros will be padded until the length of the string is 4 # -r is the framerate (fps) # -crf is the quality, lower means better quality, 15-25 is usually good # -s is the resolution # -pix_fmt yuv420p specifies the pixel format, change this as needed
References:
- Using ffmpeg to convert a set of images into a video - http://hamelot.io/visualization/using-ffmpeg-to-convert-a-set-of-images-into-a-video/
- FFmpeg create video from images - Stack Overflow - http://stackoverflow.com/questions/24961127/ffmpeg-create-video-from-images
- linux - ffmpeg: create a video from images - Super User - http://superuser.com/questions/624567/ffmpeg-create-a-video-from-images
- How to losslessly encode a jpg image sequence to a video in ffmpeg? - Video Production Stack Exchange - http://video.stackexchange.com/questions/7903/how-to-losslessly-encode-a-jpg-image-sequence-to-a-video-in-ffmpeg
- Create a video slideshow from images – FFmpeg - http://trac.ffmpeg.org/wiki/Create%20a%20video%20slideshow%20from%20images