From 68968eda8dffb4ceedc46088c7740f04f585acfd Mon Sep 17 00:00:00 2001 From: Kumataro Date: Tue, 1 Aug 2023 18:56:20 +0900 Subject: [PATCH] videoio: doc: add odd width or height limitation for FFMPEG --- modules/videoio/include/opencv2/videoio.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/videoio/include/opencv2/videoio.hpp b/modules/videoio/include/opencv2/videoio.hpp index dbed243b56..eb2e803b3c 100644 --- a/modules/videoio/include/opencv2/videoio.hpp +++ b/modules/videoio/include/opencv2/videoio.hpp @@ -1036,6 +1036,9 @@ public: - Most codecs are lossy. If you want lossless video file you need to use a lossless codecs (eg. FFMPEG FFV1, Huffman HFYU, Lagarith LAGS, etc...) - If FFMPEG is enabled, using `codec=0; fps=0;` you can create an uncompressed (raw) video file. + - If FFMPEG is used, we allow frames of odd width or height, but in this case we truncate + the rightmost column/the bottom row. Probably, this should be handled more elegantly, + but some internal functions inside FFMPEG swscale require even width/height. */ CV_WRAP VideoWriter(const String& filename, int fourcc, double fps, Size frameSize, bool isColor = true);