As a workaround, user can use this command instead to do the rotation in the metadata. The last command can take quite a few minutes since it needs to re-encode the video. Depends on the video size and your CPU, the process may take a few minutes. This command however will re-encode the video. In my case, the command is: ffmpeg -i ~/Videos/aisha.mp4 -vf "transpose=1" -acodec copy ~/Videos/aisha-rotated.mp4 It will speed up the command quite a lot! (Thanks to Roman Sheydvasser) Add -c copy (or -codec copy) will copy all the frames instead of doing decode -> filter -> encode process. 3 – means rotate by 90 degrees clockwise and flip.2 – means rotate by 90 degrees counterclockwise.1 – means rotate by 90 degrees clockwise.0 – means rotate by 90 degrees counterclockwise and flip.In the command, the number in “ transpose=1” can also be: Now you can run the single command to rotate a video: ffmpeg -i input-video.mp4 -vf "transpose=1" -acodec copy output-video.mp4īefore this command, you may first navigate to the video folder either via cd command (e.g., cd ~/Videos), or in file browser go to the folder and right-click blank area and select “Open in Terminal”. To make sure, open terminal (Ctrl+Alt+T) and run command: It is very popular and most likely already installed on your system, if you have any audio, video, and other multimedia relevant applications installed. FFmpeg is a large suite of libraries and programs for handling multi-media files and streams. Firstly install FFmpeg if you don’t have it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |