抱歉,此视频不适用于在 Http 流式传输 android 中流式传输到此设备 [英] Sorry, this video is not valid for streaming to this device in Http streaming android

查看:33
本文介绍了抱歉,此视频不适用于在 Http 流式传输 android 中流式传输到此设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以成功地从 URL(服务器)流式传输一些视频,

但是其他人(我的视频到我的服务器)不是.

你可以在我的代码中看到(工作/不工作)我被这个问题困住了.抱歉,此视频无法流式传输到此设备"

You can see both in my code (Working/Not working) I'm on stuck with this problem. "Sorry, this video is not valid for streaming to this device"

以下代码:

String url = null;
    //      url = "rtsp://v5.cache5.c.youtube.com/CiILENy73wIaGQmC00ZlwwIDOxMYDSANFEgGUgZ2aWRlb3MM/0/0/0/video.3gp"; // Working
    //      url = "http://daily3gp.com/vids/747.3gp"; // Working
    url = "http://www.ooklnet.com/files/381/381489/video.mp4"; // Working
    //      url = "rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov"; // Working
    //      url = "http://dl.dropbox.com/u/80419/santa.mp4"; // Working

    //      url = "http://trekvn.hostoi.com/encode_normal.mp4"; // Not Working
    //      url = "http://trekvn.hostoi.com/output_encode_mp4_box.mp4"; // Not Working
    //      url = "http://www.ourserversite.com:14556/ingCloud/users/400010001/mp4_320p/e8d8535852a98c949640c5d618ac23d320131022174507.mp4"; // Not Working
    //      url = "http://trekvn.hostoi.com/mpeg_2_ts.ts"; // Not Working

    videoviewer.setVideoURI(Uri.parse(url));

    videoviewer.requestFocus();
    videoviewer.setKeepScreenOn(true);
    videoviewer.setOnErrorListener(this);
    videoviewer.setOnPreparedListener(this);

@Override
    public void onPrepared(MediaPlayer mp) {
           videoviewer.start()'
}

所有这些视频都可以在网站上播放,格式为 *.mp4(mpeg-4 第 10 部分),视频:.H264,音频:aac.

All of these video can play good on the site, have format *.mp4 (mpeg-4 part 10), Video : .H264, Audio : aac.

请告诉我为什么,以及如何修复它.

Please tell me why, and how to fix it.

p/s:三星 Galaxy Tab 7" - 2.2.1

p/s : Samsung Galaxy Tab 7" - 2.2.1

谢谢,

推荐答案

这是很多人遇到的问题,请确保您了解以下内容以解决问题.

This is the issue that many people met, ensure you understand following content to fix the issue.

通过我的经验和这个对不起, 无法播放此视频 - 将 mp4 流式传输到 android

终于找到原因和解决办法了:

Finally, I found the reason and the solution:

- 原因: 几乎*.mp4 文件是为开发专注于 iOS 而制作的,并且具有编码:H264 Main.而 Android 端只能流式传输 &播放具有编码的文件:H264 Baseline.

- Reason : Almost the *.mp4 file was produced for developing focus on iOS, and have the encoding : H264 Main. While Android side can only stream & play the files have the encoding : H264 Baseline.

- 解决方案:我们需要从编码 H264 Main 转换为 H264 Baseline(保证启用 Web 优化(移动 -moov 原子之前 -mdat) 功能)

- Solution : We need convert from the encoding H264 Main to H264 Baseline (guaranteed enabled Web Optimized (move -moov atom before -mdat) feature)

- 错误:

  • 抱歉,此视频无法流式传输到此设备.

抱歉,无法播放此视频.

HandBrake 工具是完成它的最简单、最便宜的方法.

HandBrake tool is the easiest and cheapest way to complete it.

谢谢,

p/s : 但是如果你使用这种方法,你需要将你的视频上传到服务器进行测试.

这篇关于抱歉,此视频不适用于在 Http 流式传输 android 中流式传输到此设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆