gpt4 book ai didi

ffmpeg - 如何使 mpv 与 mininterpolate 等 ffmpeg 过滤器更兼容?

转载 作者:行者123 更新时间:2023-12-04 23:02:21 26 4
gpt4 key购买 nike

ffmpeg 过滤器 mininterpolate(运动插值)在 MPV 中不起作用。

(尽管如此,该文件然后在没有 mininterpolate 的情况下正常播放)。

(我使用搜索引擎和整个文档进行了研究,并对使用 opengl 进行了故障排除,并且除了寻求帮助和学习更多地了解源代码之外,我通常尝试了一切,而且我不是程序员)......
--gpu-context=angle --gpu-api=opengl也不能使opengl工作。 (我猜 opengl 可以帮助查看它在文档中的使用)。

Note

To get a full list of available video filters, see --vf=help and http://ffmpeg.org/ffmpeg-filters.html .

Also, keep in mind that most actual filters are available via the lavfi wrapper, which gives you access to most of libavfilter's filters. This includes all filters that have been ported from MPlayer to libavfilter.

Most builtin filters are deprecated in some ways, unless they're only available in mpv (such as filters which deal with mpv specifics, or which are implemented in mpv only).

If a filter is not builtin, the lavfi-bridge will be automatically tried. This bridge does not support help output, and does not verify parameters before the filter is actually used. Although the mpv syntax is rather similar to libavfilter's, it's not the same. (Which means not everything accepted by vf_lavfi's graph option will be accepted by --vf.)

You can also prefix the filter name with lavfi- to force the wrapper. This is helpful if the filter name collides with a deprecated mpv builtin filter. For example --vf=lavfi-scale=args would use libavfilter's scale filter over mpv's deprecated builtin one.



我希望 MPV 能够启用 mininterpolate(MPV 可以使用的几个过滤器之一,在 http://ffmpeg.org/ffmpeg-filters.html 中列出)。但这就是发生的事情:

输入: "--vf=lavfi=[minterpolate=fps=60000/1001:mi_mode=mci]"
输出:
   cplayer:  (+) Video --vid=1 (*) (h264 1280x720 29.970fps)
cplayer: (+) Audio --aid=1 (*) (aac 2ch 44100Hz)
vd: Using hardware decoding (d3d11va).
ffmpeg: Impossible to convert between the formats supported by the filter 'mpv_src_in0' and the filter 'auto_scaler_0'
lavfi: failed to configure the filter graph
vf: Disabling filter lavfi.00 because it has failed.

(有趣的是, --gpu-api=opengl 不起作用(尽管根据规范我——不是吹牛——HD Graphics 400 Braswell 支持它的 4.2 版本)……而且 aresample 似乎也没有效果,而且音频很少过滤器选择的播放通常不会开始也不会输出错误。)

最佳答案

问题是您使用的是硬件解码,而没有将解码后的视频复制回系统内存。这意味着您的视频过滤器无法访问它。修复很简单,但该错误消息很难弄清楚。
要解决这个问题,只需传入 --hwdec=no .虽然 --hwdec=auto-copy也修复了它,但 minterpolate在 mci 模式下,CPU 非常密集,使用硬件解码也没有多大意义。 (对于大多数视频源)
全部一起:mpv input.mkv --hwdec=no --vf=lavfi="[minterpolate=fps=60000/1001:mi_mode=mci]"解释:最高效的硬件解码不会在解码后将视频数据复制回系统内存。但是您需要它在内存中运行基于 CPU 的解码视频数据过滤。您要求 mpv 进行一些视频过滤,但它无权访问解码的视频数据。
更多详情来自 mpv docs :

auto-copy selects only modes that copy the video data back to system memory after decoding. This selects modes like vaapi-copy (and so on). If none of these work, hardware decoding is disabled. This mode is usually guaranteed to incur no additional quality loss compared to software decoding (assuming modern codecs and an error free video stream), and will allow CPU processing with video filters. This mode works with all video filters and VOs.

Because these copy the decoded video back to system RAM, they're often less efficient than the direct modes, and may not help too much over software decoding.

关于ffmpeg - 如何使 mpv 与 mininterpolate 等 ffmpeg 过滤器更兼容?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57297372/

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