Open kfhdk opened 2 years ago
Thank you for submitting this! - However... could it be simpler just as a ffmpeg command line? Is the python code required? If it were an ffmpeg command line I'd be happy to include it in the docs.
I've used both ffmpeg and exiftool to accomplish adding the rotation metadata to a file when I forgot to unlock the orientation lock on the gopro, and recorded with it upside down. Note this just adds the rotation metadate which many players will support. Neither of these actually re-encodes the file with a rotation applied to the video stream. If you need to do that, the commands below are not what you need.
ffmpeg command: ffmpeg -i input.mp4 -map_metadata 0 -metadata:s:v rotate="180" -codec copy output.mp4
exiftool (this will make a copy of the file with the metadata applied: exiftool.exe -rotation=180 -api LargeFileSupport=1 input.MP4
Add this filter line to an ffmpeg profile will rotate the source video 180 deg during the gopro-dashboard.py rendering step:
"filter": "[0:v]rotate=PI:c=none:ow=rotw(0):oh=roth(0)[rotate0];[rotate0][1:v]overlay",
Adjust the "rotate=PI" argument for other rotation angles (e.g. PI/2)
Hi,
I made a little tool to rotate video files as the orientatation sometimes is wrong. I mount my gopro upside down on my bike. It rotates the video by setting metadata in the file. https://github.com/time4tea/gopro-dashboard-overlay/compare/main...kfhdk:gopro-dashboard-overlay:rotate