简体   繁体   English

创建具有Alpha通道/透明度的视频文件

[英]creation of video file with alpha channel/transparency

I'm experimenting with a video file with alpha channel. 我正在尝试一个带有Alpha通道的视频文件。 Later on the file should be an overlay for another video. 在文件的后面,应该是另一个视频的覆盖图。 It will be merged with another file in real time and saved to another file. 它将与另一个文件实时合并并保存到另一个文件。 But that is not the important point. 但这不是重点。 The problem starts earlier because I can't even play it. 由于我什至无法播放,因此问题开始得较早。

The video is a png-encoded Quicktime-file which I cannot play with any video player. 该视频是png编码的Quicktime文件,我无法使用任何视频播放器播放。 WMP, VLC, MPC and ffplay all show various problems which all lead to the problem that the images seem to get decoded too slowly. WMP,VLC,MPC和ffplay均显示各种问题,所有这些问题均导致图像似乎解码得太慢的问题。 The strange thing is that neither cpu (i7) nor my ssd are on limit but the file isn't played correctly. 奇怪的是,cpu(i7)和我的ssd都没有限制,但是文件无法正确播放。

Since the problem appears with all players I think it's based on using png in video. 由于问题出现在所有播放器上,因此我认为这是基于在视频中使用png造成的。 I googled but didn't find a proper way to create a partly transparent video file. 我用谷歌搜索,但是没有找到创建部分透明视频文件的正确方法。 I tried various methods of exporting (with adobe media encoder) with no result: the file lost its transparency or is running too slow. 我尝试了多种导出方法(使用adobe媒体编码器),但没有结果:文件失去了透明度或运行速度太慢。

The resulting file which I create with my SDK is correct (video and audio are synchronous and fluid) but it takes 1 minute to render a video of 40 seconds although it works in real time with files without transparency. 我用我的SDK创建的结果文件是正确的(视频和音频是同步且流畅的),但是渲染40秒的视频需要1分钟,尽管它实时处理不透明的文件。

Does anyone know what kind of file I should export that has a minimum resolution of 720p, that is partly transparent and that can be played with ffplay in real time? 有谁知道我应该导出哪种文件,其最低分辨率为720p,部分透明并且可以使用ffplay实时播放? I would also appreciate any experiences with partly transparent videos which could help me because I couldn't find any helpful links? 我也很欣赏部分透明的视频的经验,这些视频可以帮助我,因为我找不到任何有用的链接?

Thanks, Marius 谢谢,马吕斯

The real solution to this problem is to always export a Quicktime file that makes use of the lossless Animation codec. 解决此问题的真正方法是始终导出使用无损动画编解码器的Quicktime文件。 This can either be 24BPP (Million) or 32BPP (Millions+) with a full alpha channel, but the main point is that the codec is lossless and should be playable on different desktop computers. 它可以是具有完整Alpha通道的24BPP(百万)或32BPP(百万+),但是要点是编解码器是无损的,应该可以在其他台式机上播放。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM