使用ffmpeg检查图片或视频文件是否包含透明通道
时间:2024-02-19 17:33:45.022 +0800 CST 浏览:140
$ ffmpeg -v error -i 123.mp4 -vf "select='eq(n,0)', alphaextract" -f null /dev/null

[Parsed_alphaextract_1 @ 0x7fe8f5208100] Requested planes not available.
[Parsed_alphaextract_1 @ 0x7fe8f5208100] Failed to configure input pad on Parsed_alphaextract_1
[vf#0:0 @ 0x7fe8f5005f40] Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while filtering: Invalid argument
[out#0/null @ 0x7fe8f5004900] Nothing was written into output file, because at least one of its streams received no packets.

如果不包含透明通道会打印错误信息,且程序退出码为非0。



如果这篇文章对你有所帮助,可以通过下边的“打赏”功能进行小额的打赏。

本网站部分内容来源于互联网,如有侵犯版权请来信告知,我们将立即处理。


来说两句吧