[ffmpeg] Improve version check and call it from hls (Fixes #4377)