Page 1 of 1

Edit with external program or rotate video 90 degrees (Windows ver.)

Posted: Mon Dec 23, 2024 4:49 pm
by golemus
Faststone which i used before I used "edit with external program" feature to apply a mp4 video rotation with ffmpeg.

ffmpeg -i (filename) -metadata:s:v rotate=90 -codec copy (filename).mp4

Is there any way to achieve the same in xnview? Sometimes the orientation sensor of smartphone makes mistake and puts a vertical video horizontally (or vice versa) and I have to correct them afterwards.

Re: Edit with external program or rotate video 90 degrees (Windows ver.)

Posted: Tue Dec 24, 2024 4:16 am
by golemus
I managed to (almost) solve this in "Open with..." and Configure programs.

Only issue is left that it does not work for files which have space in their filename. I don't know how to pass argument correctly to make it possible. Here is how I've done it currently:

ffmpeg -i "%1" -metadata:s:v rotate=90 -codec copy "%1.mp4"


ChatGPT claims that you could replace "%1" with "~%~1" and would work for filenames with spaces but it does not.