tutorial codes for FFmpeg