compatible with older FFmpeg