gpt4 book ai didi

ffmpeg - 使用 ffmpeg 旋转 360 视频

转载 作者:行者123 更新时间:2023-12-04 22:45:29 26 4
gpt4 key购买 nike

我有 360° 视频,我想用 ffmpeg 微调它的方向。我需要将它水平顺时针旋转 90°(向左转)。我找到了一些有用的资源,指出 rotate 过滤器可以解决问题。所以我尝试了:

ffmpeg -i Petr_doskok.mp4 -vf "scale=2048x1024,rotate=-PI/2"  -r 30 -c:v libx265 -b:v 15M -pix_fmt yuv420p -c:a aac -b:a 192K Petr_doskok_rotated.mp4
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Petr_doskok.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Duration: 00:00:29.06, start: 0.000000, bitrate: 58095 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 4096x2048, 57948 kb/s, SAR 1:1 DAR 2:1, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 184 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> hevc (libx265))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
x265 [info]: Slices : 1
x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra
x265 [info]: ME / range / subpel / merge : hex / 57 / 2 / 2
x265 [info]: Keyframe min / max / scenecut / bias: 25 / 250 / 40 / 5.00
x265 [info]: Lookahead / bframes / badapt : 20 / 4 / 2
x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 0
x265 [info]: References / ref-limit cu / depth : 3 / on / on
x265 [info]: AQ: mode / str / qg-size / cu-tree : 2 / 1.0 / 32 / 1
x265 [info]: Rate Control / qCompress : ABR-15000 kbps / 0.60
x265 [info]: tools: rd=3 psy-rd=2.00 rskip signhide tmvp strong-intra-smoothing
x265 [info]: tools: lslices=6 deblock sao
Output #0, mp4, to 'Petr_doskok_rotated.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Stream #0:0(und): Video: hevc (libx265) (hev1 / 0x31766568), yuv420p, 2048x1024 [SAR 1:1 DAR 2:1], q=2-31, 15000 kb/s, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc58.35.100 libx265
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 192 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc58.35.100 aac
frame= 841 fps=9.8 q=-0.0 Lsize= 54721kB time=00:00:28.03 bitrate=15991.5kbits/s speed=0.326x
video:54028kB audio:659kB subtitle:0kB other streams:0kB global headers:2kB muxing overhead: 0.062856%
x265 [info]: frame I: 4, Avg QP:15.99 kb/s: 39026.34
x265 [info]: frame P: 214, Avg QP:16.15 kb/s: 30083.41
x265 [info]: frame B: 623, Avg QP:19.72 kb/s: 10727.28
x265 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x265 [info]: consecutive B-frames: 0.5% 0.9% 17.9% 73.9% 6.9%

encoded 841 frames in 86.02s (9.78 fps), 15787.22 kb/s, Avg QP:18.80
[aac @ 000001faa3ead7c0] Qavg: 289.921

好吧,视频真的旋转了 - 垂直!该文档未引用 360° 视频制作:http://ffmpeg.org/ffmpeg-filters.html#rotate .我的案例的正确参数值是多少?

最佳答案

要将视频顺时针旋转 90 度,请改用转置 ffmpeg 过滤器。

关于ffmpeg - 使用 ffmpeg 旋转 360 视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57851393/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com