development based on ffmpeg source code