掌握AndroidBreakout unstreamable错误 [英] Getting unstreamable error with AndroidBreakout

查看:164
本文介绍了掌握AndroidBreakout unstreamable错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在探索在 http://bigflake.com/media$c的文档和示例$ CC /由法登和应用补丁的http://bigflake.com/media$c$cc/0001-Record-game-into-.mp4.patch到突围赛。不幸的是,在编译code后,我意识到这是行不通的,生产是不流化的视频文件。

I've been exploring the documentation and examples at http://bigflake.com/mediacodec/ by Fadden, and applied patch http://bigflake.com/mediacodec/0001-Record-game-into-.mp4.patch to the breakout game. Unfortunately, after compiling the code, I realized it doesn't work, producing video files that aren't streamable.

我看到了以下错误:
MP4文件将不会流化。

I see the following error: "The mp4 file will not be streamable."

据法登,这应该是通过检查mBufferInfo.flags固定(的http://stackoverflow.com/questions/23934087/non-streamable-video-file-created-with-mediamuxer),这是他在code已经完成,所以我完全茫然。没有任何人获得录像补丁工作?

According to Fadden, this should be fixed by checking the mBufferInfo.flags (http://stackoverflow.com/questions/23934087/non-streamable-video-file-created-with-mediamuxer), which is already done in his code, so I'm at a complete loss. Did anyone else get the video recording patch to work?

推荐答案

您所看到的警告只是一个警告,仅此而已。 MP4文件不是流化反正在大多数情况下,在这个意义上,你将能够通过一个管道通过笔试MP4并有另一端回放(除非你采取了不少额外的权谋,还是用支离破碎的MP4其中Android的MP4合并器通常不会写)。什么可流在这里的意思是,一旦你有最后的MP4文件,你可以开始玩回来,而不必寻求到文件的末尾(回放通过HTTP可以用HTTP字节范围请求例如做)。

The warning you're seeing is just a warning, nothing more. MP4 files aren't streamable anyway in most cases, in the sense that you would be able to pass the written MP4 over a pipe and have the other end play it back (unless you resort to a lot of extra trickery, or use fragmented MP4 which the android MP4 muxer doesn't write normally). What streamable means here is that once you have the final MP4 file, you can start playing it back without having to seek to the end of the file (which playback over HTTP can do e.g. with HTTP byte range requests).

要编写一个流化MP4,复用器试图猜测你的文件有多大,并且在写文件索引的文件的开头保留相应大的面积。如果该文件原来是较大所以索引不适合的保留区,它需要在文件的结尾被写入。请参见线506-519在<一个href=\"https://android.googlesource.com/platform/frameworks/av/+/lollipop-release/media/libstagefright/MPEG4Writer.cpp\" rel=\"nofollow\">https://android.googlesource.com/platform/frameworks/av/+/lollipop-release/media/libstagefright/MPEG4Writer.cpp关于这个猜测更多信息。基本上猜测似乎归结为:默认的最大_MOOV_BOX_SIZE值是基于比特率约3分钟的视频记录约3 Mbps的,因为统计数据也显示,大多数录制的视频将是不到3分钟。

To write a streamable MP4, the muxer tries to guess how large your file will be, and reserves a correspondingly large area at the start of the file to write the file index to. If the file turns out to be larger so the index doesn't fit into the reserved area, it needs to be written at the end of the file. See lines 506-519 in https://android.googlesource.com/platform/frameworks/av/+/lollipop-release/media/libstagefright/MPEG4Writer.cpp for more info about this guess. Basically the guess seems to boil down to: "The default MAX _MOOV_BOX_SIZE value is based on about 3 minute video recording with a bit rate about 3 Mbps, because statistics also show that most of the video captured are going to be less than 3 minutes."

如果您想打开这样的非流化MP4文件转换成流式传输的一个,你可以使用来自libav / ffmpeg的,刚刚重新排列的 QT-的fastStart 工具块在文件中。

If you want to turn such a non-streamable MP4 file into a streamable one, you can use the qt-faststart tool from libav/ffmpeg, which just reorders the blocks in the file.

这篇关于掌握AndroidBreakout unstreamable错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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