I want to create a right click/context menu entry named "Convert to MP4" available to every video file (or at least MKV, if every video file isn't possible), where it would do launch FFmpeg from a set location (let's say "C:\Users\Username\Documents\Programs\Portable\FFmpeg 20190916\bin") and do just that, create a MP4 version (lossless encoding / just change the container) of the input video file. The output file (MP4) should appear in the same folder with the input file. Ideally, I'd like to be able to do that with selecting (Ctrl+click) more than one file at a time too (but not necessarily every video file in the folder).
I understand this should be possible by creating a bat file and then somehow integrating it in the context menu (with a "Send to" menu shortcut perhaps?). I don't really know CMD that well, though, and I am not sure what should I do so FFmpeg catches the specific file(s) and how to get the output file(s) in the same folder with the input.
For starters, I've tried to adapt a bat file based on this answer to the question you've linked as a duplicate to see, seeing If I can come up with a bat file that works (before I do the "context menu/registry" part), but, as I've said, I really don't know how to use cmd properly and it didn't work. I don't think my question is a duplicate of that question you've suggested, because mine deals with video rather than audio (I'm not saying it's much different in principle, I just don't know what to type instead of those audio codecs in order to adapt it) and most importantly, mine is about changing the container rather than converting so I would need different commands. So based on that answer and info found in A quick guide to using FFmpeg to convert media files at Opensource.com, I've created bat files with commands such as:
ffmpeg -i %1 copy "%~n1.mp4
ffmpeg -i "%1" "%1.mp4
ffmpeg -i "%1.mkv" "%1.mp4
ffmpeg -i input.mkv -c:av copy output.mp4
(I used the full pathname to FFmpeg, but omitted it here for ease of reading) then tried to drop an MKV file to them, but none work. I've already checked several questions in here dealing with cmd and FFmpeg but they weren't able to help so I'll appreciate any help given!
"
at the end. Aside from that, open the command prompt,cd
into the directory where the.bat
file is and run it from there so you can see the errors it gives you.