我一直在努力通過FFmpeg,但我一直無法得到他們的網站上的示例運行旋轉。我試圖在底部的一個固定點上來回擺動視頻 - 想想一個從左向右移動的頭(等等)。FFmpeg - 在角度旋轉
我正在嘗試使用過濾器「rotate」(https://ffmpeg.org/ffmpeg-filters.html#rotate)來做到這一點。試圖使用他們的例子,我得到一個錯誤。
這是我到目前爲止有:
ffmpeg -i vid1.mp4 -i vid2.mov -loop 1 -i image.png -filter_complex "\
[2:v]alphaextract, scale=240x160[mask];\
[0:v] scale=240x160, rotate=A*sin(2*PI/T*t) [ascaled];\
[ascaled][mask]alphamerge[masked];\
[1:v]scale=480x360[background];\
[background][masked]overlay=120:20"\
-c:a copy 65B6354F61B4AF02_HD_sq.MOV
我使用的一個例子,企圖得到的東西在所有運行「旋轉」直接。
的錯誤我得到的回覆是:
[Parsed_rotate_3 @ 0x7ff4476045e0] [Eval @ 0x7fff5b3e3f00] Undefined constant or missing '(' in 'T*t)'
[Parsed_rotate_3 @ 0x7ff4476045e0] Error occurred parsing angle expression 'A*sin(2*PI/T*t)'
[Parsed_rotate_3 @ 0x7ff4476045e0] Failed to configure output pad on Parsed_rotate_3
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #1:0
如果我刪除「A」,「T」,「罪」等,不旋轉實際的工作,但是從所期望的行爲爲止。
我是否缺少某些東西來揭露那些參數?
非常感謝,非常有幫助。 – connor