Android RTSP直播流问题 [英] Android RTSP Live Streaming Issue

查看:350
本文介绍了Android RTSP直播流问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Android视频直播流问题 我正在使用Vitamio库. RTSP流式传输运行良好,现在我想在本地SD卡中记录该RTSP实时流式传输.请帮忙!!!

Android Video Live Streaming Problem I am using Vitamio library. The RTSP streaming is working well, Now I want to record that RTSP live streaming in my SD card locally. please help !!!

Or can i use media recorder to record RTSP live streaming ?

推荐答案

Media Recorder并不是录制RTSP视频的好方法,我已经使用FFMPEG库在SD卡中本地录制了RTSP录制内容. 步骤.

Media Recorder is not the good way to record RTSP video, I have used the FFMPEG library to record RTSP recording locally in sd card. Steps to do this.

  1. 从实时流中捕获或解码RAW帧,并将其传递到ffmpeg,然后以.h264格式保存到sdcard.

  1. Capture or decode the RAW frames from live stream and pass them to ffmpeg and save them to sdcard in .h264 format.

然后再次选择.h264原始文件,并使用ffmpeg对其进行解码,然后将扩展名为.mp4的文件保存到sd卡中.

Then again pick .h264 raw file and decode the file using ffmpeg, and save the file with extention .mp4 into sd card.

以编程方式删除.h264文件,并仅保存.mp4或所需的格式.

delete the .h264 file programmatically, and save only .mp4, or which format you want.

尝试播放.mp4.

我可以将长达5mb的视频等长时间录制到我的SD卡中.

I am able to record long time such as upto 5mb video's into my sd card.

这篇关于Android RTSP直播流问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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