sohambannerjee8 / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

How to merge two video files using Javacv ? #227

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.How to merge two video files using Java-CV ?
2.
3.

What is the expected output? What do you see instead?

How to merge two video files using Java-CV ?

What version of the product are you using? On what operating system?
Latest version 

Please provide any additional information below.
i want to merge two files as a single files . it should contains the both video 
content. 

Original issue reported on code.google.com by itsrajes...@gmail.com on 2 Aug 2012 at 11:14

GoogleCodeExporter commented 8 years ago
Something like that should work:

        FrameGrabber grabber1 = new FFmpegFrameGrabber("input1.avi");
        grabber1.start();
        FrameGrabber grabber2 = new FFmpegFrameGrabber("input2.avi");
        grabber2.start();
        FrameRecorder recorder = new FFmpegFrameRecorder("output.avi", grabber1.getImageWidth(), grabber1.getImageHeight());
        recorder.start();
        Frame frame;
        while ((frame = grabber1.grabFrame()) != null) {
            recorder.record(frame);
        }
        while ((frame = grabber2.grabFrame()) != null) {
            recorder.record(frame);
        }
        recorder.stop();
        grabber2.stop(); 
        grabber1.stop(); 

Please post your questions on the mailing list next time if possible, this is 
not an issue with JavaCV

Original comment by samuel.a...@gmail.com on 2 Aug 2012 at 1:42

GoogleCodeExporter commented 8 years ago
Sure Samuel .. I will post it in mailing list .. Thanks for your valuable
reply.

Original comment by itsrajes...@gmail.com on 2 Aug 2012 at 2:22

GoogleCodeExporter commented 8 years ago
give following error

07-15 17:14:10.273: W/System.err(28790): 
com.googlecode.javacv.FrameRecorder$Exception: No audio output stream (Is 
audioChannels > 0 and has start() been called?)
07-15 17:14:10.273: W/System.err(28790):    at 
com.googlecode.javacv.FFmpegFrameRecorder.record(FFmpegFrameRecorder.java:729)
07-15 17:14:10.274: W/System.err(28790):    at 
com.googlecode.javacv.FrameRecorder.record(FrameRecorder.java:286)
07-15 17:14:10.274: W/System.err(28790):    at 
com.example.java_cv_s1.MainActivity.merge(MainActivity.java:67)
07-15 17:14:10.274: W/System.err(28790):    at 
com.example.java_cv_s1.MainActivity$mergeTask.doInBackground(MainActivity.java:3
5)
07-15 17:14:10.274: W/System.err(28790):    at 
com.example.java_cv_s1.MainActivity$mergeTask.doInBackground(MainActivity.java:1
)
07-15 17:14:10.274: W/System.err(28790):    at 
android.os.AsyncTask$2.call(AsyncTask.java:288)
07-15 17:14:10.275: W/System.err(28790):    at 
java.util.concurrent.FutureTask.run(FutureTask.java:237)
07-15 17:14:10.275: W/System.err(28790):    at 
android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
07-15 17:14:10.275: W/System.err(28790):    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
07-15 17:14:10.275: W/System.err(28790):    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
07-15 17:14:10.275: W/System.err(28790):    at 
java.lang.Thread.run(Thread.java:841)

Original comment by kalp9...@gmail.com on 15 Jul 2014 at 11:45

Attachments:

GoogleCodeExporter commented 8 years ago
I have same error :com.googlecode.javacv.FrameRecorder$Exception: No audio 
output stream (Is audioChannels > 0 and has start() been called?)
please help

Original comment by tonighto...@gmail.com on 22 Jul 2014 at 10:09

GoogleCodeExporter commented 8 years ago
Guys, please try the latest version of JavaCV, thank you.

Original comment by samuel.a...@gmail.com on 22 Jul 2014 at 10:36

GoogleCodeExporter commented 8 years ago
How can I combine more than 2 videos??

Original comment by amlan....@gmail.com on 26 Aug 2014 at 8:11

GoogleCodeExporter commented 8 years ago
I am also having the same error(com.googlecode.javacv.FrameRecorder$Exception: 
No audio output stream (Is audioChannels > 0 and has start()).I am using javacv 
version:0.9.1-SNAPSHOT.can you please help me.thanks

Original comment by rams.e...@gmail.com on 12 Nov 2014 at 4:04

GoogleCodeExporter commented 8 years ago
Same error for me. Has someone found the solution? Thanks.

Original comment by maribel.maisano@gmail.com on 19 Jan 2015 at 8:56