-1

I have a ip camera that gives 30 frames mjpeg per second. I want to record that frames to a mp4 file. I have already a library that record it to avi file but its not preferred. I try to convert video to mp4 after record it avi but its a bit slower.

Can you help please

KadirCanerErgun
  • 109
  • 1
  • 2
  • 9

1 Answers1

0

here you go https://github.com/bytedeco/javacv Android Sample: https://github.com/bytedeco/sample-projects/tree/master/JavaCV-android-example

FFmpegFrameGrabber g = new FFmpegFrameGrabber("textures/video/anim.mp4");
g.start();

for (int i = 0 ; i < 30 ; i++) {
    ImageIO.write(g.grab().getBufferedImage(), "png", new File("frame-dump/video-frame-" + System.currentTimeMillis() + ".png"));
}

g.stop();
aanshu
  • 1,602
  • 12
  • 13
  • There is a misunderstood i think. I have ip camera that gives 30 frames per second. I want to record it as MP4 file. Anyway thanks for your interest. – KadirCanerErgun Nov 05 '18 at 14:04