Yes, sure of course it's possible. Something like this, for example:
FFmpegFrameGrabber grabber = new FFmpegFrameGrabber("in.mp4");
grabber.start();
FrameRecorder recorder = new FFmpegFrameRecorder("out.mp4",
grabber.getImageWidth(), grabber.getImageHeight());
recorder.setFrameRate(grabber.getSampleRate());
recorder.setVideoCodec(AV_CODEC_ID_H264)
recorder.start();
Frame frame;
while ((frame = grabber.grabImage()) != null) {
recorder.record(frame); // or do what you need with each image
}
recorder.stop();
grabber.stop();
Samuel