1

I want to create a mpeg4 stream whith the following specs:

Container mp4.mov m4v

Resolution 1920 X 1080

Codec h264 main profile 4.1

I am wondering what CV_FOURCC and file extension should I use?

Any help appreciated.

I am using C++

In general where can find the fourcc for any coded?

mans
  • 17,104
  • 45
  • 172
  • 321

2 Answers2

2

If you read a file, you don't need to specify any codec.

If you write to a file, I think you need to specify X264. Full list of FOURCC codes avaliable here.

vyndor
  • 368
  • 2
  • 13
  • I can only advice you to experiment with different FOURCC codes or try to save file with .mp4 extension. Also you can try AVC1, it's an apple format. – vyndor Jun 07 '13 at 16:35
2

Some of the common fourCC codes used with OpenCV are mentioned here http://opencv.willowgarage.com/wiki/documentation/cpp/highgui/VideoWriter

Here is a much longer list of the FOURCC codes of other codecs. http://www.fourcc.org/codecs.php

Since you want to use H264, you can use H264 or X264 as the FOURCC codes.

AnilMS
  • 83
  • 3