
It is an example that uses the output of Get-ChildItem with the filter parameter and puts it straight into the script. The Rotation parameter is used from the script to be user-friendly to read and to use and it has options for 90, 180 or 270 degrees. The example below takes all mp4 files for the location you are in and rotate them 90 degrees. The first example is the big one and for me the most useful. Let’s dive into what the script does and how you do use it. In my case it can mostly be maybe a simple user error but it could of course just as well be something else. There are numerous reasons that I can think off that you would want to rotate the video. Today I would like to share my script to rotate a video or a bulk of videos. I am required to use FFMPEG sometimes for users that need assistance in various video compression or editing. The input file has these infos: Metadata:ĭisplaymatrix: rotation of -90.00 degreesĪnd the two separate files have these infos:ĭisplaymatrix: rotation of -180.As I said in the previous post about updating and installing FFMPEG I absolutely love the program especially in combination with PowerShell for me to use as a tool. Is there a way to do what I want without encoding one of the two files? The problem is, this does not work changing the metadata of the second video file does not seem to be taken into account when ffmpeg merges the two files at the end, the result is strictly the same as the input video file. Where merge.txt lists the two files, 1.mp4 and 20.mp4.

I merged the 2 files together with this command:įfmpeg -f concat -i merge.txt -c copy OUTPUT-MERGED.mkv I changed the metadata of the second video file so that it matches the orientation of the first one when read:įfmpeg -i 2.mp4 metadata:v:s:0 "rotate=180" -c copy 20.mp4

I used this command to split the video file into two partsįfmpeg -i input.mp4 -t 00:14:36 -c copy 1.mp4 -ss 00:14:36 -c copy 2.mp4 I have a large video file (2.2 GB) and one part of the video is not oriented in the correct way: the first part is fine, but the second part is rotated by 180 degrees (480*1066 pixels).
