Ask Your Question
0

How to encode a H264 video on Windows?

asked 2016-10-11 16:52:30 -0600

AssemblerX86 gravatar image

updated 2016-10-11 16:53:01 -0600

Hi,

I am trying to encode a video using X264 encoder, but I keep getting "Could not find encoder for codec id 28: Encoder not found" error.

I have tried CV_FOURCC('X', '2', '6', '4'), CV_FOURCC('H', '2', '6', '4') and CV_FOURCC('A', 'V', 'C', '1') all didn't work.

Tried to install VFW, didn't work too. I have "opencv_ffmpeg2413.dll" included in the same directory (Tried removing it after installing VFW.)

I am building using VC12.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
1

answered 2016-10-11 19:12:15 -0600

Tetragramm gravatar image

You need to be using OpenH264 as described HERE. The FOURCC is H264 and the filetype is .mp4

edit flag offensive delete link more

Comments

It worked thanks :) But just a note that the latest supported OpenH264 is 1.5.0 and not 1.6.0.

AssemblerX86 gravatar imageAssemblerX86 ( 2016-10-12 05:53:06 -0600 )edit

After I have done a "make clean" and "make" and relinked libraries, I am getting the same "Could not find encoder for codec id 28: Encoder not found" error again, any idea why?

AssemblerX86 gravatar imageAssemblerX86 ( 2016-10-12 12:42:51 -0600 )edit

You have added the dll to the environment variables as in the linked issue?

Tetragramm gravatar imageTetragramm ( 2016-10-12 17:31:31 -0600 )edit

Yes, I have tried adding the path to the three Environment Variables mentioned in that issue.

AssemblerX86 gravatar imageAssemblerX86 ( 2016-10-12 22:16:24 -0600 )edit

Not just the path, the full file name. You may also want to try 1.4.0 That's what I'm using. I assume 1.5 would work as mentioned, but I haven't tried it.

Tetragramm gravatar imageTetragramm ( 2016-10-12 22:55:56 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-10-11 16:52:30 -0600

Seen: 10,289 times

Last updated: Oct 11 '16