android-gpuimage-plus
android-gpuimage-plus copied to clipboard
How to Pause & Resume recording
Hi @wysaid I have tried to pause and resume video recording with the specified button "Pause", "Resume" but it doesn't seem to be working. I have checked issues regarding this #114 #199 Please help me out of this
Thanks in advance!
You can save the video clips and convert them into one video at last.
Is there any other way ... because if we are going to merge separate recordings through ffmpeg, it's taking too much time... can you suggest a solution.
Maybe you should modify the c++ code, and handle the pause function.
The PTS
value represents the current frame index. You can just make it frozen when you paused recording.
Okay let me try...Thanks for your time
Hi @wysaid, Please implement pause & resume functionality during video recording. I am stuck without theses. Please help. I will be very thankful to you..
I am currently using an alternative for merging recorded videos. I use Mp4Parser (https://github.com/sannies/mp4parser), which merges multiple clips to one mp4 video almost instantly. Just be careful that all the clips you try to merge are of the same resolution and frame rates.
Thanks for the suggestion and solution
Can you give me a working example? Because the mp4parser sample is not properly formatted, I am trying this example
File sdCard = Environment.getExternalStorageDirectory(); for (int i = 0; i < 100; i++) { try { FileInputStream fileInputStream = new FileInputStream(new File(sdCard, "Movies/urndeceapidIMDBtt04721814LKQIvbjJF72ODtC.uvu")); IsoFile isoFile = new IsoFile(fileInputStream.getChannel()); //isoFile = new IsoFile(Channels.newChannel(new FileInputStream(this.filePath))); //Path path = new Path(isoFile); XmlBox xmlBox = (XmlBox) Path.getPath(isoFile, "/moov/meta/xml "); String xml = xmlBox.getXml(); //System.err.println(xml; } catch (IOException e) { } }
Giving this error
Error:(119, 35) error: no suitable constructor found for IsoFile(FileChannel) constructor IsoFile.IsoFile(String) is not applicable (argument mismatch; FileChannel cannot be converted to String) constructor IsoFile.IsoFile(DataSource) is not applicable (argument mismatch; FileChannel cannot be converted to DataSource)
Hi @tsoumalis , I am eagerly waiting for your response.
I use the following code:
List<Movie> inMovies = new LinkedList<Movie>();
for(int i = 0; i < files.size(); i++) {
if (!files.get(i).exists())
continue;
Movie movie = MovieCreator.build(files.get(i).getAbsolutePath());
inMovies.add(movie);
}
List<Track> videoTracks = new LinkedList<Track>();
List<Track> audioTracks = new LinkedList<Track>();
for (Movie m : inMovies) {
for (Track t : m.getTracks()) {
if (t.getHandler().equals("soun")) {
audioTracks.add(t);
}
if (t.getHandler().equals("vide")) {
videoTracks.add(t);
}
}
}
Movie result = new Movie();
if (audioTracks.size() > 0) {
result.addTrack(new AppendTrack(audioTracks.toArray(new Track[audioTracks.size()])));
}
if (videoTracks.size() > 0) {
result.addTrack(new AppendTrack(videoTracks.toArray(new Track[videoTracks.size()])));
}
Container out = new DefaultMp4Builder().build(result);
String outputFilePath = Utilities.GetPath("output_append.mp4"); // Replace with the path of your output video
FileOutputStream fos = new FileOutputStream(new File(outputFilePath));
out.writeContainer(fos.getChannel());
fos.close();
The files variable is a List<File> of recorded mp4 video files
Thank you so much, let me try this.
Thank you so much it worked really fast, that's unexpected. Thank you so much once again
I'm doing the same but for me audio and video is not syn after merge(with mp4 parser) from the 2nd clip. Any suggestion @tsoumalis