私はFFmpegでビデオを回転する方法を理解しようとしています。ポートレートモードで撮影したiPhoneビデオを使用しています。MediaInfo(優れたライブラリ、btw)を使用して現在の回転の角度を決定する方法を知っていますが、今はFFmpegに行き詰まっています。
私が読んだことから、使用する必要があるのはvfilterオプションです。私が見るところによると、それはこのように見えるはずです:
ffmpeg -vfilters "rotate=90" -i input.mp4 output.mp4
ただし、これを機能させることはできません。まず、-vfiltersはもう存在しません。現在は-vfになっています。第二に、私はこのエラーを受け取ります:
No such filter: 'rotate'
Error opening filters!
私の知る限り、私はFFmpegのすべてオプションのビルドを持っています。ffmpeg -filtersを実行すると、次のようになります。
Filters:
anull            Pass the source unchanged to the output.
aspect           Set the frame aspect ratio.
crop             Crop the input video to x:y:width:height.
fifo             Buffer input images and send them when they are requested.
format           Convert the input video to one of the specified pixel formats.
hflip            Horizontally flip the input video.
noformat         Force libavfilter not to use any of the specified pixel formats
 for the input to the next filter.
null             Pass the source unchanged to the output.
pad              Pad input image to width:height[:x:y[:color]] (default x and y:
 0, default color: black).
pixdesctest      Test pixel format definitions.
pixelaspect      Set the pixel aspect ratio.
scale            Scale the input video to width:height size and/or convert the i
mage format.
slicify          Pass the images of input video on to next video filter as multi
ple slices.
unsharp          Sharpen or blur the input video.
vflip            Flip the input video vertically.
buffer           Buffer video frames, and make them accessible to the filterchai
n.
color            Provide an uniformly colored input, syntax is: [color[:size[:ra
te]]]
nullsrc          Null video source, never return images.
nullsink         Do absolutely nothing with the input video.
vflipとhflipのオプションを用意するのはすばらしいことですが、それらを使用しても目的の場所に行けません。少なくともビデオを90度回転させる機能が必要です。270度も同様に優れたオプションです。回転オプションはどこにありますか?
-vf "vflip,hflip"
                -vf "vflip,hflip"は魅力のように機能します。