Writing an mp4 video in java [closed]

asked 2018-08-18 15:46:58 -0600

sirp gravatar image

Hi everyone, I'm trying to create a mp4 video in java with OpenCV 3.4.2

the next lines will create an empty file, no errors.

VideoWriter vw = new VideoWriter("vid.mp4", VideoWriter.fourcc('M', 'P', 'G', '4'), 1, temp.size()); vw.write(temp);

(temp is a Mat object)

can someone help?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sirp
close date 2018-08-19 09:23:02.170010


if you're on windows, make sure, opencv_ffmpeg_64.dll is on the PATH. (or next to your app).

berak gravatar imageberak ( 2018-08-18 23:21:25 -0600 )edit

Thanks berak, I decided to use jcodec instead of openCV

sirp gravatar imagesirp ( 2018-08-19 09:22:46 -0600 )edit