![]() setpts=N/(25*TB) - magic command I don't quite understand, but I know that it stops it holding frames.select=mod(n\,2) - every second frame, n is current frame, the \ is there to escape the comma.the scale command here will scale horizontally to 400 pixels, and keep the correct aspect ratio in y (because the y-axis is told to scale to -1, which is interpreted as 'keep the aspect ratio correct)įfmpeg -i "pyro.d.jpg" -lavfi "select=mod(n\,2),setpts=N/(25*TB),crop=in_w:in_h-85:0:0,scale=300:-1:flags=lanczos" -y out.gif.crop will use default width (in_h), and default height minus 85 pixels ( in_h-85), calculated from the top left corner (0,0).The following examples don't do the palette trick, but show off how baroque you can get with ffmpeg to do all sorts of resizing and manipulation. Here's the important bits from that site in 2 lines:įfmpeg -i invideo.mp4 -vf "palettegen" -y out_palette.pngįfmpeg -i invideo.mp4 -i out_palette.png -lavfi "paletteuse" -y out.gif Good guide to how to avoid dithering here, which involves running ffmpeg twice once to generate a palette, the second to generate a gif using that palette. He's awesome, so I'd trust his word: ffmpeg to generate gifs 10.5 Gnome and swapping ctrl start alt opt cmd keys.10.2 Find all hips in all subdirs and zip them.10.1 Find a word in lots of files of specific type.9.2 Text select blocks with the in and a modifiers.9.1 The :norm command as a easier macro.8.10 Quickly copy one file to a sequence with seq.8.8 Get a seqls/lseq/lss equivalent with pyseq.8.2 Get a decent terminal by replacing cmd.exe with ConEmu.7.1 Capture device audio into OBS with soundflower.6.3 rsync compression not always the best idea.5.4 Combine image sequence and audio and fade and offset.5.3 ffmpeg top bottom stereo pano to mono.3.3 ffmpeg insert some silence to the start of an mp3.3.2 ffmpeg quick audio removal and clip start and end.2.13 Alias or function to resize to 1920 x H and 30fps.2.11 Controlling mp4 file size with CRF.2.8 ffmpeg resize to power of two dimensions.2.5 ffmpeg cropping to a window on linux. ![]() 2.3 ffmpeg hold first frame and last frame.2.2 ffmpeg to generate mp4 from image sequence.1.3 ffmpeg to generate super small gifs.
0 Comments
Leave a Reply. |