采用跨平台开源视音频解决方案FFMPEG,设计了一个处理x264编码的RTSP(Real Time Streaming Protocol)视频监控终端(接收、解码与播放).通过FFMPEG解码库裁剪与优化后交叉编译成单一库,来提升终端启动的加载速度.分析了H264视频数据的解码流程;实现了视频像素YUV转RGB并在android平台的显示,解码和显示采用多线程机制,进一步提升了系统性能.测试结果表明,此android流媒体接收端播放效果良好.
A video monitoring client(receiving,decoding,and playing)for receiving RTSP streams of H.264 video data was designed based on FFMPEG,which is an open-source cross-platform design for audio and video.By using the optimized FFMPEG and cross-compiling to a single dynamic library,the loading speed of mobile phone terminals was improved.We analyzed the decoding process of H264 video data.The YUV video pixels were converted into RGB and the display of the Android platform was realized.A multi-thread mechanism for decoding and displaying was used to enhance system performance.The experiment results show that the Android streaming media terminal has a good performance.