You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
} guys, please tell me what I'm doing wrong, I'm trying to convert these files to mp4 format, point to the errors, the user from the web application will convert his video file to mp4.
The text was updated successfully, but these errors were encountered:
Arman06061999
changed the title
конвертировать AVI, MOV, WMV в MP4
convert AVI, MOV, WMV в MP4
Feb 28, 2024
public File convertToMp4(File file) throws IOException, FrameGrabber.Exception, FrameRecorder.Exception {
FFmpegFrameGrabber grabber = new FFmpegFrameGrabber(file);
grabber.start();
FFmpegFrameRecorder recorder = new FFmpegFrameRecorder(file, 0);
recorder.setFormat("mp4");
recorder.setFrameRate(grabber.getFrameRate());
recorder.setSampleRate(grabber.getSampleRate());
recorder.setVideoCodec(grabber.getVideoCodec());
recorder.setAudioCodec(grabber.getAudioCodec());
recorder.start();
Frame frame;
while ((frame = grabber.grabFrame()) != null) {
recorder.record(frame);
}
recorder.stop();
recorder.release();
grabber.stop();
grabber.release();
The text was updated successfully, but these errors were encountered: