--- a/core/vidl/vidl_ffmpeg_ostream.cxx
+++ b/core/vidl/vidl_ffmpeg_ostream.cxx
@@ -26,8 +26,12 @@
 # include "vidl_ffmpeg_ostream_v2.txx"
 #elif LIBAVCODEC_BUILD < ((53<<16)+(0<<8)+0)  // before ver 53.0.0
 # include "vidl_ffmpeg_ostream_v3.txx"
+#elif LIBAVCODEC_BUILD < ((53<<16)+(24<<8)+0)  // before ver 53.24.0
+# include "vidl_ffmpeg_ostream_v4.txx"
+#elif LIBAVCODEC_BUILD < ((54<<16)+(23<<8)+100)  // before ver 54.23.100
+# include "vidl_ffmpeg_ostream_v0.9.txx"
 #else
-# include "vidl_ffmpeg_ostream_v4.txx"
+# include "vidl_ffmpeg_ostream_v0.11.txx"
 #endif
 
 #else // VIDL_HAS_FFMPEG