如何与And​​roid的媒体记录器输出的基本流? [英] How to output elementary streams with android media recorder?

查看:232
本文介绍了如何与And​​roid的媒体记录器输出的基本流?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要输出基本视频与媒体录像机在android系统与LIVE555流的目的流。从本质上讲,我希望得到媒体录像机输出 MPEG-4视频基本流文件(一个 .m4e 文件)或 H.264视频基本流文件(一个 0.264 文件)。是否有可能做到这一点与Android上的媒体记录?或有任何其他方式得到它的工作?

I want to output elementary video streams with media recorder in android for the purpose of streaming with live555. In essence, I want to get media recorder to output an MPEG-4 Video Elementary Stream file (an .m4e file) or an H.264 Video Elementary Stream file (an .264 file). Is it possible to do that with media recorder on android? Or is there any other way to get it work?

推荐答案

答案是,据我了解,这是不容易做到的,与 MediaRecorder 同时记录。你可以做到这一点没有太大的困难,使用的ffmpeg 一旦视频录制。其原因是,的MediaPlayer 不能记录为基本流。即使我们只记录视频,它将被放置在一个容器格式诸如3GPP或MP4。现在,像的ffmpeg 对这些文件的工作工具,他们需要的3GPP或MP4头信息必须在录制的文件present。但是,的MediaPlayer 将写那些标头后,才录制完成的文件。

The answer is, as I understand, that it is not easy to do that with MediaRecorder while recording. You may do that without much difficulty, using ffmpeg once the video is recorded. The reason is that, MediaPlayer cannot record as elementary streams. Even if we record video only, it will be put in a container format such as 3GPP or MP4. Now, for tools like ffmpeg to work on these files, they need the 3GPP or MP4 header information must be present on the recorded file. But, MediaPlayer will write those headers to the file only after it finished recording.

这篇关于如何与And​​roid的媒体记录器输出的基本流?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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