Ubuntu 21.04 and several versions before.
The video creation does work, the error message seems to be wrongly reported. Can someone point me in the right direction to get this fixed?
FFMPEG: tag 0x39307076/‘vp09’ is not supported with codec id 167 and format 'webm
also
FFMPEG: tag 0x39307076/‘vp08’ is not supported with codec id 167 and format 'webm
Last time I looked, this is not OpenCV’s bug reporting service. About that, see About - OpenCV
But if this were, yours would be the worst bug report.
You don’t even mention OpenCV, not to mention what you do with it, in what environment and configuration etc , to get that error.
quite simply you appear to be asking for the wrong fourccs . all those error messages come from ffmpeg itself. so go and complain to ffmpeg and see how well that goes. they’re as used to your kind as we are.
opened 05:32PM - 22 Nov 21 UTC
category: videoio
RFC
##### System information (version)
- OpenCV => 4.5.4
- Operating System / Plat… form => Windows 64 Bit
- Compiler => Visual Studio 2019
##### Detailed description
If a codec has a three letter code returned by `avcodec_get_name()` and no `codec tag`, such as VP8 (AV_CODEC_ID_VP8), VP9 (AV_CODEC_ID_VP8) and AV1 (AV_CODEC_ID_AV1) then `VideoCapture::get(CAP_PROP_FOURCC)` returns `codec_tag` which for these three codecs results in a zero fourcc code.
Alternatively if `avcodec_get_name()` returns a 5 letter code such as MPEG4 (AV_CODEC_ID_MPEG4) then it gets truncated. For example if `avcodec_get_name()` returns MPEG4 (AV_CODEC_ID_MPEG4) the returned fourcc is truncated to the MPEG (MPEG-1).
I am not sure but I assume that these cases may generalize to all <4 and >4 letter codes.
I could see an easy way to fix this for <4 with zero padding although 0VP9 is not the same as VP09 but I am not sure what should be done for >4 letter codecs without a conversion table, mpeg4 should probably be mp4v?
This is confusing for example if a video file is written in windows by VideoWriter() using the fourcc VideoWriter::fourcc('m', 'p', '4', 'v') (MPEG-4), because openeing that file with VideoCapture() and then calling VideoCapture::get(CAP_PROP_FOURCC) returns MPEG wrongly indicating the file is MPEG-1.
##### Steps to reproduce
Open a [vp8](https://test-videos.co.uk/bigbuckbunny/webm-vp8)/[vp9](https://test-videos.co.uk/bigbuckbunny/webm-vp9)/av1 file or one written by `VideoWriter()` on windows with fourcc 'mp4v' and call `VideoCapture::get(CAP_PROP_FOURCC)`.
##### Issue submission checklist
- [ ] I report the issue, it's not a question
<!--
OpenCV team works with forum.opencv.org, Stack Overflow and other communities
to discuss problems. Tickets with question without real issue statement will be
closed.
-->
- [ ] I checked the problem with documentation, FAQ, open issues,
forum.opencv.org, Stack Overflow, etc and have not found solution
<!--
Places to check:
* OpenCV documentation: https://docs.opencv.org
* FAQ page: https://github.com/opencv/opencv/wiki/FAQ
* OpenCV forum: https://forum.opencv.org
* OpenCV issue tracker: https://github.com/opencv/opencv/issues?q=is%3Aissue
* Stack Overflow branch: https://stackoverflow.com/questions/tagged/opencv
-->
- [ ] I updated to latest OpenCV version and the issue is still there
<!--
master branch for OpenCV 4.x and 3.4 branch for OpenCV 3.x releases.
OpenCV team supports only latest release for each branch.
The ticket is closed, if the problem is not reproduced with modern version.
-->
- [ ] There is reproducer code and related data files: videos, images, onnx, etc
<!--
The best reproducer -- test case for OpenCV that we can add to the library.
Recommendations for media files and binary files:
* Try to reproduce the issue with images and videos in opencv_extra repository
to reduce attachment size
* Use PNG for images, if you report some CV related bug, but not image reader
issue
* Attach the image as archive to the ticket, if you report some reader issue.
Image hosting services compress images and it breaks the repro code.
* Provide ONNX file for some public model or ONNX file with with random weights,
if you report ONNX parsing or handling issue. Architecture details diagram
from netron tool can be very useful too. See https://lutzroeder.github.io/netron/
-->
Sorry,
Wrong place to ask for a bug fix.