<aside>
Environment Variables, and open:
Edit the system environment variablesPath, then click Edit…C:\\ffmpeg\\bin (O donde tengas Bin)
</aside><aside>
<aside>
ffmpeg [global_options] {[input_file_options] -i input_url} ... {[output_file_options] output_url} ...
</aside>
| Flag | Purpose |
|---|---|
-vf "fps=15" |
Drops frame rate to 15 (biggest size saver) |
scale=512:-1 |
Resizes to 512 px width, keeping aspect ratio |
flags=lanczos |
Smooth, high-quality downscaling |
-gifflags -offsetting |
Reduces redundant frames |
-y |
Overwrites existing output |
-an |
Removes audio track |
-c:v h264_nvenc |
NVIDIA GPU encoder |
-cq:v 28 |
quality level (lower = higher quality + bigger size, higher = smaller size)Q |
-preset fast |
Faster encode, slightly bigger file (slow for smaller size) |
-b:v 980k |
Video bitrate |
-t 4 |
time ([-][HH:]MM:SS[.m...]) |
-i "FILENAME.mp4” |
Indicates the element to input |
-ss 0.5 |
Skip time from the start of the video |
| </aside> |
<aside>
No sound
ffmpeg -i "FILENAME.mp4" -c:v h264_nvenc -cq:v 32 -b:v 0 -preset slow -an "output.mp4"
ffmpeg -ss 0 -t 4 -i "FILENAME.mp4" -vf "fps=30,scale=720:-1:flags=lanczos" -loop 0 "FILENAME_CompWebp.webp"
ffmpeg -i "FILENAME.gif" -vf "fps=15,scale=512:-1:flags=lanczos" -gifflags -offsetting -y output_small.gif
ffmpeg -i "FILE_NAME.webm" -an -c:v libvpx-vp9 -crf 48 -b:v 0 -threads 12 "FILE_NAME_compressed.webm"
ffmpeg -ss 0 -i "FILE_UnC.webm" -vf "fps=30,scale=320:-1:flags=lanczos,palettegen" "palette_NAME.png"
ffmpeg -ss 0 -i "FILE_UnC.webm" -i "palette_NAME.png" -filter_complex "fps=30,scale=720:-1:flags=lanczos[x];[x][1:v]paletteuse" "FILE_CompGif.gif"