【问题标题】:how i can implement live streaming in android我如何在android中实现直播
【发布时间】:2017-01-17 08:10:56
【问题描述】:

我想在我的 Android 应用中创建直播功能。我从这个链接得到了一个例子:

https://github.com/youtube/yt-watchme

运行此代码时出现错误,“libffmpeg”无法加载。为了解决这个问题,我下载了预建的“libffmpeg”并添加到我的项目中。之后我遇到了问题:

java.lang.UnsatisfiedLinkError: dlopen failed: file offset 
for the library "/data/app/com.google.android.apps.watchme-2/
lib/arm/libffmpeg.so" >= file size: 0 >= 0.

我该如何解决这个问题。

【问题讨论】:

  • 嗨,斯文,感谢您的回复。当我运行 yt-watchme 示例项目时,我遇到了上述问题。在那个项目中,我在 lib 目录下添加了 'libffmpeg.so' 并构建了 gradle 我添加了这些代码: sourceSets { main { jniLibs.srcDirs = ['libs'] jni.srcDirs = [] } }

标签: android youtube-api live-streaming


【解决方案1】:

你检查过这个documentation吗? YouTube Live Streaming API 可让您在 YouTube 上创建、更新和管理直播活动。使用 API,您可以安排事件(广播)并将它们与代表实际广播内容的视频流相关联。

对于您的错误:dlopen failed: file offset for the library,您可以查看此related SO thread。确保您已正确下载并复制文件。

您还可以查看使用了Google APIs Client Library for JavaJava Code Samples,该Google APIs Client Library for Java 可用于YouTube Live Streaming API。

【讨论】:

    猜你喜欢
    • 2011-08-01
    • 2022-01-13
    • 2022-09-30
    • 2010-10-11
    • 2012-03-26
    • 2019-12-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多