使用FFMPEG,如何将框架图像序列转换为视频(视频编解码器:DVVIDEO)?

发布于 2025-02-01 05:52:56 字数 1164 浏览 3 评论 0原文

我正在研究一个图像处理项目。

该项目进行如下:

输入视频 - >框架序列 - > (处理) - >输出视频

我想创建与输入视频相同规格的输出视频。

我们使用的输入视频的规格是:

- Size : 1280x1080, Codec : dvvideo, pixel_fmt : yuv422

但是我正在努力处理以下错误:

Duration: 00:00:03.20, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgb24(pc), 1280x1080 [SAR 3:2 DAR 16:9], 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> dvvideo (native))
Press [q] to stop, [?] for help
[dvvideo @ 0x55b965b745c0] DVCPRO HD encoding is not supported.
[dvvideo @ 0x55b965451780] ff_frame_thread_encoder_init failed
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

代码在下面。 (python中的子过程)

ffmpeg -y -f image2 -r "{fps}" -i {input_img_root} -s 1280:1080 -b:v {bit_rate}  -vcodec dvvideo -pix_fmt yuv422p "{output}"

(fps和Bitrate取自输入视频。input_img_root和输出是路径。)

我已经尝试了几天,但是它不起作用。

如果您知道在维护视频规范(尤其是DVVIDEO编解码器)(不使用FFMPEG)的同时制作新视频的任何方法,则可以分享它。

I'm working on an image processing project.

The project proceeds as follows:

Input Video -> frame Sequence -> (Processing) -> Output Video

I want to create the output video with the same specifications as the input video.

The specs of the input video we use are:

- Size : 1280x1080, Codec : dvvideo, pixel_fmt : yuv422

But I am struggling with the following error:

Duration: 00:00:03.20, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: png, rgb24(pc), 1280x1080 [SAR 3:2 DAR 16:9], 29.97 fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (png (native) -> dvvideo (native))
Press [q] to stop, [?] for help
[dvvideo @ 0x55b965b745c0] DVCPRO HD encoding is not supported.
[dvvideo @ 0x55b965451780] ff_frame_thread_encoder_init failed
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
Conversion failed!

The code is below. (subprocess in python)

ffmpeg -y -f image2 -r "{fps}" -i {input_img_root} -s 1280:1080 -b:v {bit_rate}  -vcodec dvvideo -pix_fmt yuv422p "{output}"

(fps and bitrate are taken from the input video. and input_img_root and output are paths.)

I've been trying for several days, but it doesn't work.

If you know any way to make a new video while maintaining the video specifications (Especially dvvideo codec)(not using ffmpeg), it would be nice to share it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浅紫色的梦幻 2025-02-08 05:52:56

我解决了这个问题。

这个问题归因于FFMPEG的版本。

将FFMPEG版本升级到4.4.2(最新版本)之后,错误消失了。

I solved this problem.

This problem was due to the version of FFmpeg.

After upgrading the version of FFmpeg to 4.4.2(latest version), the error disappeared.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文