I have a bunch of videos filmed on a Sony A7Rii that are upside down and need to be flipped 180. I'd like to do this lossless and been trying to use the following command:
ffmpeg -i input.mp4 -c copy -metadata:s:v:0 rotate=180 output.mp4
I understand this updates orientation information in the metadata of the video file, avoiding the need to reencode. However, it is generating an error relating to the audio codec:
[mp4 @ 000001db6a69cd80] Could not find tag for codec pcm_s16be in stream #1, codec not currently supported in container Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy)
After some searching, I understand this is expected behaviour because the MP4 container isn't supposed to have audio encoded with that codec. Unfortunately for me, that is how the Sony A7Rii produces files.
What FFMPEG command will offer the best work-around? Ideally I'd not re-encode the audio, but that would be tolerable if there is no other way.
Thanks!