video - 使用 ffmpeg 缩放(调整)原始 yuv 视频

标签 video ffmpeg

是否可以使用 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/

相关文章:

php - 哪些网络视频格式可以做到这一点?

html - 单击自定义按钮后打开 Youtube 视频

html - 动画 css 进度条而不在更新之间跳转?

flash - 将 RTMP 协议(protocol)重定向到另一个 RTMP 流

ios - 后台 iOS 视频合并

python - Kivy不加载ff_mpeg

image - 指定百分比而不是时间到 ffmpeg

video - MP4的时间戳信息

ffmpeg:连接视频和图像

python - OpenCV VideoCapture 以来自 GoPro 的视频结束