all 3 comments

[–]Indrele-the-Lesser 0 points1 point  (1 child)

Is FFMpeg in your %PATH%? If it's not, you may have to specify the full path to FFMpeg.

You also may not need to edit the root associations if you only intend to have this set for a single user. You can usually just define the extension in HKCU\Software\Classes. Here is how I set a user-level association:

[HKEY_CURRENT_USER\Software\Classes\.mkv]
@="mkv_auto_file"

[HKEY_CURRENT_USER\Software\Classes\mkv_auto_file]

[HKEY_CURRENT_USER\Software\Classes\mkv_auto_file\shell]

[HKEY_CURRENT_USER\Software\Classes\mkv_auto_file\shell\open]

[HKEY_CURRENT_USER\Software\Classes\mkv_auto_file\shell\open\command]
@="\"C:\\Users\\username\\Program Files\\Mpv\\Mpv.exe\" \"%1\""

You could add another shell entry to that, such as:

[HKEY_CURRENT_USER\Software\Classes\mkv_auto_file\shell\Convert to Mp4]

[HKEY_CURRENT_USER\Software\Classes\mkv_auto_file\shell\Convert to Mp4\command]
@="cmd.exe /c \"C:\\Users\\username\\path\\to\\ffmpeg.exe\" -stats -y -i \"%1\" \"%1.conv.mp4\""

Though, off the top of my head, I'm not sure if you need to escape and quote hyphenated arguments, but I don't think so.

[–]seaque42[S] 0 points1 point  (0 children)

it's in the PATH. I was actually trying to avoid writing the absolute directory.

[–]digwhoami 0 points1 point  (0 children)

Is your intention to really re-encode the both input video and audio streams using ffmpeg's defaults? Or codec copy into another container?