#How to add a windows 7/10 "right-click" context menu entry to convert your video file to gif
How to add a windows 7/10 "right-click" context menu entry to convert your video file to gif
Some of the other answers mentioned the video2gif script, which I used. But, you could use any script.
To create the context-menu option, you need to edit your registry. Open a powershell command prompt, running w/ admin privs. Execute these commands:
$key = "Registry::HKEY_CLASSES_ROOT\`*\shell\Run Video2Gif"
New-Item -Path $key"\Command" -Value "C:\dev\ffmpeg\ffmpeg-3.4.2-win64-static\bin\video2gif.bat `"%1`"" -Force
Now when you right click a file you'll have a "Run Video2Gif" option!
btw I installed ffmpeg to C:\dev\ffmpeg\ffmpeg-3.4.2-win64-static\
and put the video2gif.bat
script in the bin dir right next to ffmpeg.exe
. I also added C:\dev\ffmpeg\ffmpeg-3.4.2-win64-static\bin
to my windows PATH
, but I don't think you need to.
If you want the option of being able to supply some extra command line flags / args to the script, then make a new file named video2gif-prompt.bat
, and have the registry referce it instead of video2gif.bat
:
@echo off
set /p inp=Enter extrta args, if desired:
C:\dev\ffmpeg\ffmpeg-3.4.2-win64-static\bin\video2gif.bat %* %inp%
You can still just hit enter to quickly get the defaults.