是否可以使用 ffmpeg 缩放原始 YUV 视频?我有一个 1920x1080 的原始 yuv 视频,我想将其缩小到 960x540。
我使用了下面的命令,但我没有工作。
ffmpeg -i input.yuv -vf scale=960:540 -c:v rawvideo -pix_fmt yuv420p out.yuv
输出:
[IMGUTILS @ 0xbfbd3924] Picture size 0x0 is invalid
[IMGUTILS @ 0xbfbd34e4] Picture size 0x0 is invalid
[IMGUTILS @ 0xbfbd3534] Picture size 0x0 is invalid
[rawvideo @ 0xa79f340] Could not find codec parameters for stream 0 (Video: rawvideo (I420 / 0x30323449), yuv420p, -4 kb/s): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
crowd_run_1080p50_100frame.yuv: could not find codec parameters
最佳答案
对于 YUV 输入文件,您需要指定帧速率和大小,因为它没有这些信息。
ffmpeg -s:v 1920x1080 -r 25 -i input.yuv -vf scale=960:540 -c:v rawvideo -pix_fmt yuv420p out.yuv
关于video - 使用 ffmpeg 缩放(调整)原始 yuv 视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21984833/