Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

First of all, this forum gives no support to OpenCV wrappers like EgmuCV (please see FAQ). Next time, please adress your question to the proper forum (probably here).

However, as I feel the question is not related with the wrapper and I think I can help a bit, here I go:

  1. Though as you may have seen in documentation the fourcc parameter is an integer, knowing exactly what codec belongs to each number might be difficult. What you should passed as the fourcc parameter (at least in regular OpenCV, guess it's maintained in EgmuCV) is the corresponding fourcc code such as CV_FOURCC('M', 'J', 'P', G'). This is explained in documentation, where you also have a link to a bunch of these codes. The pop-window only appears when choosing -1, so once you input a specific code it won't appear anymore.

  2. The "default" full frame/uncompressed codec is OS dependant (afaik, though I may be wrong). One way to determine what it is being used could be to use some external free software such as MediaInfo, which gives low-level information about videos, including the codec used. So, you can try to save a video with that full frame/uncompressed code, then retrieve the real name of codec using MediaInfo, and finally get rid of the -1 and substitute it for the corresponding fourcc code.

  3. If the "default" uncompressed codec is unsuitable for you, you can always install in your computer alternatives codecs to get the desired result. Everything installed in your computer will appear in the pop-up window when using -1 in the fourcc parameter. Also note that, obviously, you can't use a codec that is not present in your computer (VideoWriter won't write).

  4. About the default VideoWriter constructor with no parameters, it does not use any default codec because you need to use function open afterwards to initialize it, which does need the fourcc code (plus the filename, fps and size of the video).

Hope it helped a bit

First of all, this forum gives no support to OpenCV wrappers like EgmuCV (please see FAQ). Next time, please adress your question to the proper forum (probably here).

However, as I feel the question is not related with the wrapper and I think I can help a bit, here I go:

  1. Though as you may have seen in documentation the fourcc parameter is an integer, knowing exactly what codec belongs to each number might be difficult. What you should passed as the fourcc parameter (at least in regular OpenCV, guess it's maintained the same in EgmuCV) is the corresponding fourcc code such as CV_FOURCC('M', 'J', 'P', G'). This is explained in documentation, where you also have a link to a bunch of these codes. The pop-window only appears when choosing -1, so once you input a specific code it won't appear anymore.

  2. The "default" full frame/uncompressed codec is OS dependant (afaik, though I may be wrong). One way to determine what it is being used could be to use some external free software such as MediaInfo, which gives low-level information about videos, including the codec used. used codec. So, you can try to save a video with that full frame/uncompressed code, codec, then retrieve the real name of such codec using MediaInfo, and finally get rid of the -1 and substitute it for the corresponding fourcc code.

  3. If the "default" uncompressed codec is unsuitable for you, you can always install in your computer alternatives alternative codecs to get the desired result. Everything installed in your computer will appear in the pop-up window when using -1 in the fourcc parameter. Also note that, obviously, you can't use a codec that is not present in your computer (VideoWriter won't write).

  4. About the default VideoWriter constructor with no parameters, it does not use any default codec because you need to use function open afterwards to initialize it, which does need the fourcc code (plus the filename, fps and size of the video).

Hope it helped a bit