0

I'm looking for how to rotate a video without losing any quality when re-encoding.

I currently use ffmpeg -i "inputvideo" -crf 0 -vf transpose=2 -acodec copy "outputvideo".

Although -crf 0 should be lossless, I found there is difference after comparing the first frame of the orginal video and the rotated video. What is the reason?

As I do not have enough reputation, I put the screenshot here https://sm.ms/image/6bjAIkFJM4rDiaf. Left is the original.

I noticed there is an answer https://stackoverflow.com/a/49535017/11081223 modifying hex data to achieve video rotation without re-encoding, but it does not change the actual file just the metadata only to let the player know. I assume that method leaves rotation job for player to deal with so the image quality difference is more obvious.

The screenshot is here https://sm.ms/image/StZxPgHOEDKFRcr. Left is the original.

fc2otica
  • 1
  • 3
  • Share full log of command. – Gyan Jun 07 '20 at 06:35
  • @Gyan As you requested, I upload it to google drive. https://drive.google.com/file/d/1AbSJehcUwF9FFyPD6oT9Jxege_Vz4Jbn/view?usp=sharing. If I just paste the entire log in my question, it will become a whole mess and I cannot find out a good way to put it directly here. By the way, I use >>D:log.txt to export the cmd result, but the log file is empty and I had to copy and paste manually. Do you know what the problem is? – fc2otica Jun 07 '20 at 16:13

0 Answers0