What I try to achieve:
Expanding my Nautilus context menu by an action to simply select a JPG-file and a MP3-file to combine them to a MP4-file like I already do in terminal by this command:
ffmpeg -r 1 -loop 1 -i image.jpg -i audio.mp3 -acodec copy -r 1 -shortest -vf scale=1920:1080 video.mp4
––––––––––––––––––––––––––
This is what I've done:
I created a file composite_video.sh
and saved it in /opt/lampp/htdocs/git/nautilus-scripts
(to sync it with my GitHub, too)
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "Call the script with ./$(basename "$0") (path to image) (path to video)"
else
ffmpeg -r 1 -loop 1 -i "$1" -i "$2" -acodec copy -r 1 -shortest -vf scale=1920:1080 video.mp4
fi
Then I created a new FileManager-Action like this:
––––––––––––––––––––––––––
This don't work. If I select JPG and MP3 and select action in Nautilus context menu nothing happens. What did I wrong?