目录
官网
只有linux支持rtsp,代码:
if(ZLMEDIAKIT_LIBS)
add_definitions(-DBUILD_VIDEO_RTSP)
endif()
#if defined(BUILD_VIDEO_RTSP)
process_video_rtsp(&app_ctx, video_name);
#else
printf("rtsp no support\n");
#endif
Remark
- **RK3562 only supports h264 video stream **
- **rtsp video stream only available on the Linux system **
- The h264 name of the video stream input cannot be "out.h264", it will be overwritten.
ndk下载:
ffmpeg编译android平台-(ubuntu+ndkr16b+ffmpeg3.4.12)_android-ndk-r16b-CSDN博客
格式RK_FORMAT_YCbCr_420_SP:
origin = wrapbuffer_fd(fd, width, height, RK_FORMAT_YCbCr_420_SP, width_stride, height_stride);
src = wrapbuffer_fd(mpp_frame_fd, width, height, RK_FORMAT_YCbCr_420_SP, width_stride, height_stride);
android系统rtsp读流进行算法识别
设置权限
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="your.package.name">
<!-- 网络通信权限 -->
<uses-permission android:name="android.permission.INTERNET"/>
<!-- 检查网络状态权限 -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!-- 外部存储读写权限 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
</manifest>
依赖项:
ffmpeg
mpp
返回的yuv
FFmpegMPPDecoder/src/H264MPPDecoder.cpp at main · Done4/FFmpegMPPDecoder · GitHub