Fast video rotate script

The script rotates video. Packages Yad, ffmpeg and Xterm must be installed in pc-version, and if using x-terminal-emulator, packages Yad and ffmpeg are needed.

fast-rotate-files

The script:

#!/bin/bash
##
##
### RJP 26.11.2023
##
# 1.12.2024 title added
time=$(date "+%F-%H-%M-%S")
yad --width=800 --title="FAST VIDEO ROTATOR" --text='Choose video-file for rotating. File selection opens when you close this window.'
sleep 0,1
VIDEO=`yad --file --width=1000`
cp -f "$VIDEO" /tmp/VIDEO00
yad --width=800 --title="FAST VIDEO ROTATOR" --text='Next phase is starting soon.'
sleep 5
yad --form --width=500 --text="FAST VIDEO ROTATOR:" --title="FAST VIDEO ROTATOR" \
--field="Rotate video 90 degrees backwards":fbtn "x-terminal-emulator -e bash -c 'ffmpeg -i /tmp/VIDEO00 -map_metadata 0 -metadata:s:v rotate="90" -codec copy $time-video.mp4; exec bash' & " \
--field="Rotate video 180 degrees backwards":fbtn "x-terminal-emulator -e bash -c 'ffmpeg -i /tmp/VIDEO00 -map_metadata 0 -metadata:s:v rotate="180" -codec copy $time-video.mp4; exec bash' & " \
--field="Rotate video 270 degrees backwards"::fbtn "x-terminal-emulator -e bash -c 'ffmpeg -i /tmp/VIDEO00 -map_metadata 0 -metadata:s:v rotate="270" -codec copy $time-video.mp4; exec bash' & " \
--button=Exit:1