Repository: opencv
Issue: make VideoWriter::open() print out all appropriate fourcc codes
Labels: feature,priority: low,category: videoio

<!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).

Please:

* Read the documentation to test with the latest developer build.
* Check if other person has already created the same issue to avoid duplicates. You can comment on it if there already is an issue.
* Try to be as detailed as possible in your report.
* Report only one problem per created issue.


This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->

##### System information (version)
<!-- Example
- OpenCV => 3.4.0
- Operating System / Platform =>
- Compiler => Visual Studio 2015
-->

- OpenCV =>  3.4.0
- Operating System / Platform => all
- Compiler => all

##### Detailed description

<!-- your description -->

Figuring out what fourcc codes one can use is a pain.
If would be great is VideoWriter::open could return all the possible codes or at least print them them out.

A very simple way would be to print the codes to stdout if a fourcc ==  -1 is given/

##### Steps to reproduce

The change would seem to be in cap_ffmpeg_impl.hpp  ( CvVideoWrite_FFMPEG::open )
````
1914d1913
< 
1921,1959d1919
<     // need to define fallback_tags earlier
<             const struct AVCodecTag * fallback_tags[] = {
< #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(54, 1, 0)
< // APIchanges:
< // 2012-01-31 - dd6d3b0 - lavf 54.01.0
< //   Add avformat_get_riff_video_tags() and avformat_get_riff_audio_tags().
<                 avformat_get_riff_video_tags(),
< #endif
< #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(55, 25, 100) && defined LIBAVFORMAT_VERSION_MICRO && LIBAVFORMAT_VERSION_MICRO >= 100
< // APIchanges: ffmpeg only
< // 2014-01-19 - 1a193c4 - lavf 55.25.100 - avformat.h
< //   Add avformat_get_mov_video_tags() and avformat_get_mov_audio_tags().
<                 avformat_get_mov_video_tags(),
< #endif
<                 codec_bmp_tags, // fallback for avformat < 54.1
<                 NULL };
< 
<     if (fourcc==-1 || fourcc == CV_FOURCC('#','#','#','#')){
<       const AVCodecTag *const *chk_tags = fallback_tags;
<       std::string tag_type = "fallback";
<       if (fmt && fmt->codec_tag){
< 	chk_tags = fmt->codec_tag;
< 	tag_type = "extension based";
<       }
<       int i;
<       fflush(stdout);
<       for (i = 0; chk_tags && chk_tags[i]; i++) {
< 	const AVCodecTag *tags = chk_tags[i];
< 	while(tags->id != AV_CODEC_ID_NONE){
< 	  fprintf(stdout,"%s: codec_id=%x fourc=%c%c%c%c\n",
< 		  tag_type.c_str(),tags->id,
< 		  CV_TAG_TO_PRINTABLE_CHAR4(tags->tag));
< 	  tags++;
< 	}
<       }
<       fflush(stdout);
<       return false;
<     }
<     
1978a1938,1952
>         const struct AVCodecTag * fallback_tags[] = {
> #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(54, 1, 0)
> // APIchanges:
> // 2012-01-31 - dd6d3b0 - lavf 54.01.0
> //   Add avformat_get_riff_video_tags() and avformat_get_riff_audio_tags().
>                 avformat_get_riff_video_tags(),
> #endif
> #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(55, 25, 100) && defined LIBAVFORMAT_VERSION_MICRO && LIBAVFORMAT_VERSION_MICRO >= 100
> // APIchanges: ffmpeg only
> // 2014-01-19 - 1a193c4 - lavf 55.25.100 - avformat.h
> //   Add avformat_get_mov_video_tags() and avformat_get_mov_audio_tags().
>                 avformat_get_mov_video_tags(),
> #endif
>                 codec_bmp_tags, // fallback for avformat < 54.1
>                 NULL };

````