FFmpeg ile dönen videoları
FFmpeg ile video döndürmek için nasıl anlamaya çalışıyorum. İPhone videoları portre modunda çekilen çalışıyorum. Dönme geçerli derece MediaInfo (mükemmel kütüphane, btw) kullanarak belirlemek için nasıl biliyorum ama FFmpeg şimdi yolda kaldım.
Kullanmak için ne gerekiyor okuduğum kadarıyla, birvfilterseçeneği. Okuduğuma göre, bu gibi görünmelidir:
ffmpeg -vfilters "rotate=90" -i input.mp4 output.mp4
Ancak, bu işe giremiyorum. İlk olarak,-vfiltersartık yok, artık sadece-vf. İkinci olarak, bu hata alıyorum:
No such filter: 'rotate'
Error opening filters!
Bildiğim kadarıyla,-seçenekler-FFmpeg bir yapı var. Çalışıyor-filtreler ffmpeggösterir bu
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.
Seçeneklerin olmasıvflipvehflipbüyük ve tüm, ama onlar sadece gitmem gereken yere götürmez beni. Videolar döndürmek için yeteneği için en azından 90 derece ihtiyacım var. 270 derece de mükemmel bir seçim olacaktır. Nereye gitti Döndür seçenekleri var?
CEVAP
90 saat yönünde Döndür:
ffmpeg -i in.mov -vf "transpose=1" out.mov
Devrik parametre iletebilirsiniz:
0 = 90CounterCLockwise and Vertical Flip (default)
1 = 90Clockwise
2 = 90CounterClockwise
3 = 90Clockwise and Vertical Flip
Üzerinde test edilmiştir :
- Ffmpeg Ubuntu 11.10 sürümü 0.7.3-4:0.7.3-0ubuntu0.11.10.1
- Film homebrew. ffmpeg ile Mavericks
Bir çözüm de convenience script Bu kullanmaktır.
Videoları Başlat dayalı kesme ve zaman...
BitmapFactory.decodeStream seçenekleri...
C katı FFmpeg sarıcı#/.NET...
Rastgele Dize Jeneratör Dönen Aynı Diz...
ASP.NET Web denetleyicisi dönen ikili ...