r/ffmpeg • • May 31 '20

adding ffmpeg to context menu

if you want to create the files yourself
https://www.reddit.com/r/ffmpeg/comments/gtrv1t/comment/hl60d3u/?utm_source=reddit&utm_medium=web2x&context=3

reuploaded on multiple hosts

https://pastebin.com/N8hPrA8x

here the batch files and the registry file

  • for this to work, the batch files should be in c:\ffmpeg directory.
  • double click 'adding ffmpeg to context menu.reg'
22 Upvotes

16 comments sorted by

View all comments

Show parent comment

4

u/fireheart2008 Nov 18 '21 edited Nov 18 '21

easyhttps://i.postimg.cc/zvLpCNPV/screenshot-23.jpg

the .reg file

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\Convert to] "ExtendedSubCommandsKey"="*\shell\Convert to" "SeparatorBefore"="" "SeparatorAfter"=""

[HKEY_CLASSES_ROOT*\shell\Convert to] "Subcommands"="" "SeparatorBefore"="" "SeparatorAfter"=""

;==================================================== ;====================================================

;menu1

[HKEY_CLASSES_ROOT*\shell\Convert to\shell\menu1] "MUIVerb"="Video" "SubCommands"="ffmpeg.mp4;|;ffmpeg.rotate1;ffmpeg.rotate2;ffmpeg.rotate0;ffmpeg.rotate3;|;ffmpeg.verticalflip;ffmpeg.horizonalflip;|;ffmpeg.crop;ffmpeg.trim"

;menu2

[HKEY_CLASSES_ROOT*\shell\Convert to\shell\menu2] "MUIVerb"="Audio" "SubCommands"="ffmpeg.mp3.320k;ffmpeg.mp3.prompt"

;==================================================== ;====================================================

;ffmpeg.rotate1

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.rotate1] @="90° clockwise" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.rotate1\command] @=""C:\ffmpeg\ffmpeg.rotate1.bat""%1""

;ffmpeg.rotate2

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.rotate2] @="90° counterclockwise" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.rotate2\command] @=""C:\ffmpeg\ffmpeg.rotate2.bat""%1""

;ffmpeg.rotate0

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.rotate0] @="90° counterclockwise and vertically flip" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.rotate0\command] @=""C:\ffmpeg\ffmpeg.rotate0.bat""%1""

;ffmpeg.rotate3

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.rotate3] @="90° clockwise and vertically flip" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.rotate3\command] @=""C:\ffmpeg\ffmpeg.rotate3.bat""%1""

;ffmpeg.verticalflip

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.verticalflip] @="Vertical flip" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.verticalflip\command] @=""C:\ffmpeg\ffmpeg.vflip.bat""%1""

;ffmpeg.horizonalflip

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.horizonalflip] @="Horizonal flip" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.horizonalflip\command] @=""C:\ffmpeg\ffmpeg.hflip.bat""%1""

;====================================================

;ffmpeg.mp3.320k

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.mp3.320k] @="Mp3 320k" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.mp3.320k\command] @=""C:\ffmpeg\ffmpeg.mp3.320k.bat""%1""

;ffmpeg.mp3.prompt

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.mp3.prompt] @="Mp3 Choose quality" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.mp3.prompt\command] @=""C:\ffmpeg\ffmpeg.mp3.prompt.bat""%1""

;====================================================

;ffmpeg.mp4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.mp4] @="Mp4 fast conversion" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.mp4\command] @=""C:\ffmpeg\ffmpeg.mp4.bat""%1""

;ffmpeg.crop

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.crop] @="Crop" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.crop\command] @=""C:\ffmpeg\ffmpeg.crop.bat""%1""

;ffmpeg.trim

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.trim] @="Trim" [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ffmpeg.trim\command] @=""C:\ffmpeg\ffmpeg.trim.bat""%1""

rotate 3

ffmpeg -i "%~1" -vf "transpose=3" -acodec copy "%~dp1%~n1%_rotated.mp4"

hfilp

ffmpeg -y -i "%~1" -vf hflip -acodec copy "%~dp1%~n1%_horizonalflipped.mp4"

vflip

ffmpeg -y -i "%~1" -vf vflip -acodec copy "%~dp1%~n1%_verticalflipped.mp4"

crop

set /P W="outputWidth value. [inputWidth=iw] ENTER VALUE:"

set /P H="outputHeight value. [inputHeight=ih] ENTER VALUE:" set /P X="PIXELS FROM LEFT. [left=0,center=(iw-ow)/2] ENTER VALUE:" set /P Y="PIXELS FROM TOP. [top=0,center=(ih-oh)/2] ENTER VALUE:"

ffmpeg -y -i "%~1" -vf "crop=%W%:%H%:%X%:%Y%" -acodec copy "%~dp1%~n1%_cropped.mp4"

rotate 2

ffmpeg -i "%~1" -vf "transpose=2" -acodec copy "%~dp1%~n1%_rotated.mp4"

mp3 320k

ffmpeg -i "%~1" -vn -acodec libmp3lame -b:a 320k -id3v2_version 3 "%~dp1%~n1%_out.mp3"

mp3 prompt

set /P BITRATE="ENTER BITRATE:"

ffmpeg -i "%~1" -vn -acodec libmp3lame -b:a %BITRATE%k -id3v2_version 3 "%~dp1%~n1%_out.mp3"

trim

set /P start="START AT:"

set /P end="END AT:"

ffmpeg -y -i "%~1" -ss %start% -to %end% -vcodec copy -acodec copy -avoid_negative_ts make_zero "%~dp1%~n1%_out.mp4"

rotate 1

ffmpeg -i "%~1" -vf "transpose=1" -acodec copy "%~dp1%~n1%_rotated.mp4"

mp4

ffmpeg -y -i "%~1" -vcodec copy -acodec copy "%~dp1%~n1%_output.mp4"

rotate 0

ffmpeg -i "%~1" -vf "transpose=0" -acodec copy "%~dp1%~n1%_rotated.mp4"

1

u/Rhyis Nov 19 '21

Thank you so much! O_O!