ffmpeg -ss 00:00:20 -i sample.mp4 -to 10 -r 10 -vf scale=200:-1 cutekid_cry.gif
convert -density 400 input.pdf picture.png
Here, -density 400 specifies the horizontal resolution of the output image file(s).
The above command will convert all pages in the given PDF file to PNG format. Each page in the PDF file will be converted into a PNG file and they will be saved in the current directory with file name picture-1.png, picture-2.png ... and so on. Please be patient. It will take a while depending on the number of pages in the input PDF file.
Once all pages in the PDF converted into PNG format, run the following command to create a video file from the PNG files.
fmpeg -r 1/10 -i picture-%01d.png -c:v libx264 -r 30 -pix_fmt yuv420p video.mp4
-r 1/10 : Display each image for 10 seconds.
-i picture-%01d.png : Reads all pictures that starts with name "picture-", following with 1 digit (%01d) and ending with .png. If the images name comes with 2 digits (I.e picture-10.png, picture11.png etc), use (%02d) in the above command.
-c:v libx264 : Output video codec (i.e h264).
-r 30 : framerate of output video
-pix_fmt yuv420p : Output video resolution
video.mp4 : Output video file with .mp4 format.
After the video is created, you can watch it from any devices that supports .mp4 format. After the video is created, you can watch it from any devices that supports .mp4 format. Next, I need to find a way to insert a cool music to my video. I hope it won‘t be difficult either.
If you wanted it in higher pixel resolution, you don‘t have to start all over again. Just convert the output video file to any other higher/lower resolution of your choice, say 720p, as shown below.
ffmpeg -i video.mp4 -vf scale=-1:720 video_720p.mp4
ffmpeg -i .\a.flv -vn b.mp3