Implementation of Audio and Video Encapsulation Based on FFmpeg
In the VOD and live streaming system, encapsulating the video and audio stream into a container is necessary. Analyzes the decoding and encoding method to pack streams using FFmpeg, in order to solve high usage rate of memory and CPU, proposes a novel method of packing streams without decoding into MP4 container. Based on FFmpeg SDK, packs H.264 video streams and AAC audio streams into MP4 container without decoding. Experimental results show that this method reduces the usage rate of memory and CPU, suitable used in the VOD and live stream systems.