-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trim video #117
Comments
It's not exactly the same thing, but we can do something like this: FrameGrabber grabber = new FFmpegFrameGrabber("input.avi");
grabber.start();
grabber.setTimestamp((1 * 60 + 30) * 1000000);
FrameRecorder recorder = new FFmpegFrameRecorder("output.mp4");
recorder.setFrameRate(grabber.getFrameRate());
recorder.setSampleRate(grabber.getSampleRate());
recorder.start();
Frame frame;
while ((frame = grabber.grab()) != null && recorder.getTimestamp() < 20 * 1000000) {
recorder.record(frame);
}
recorder.stop();
grabber.stop(); |
-vcodec copy -acodec copy |
@pengliren That's correct. But we could provide something like |
@saudet ok, you provide grabPacket() and recordPacket() methods, I will try modifications. |
@saudet It can, but time is too long. |
Marking as a duplicate of #93 |
FYI, if the |
I want to trim video in Android like “ffmpeg -ss 0:1:30 -t 0:0:20 -i input.mp4 -vcodec copy -acodec copy output.mp4 ”,but the ffmpeg.h does not exist .
what should i do? Thank you
The text was updated successfully, but these errors were encountered: