VideoWriter fails to open MP4 container (Bug #1536)


Added by Frankie Fong over 1 year ago. Updated 9 months ago.


Status:Cancelled Start date:
Priority:High Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:highgui-video
Target version:2.4.0
Affected version: Pull request:

Description

I have trouble to open MP4 file for writing using OpenCV 2.3.1 release. It seems to affect writing only. It is able to read MP4 file. And it seems specific to MP4 because I could write to AVI container with the same codec ('x','v','i','d').

Environment:
Windows XP 32-bit
VS2010 Express
Sample Program: modified version of starter_video.cpp (sample). Writing the input frames to output as is. The input is AVI HuffYUV.

The error message from 'ffmpeg'(?):
Output #0, mp4, to 'starter_video_out.mp4':
Stream #0.0: Video: mpeg4, yuv420p, 640x480, q=2-31, 19660 kb/s, 90k tbn, 30
tbc
[mp4 @ 01497020] Tag xvid/0x64697678 incompatible with output codec id '13'

I am attaching the modified file for your reference.


starter_video.cpp (3.1 kB) Frankie Fong, 2012-01-05 03:43 pm


History

Updated by Frankie Fong over 1 year ago

Also noticed that the problem appears on OpenCV 2.3.0. But only happens to 64-bit build (Win7). 32-bit build is fine.

Updated by Alexander Reshetnikov over 1 year ago

  • Status deleted (Open)

Updated by Alexander Shishkov over 1 year ago

  • Description changed from I have trouble to open MP4 file for writing using [[OpenCV]] 2.3.1 release. I... to I have trouble to open MP4 file for writing using OpenCV 2.3.1 release. It se... More

Updated by Alexander Shishkov about 1 year ago

  • Target version deleted ()

Updated by Alexander Shishkov about 1 year ago

  • Status set to Open

Updated by Alexander Shishkov about 1 year ago

  • Assignee deleted (Alexander Reshetnikov)

Updated by Alexander Shishkov about 1 year ago

  • Target version deleted ()

Updated by Alexander Reshetnikov about 1 year ago

  • Target version set to 2.4.0
  • Assignee set to Alexander Reshetnikov

Updated by Vadim Pisarevsky about 1 year ago

current ffmpeg implementation only allows to create .mp4 containers using H264 codec. Since H264 encoder support in ffmpeg is optional and requires optional external GPLed X264 encoder, we can only live with it. Use avi or mov or mkv container instead.

  • Status changed from Open to Cancelled
  • Assignee changed from Alexander Reshetnikov to Vadim Pisarevsky

Updated by Andrey Kamaev 9 months ago

  • Category changed from highgui-images to highgui-video

Also available in: Atom PDF