XLib 的视频解码和渲染库
目前我有一个使用 Xlib 编写的 Linux 应用程序,我需要向其中添加视频播放功能。
您建议我使用哪些库来进行视频解码和渲染,并与 Xlib 配合良好?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
目前我有一个使用 Xlib 编写的 Linux 应用程序,我需要向其中添加视频播放功能。
您建议我使用哪些库来进行视频解码和渲染,并与 Xlib 配合良好?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
选项很丰富。
Xine 可能是最简单的(无论如何,比 FFmpeg 更容易),除了它本身和 Xlib 之外不需要任何东西。有一个简短、完整的 示例,实际代码不到 180 行。
另一方面,使用 MPlayer+XEmbed 也非常简单,如果您不介意对视频播放进行太多控制,则更容易。创建一个 X11 窗口,然后运行
mplayer -wid
。The options are plentiful.
Xine is probably the easiest (easier than FFmpeg, anyhow) without requiring anything beyond itself and Xlib. There's a short, complete example in under 180 lines of actual code.
On the other hand, using MPlayer+XEmbed is pretty easy too, much easier if you don't care to have much control over the video playback. Create a X11 window, and run
mplayer -wid <window-id>
.您可以尝试使用 FFMpeg 或 Mplayer。
You could try using either FFMpeg or Mplayer.