I'm running Linux Mint 19.3 and would like to add an action to the context menu. I want to be able to select multiple image files and convert them to a mp4 file.I know this is possible by creating a nemo_action file in the /home/$USER/.local/share/nemo/actions folder.
I'm able to do this action via the command line with this command
Code:
ffmpeg -framerate 1 -pattern_type glob -i '*.jpg' -vf scale=500:300 out.mp4
ffmpeg = software to convert files
-framerate 1 = this will change the image in the mp4 file every 1 second
-pattern_type glob = this to to be able to select multiple images
'*.jpg' = selects the files I want
-vf scale=500:300 = sets the video size to 500 by 300
out.mp4 = name of the output file
I created an action file to try to perform this task with this information
Code:
[Nemo Action]
Active=true
Name=Images to Video
Comment=Convert images to an MP4 format
Exec=ffmpeg -framerate 1 -pattern_type glob -i '%F' -vf scale=500:300 out.mp4
Icon-Name=gnome-mime-application-x-compress
Selection=m
Extensions=jpg;png;bmp;gif
Terminal=true
On the Exec line I changed the '*.jpg' part to '%F' so I could select the files via a GUI.
%F = insert path list of selection
The Nemo action does show up in the context menu and I can select images to convert. But the action does not create the out.mp4 file. I think its failing because of the %F but I not sure how to select the files with out using %F.
Thank you in advance for your help.