chenry / monte

The Monte Media Library is a Java library for processing media data. Supported media formats include still images, video, audio and meta-data.
http://www.randelshofer.ch/monte/
7 stars 3 forks source link

how do I record mp4 video? #3

Open sumeetpanjabi opened 5 years ago

sumeetpanjabi commented 5 years ago

@chenry if you can help here?

Please provide settings to record mp4 video

ScreenRecorder  screenRecorder = new ScreenRecorder(gc,       new Format(MediaTypeKey, MediaType.FILE, MimeTypeKey, MIME_AVI),       new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,               CompressorNameKey, ENCODING_AVI_TECHSMITH_SCREEN_CAPTURE,               DepthKey, 24, FrameRateKey, Rational.valueOf(15),               QualityKey, 1.0f, KeyFrameIntervalKey, 15 * 60),               new Format(MediaTypeKey, MediaType.VIDEO, EncodingKey, "black",               FrameRateKey, Rational.valueOf(30)),null);

The above code gives me avi file

What changes I need to do to get mp4 file?

anhtester commented 2 years ago

Have you found the solution yet? I have the same question as you.