Joining multiple video files!

1,793 views
Skip to first unread message

Pascha

unread,
Aug 7, 2009, 6:26:41 PM8/7/09
to gstreamer-java
Hi,

is it possible to merge/join multiple video files with gstreamer
framework?

Best regards,
Pascha

Tal Shalif

unread,
Aug 8, 2009, 4:48:23 AM8/8/09
to gstream...@googlegroups.com
Mixing multiple videos could probably be done with the 'videomixer' element. The fastest way to construct and try your pipelines is probably using the 'gst-launch' utility - do this before you write any Java code. Once you found a pipeline that works for you, copy it verbatim and launch from Java using the Pipeline.launch() method, after doing the necessary Java gstreamer initialization.

2009/8/8 Pascha <scha...@googlemail.com>

Pascha

unread,
Aug 8, 2009, 6:21:51 AM8/8/09
to gstreamer-java
Thanks.

But i am not quite sure, that "mixing" is the right way to solve my
problem, is it? I am trying to merge multiple video files in a
sequence like this:

1.ogg -> 2.ogg -> 3.ogg -> ... -> n.ogg = all.ogg

On Aug 8, 10:48 am, Tal Shalif <tsha...@gmail.com> wrote:
> Mixing multiple videos could probably be done with the 'videomixer' element.
> The fastest way to construct and try your pipelines is probably using the
> 'gst-launch' utility - do this before you write any Java code. Once you
> found a pipeline that works for you, copy it verbatim and launch from Java
> using the Pipeline.launch() method, after doing the necessary Java gstreamer
> initialization.
>
> 2009/8/8 Pascha <schaty...@googlemail.com>

Tal Shalif

unread,
Aug 8, 2009, 7:21:01 AM8/8/09
to gstream...@googlegroups.com
You will probably need to demux each ogg file, than mux all the various tracks back into the output ogg. See oggdemux, oggmux gstreamer elemens.

2009/8/8 Pascha <scha...@googlemail.com>

Pascha

unread,
Aug 8, 2009, 7:44:16 AM8/8/09
to gstreamer-java
My first approach is as follows:

gst-launch multifilesrc location="%02d.ogg" ! oggdemux ! theoradec !
theoraenc ! oggmux ! filesink location=output.ogg

but after the first file i've got a EOS message and the pipeline
stopped. So the output file looks like the first input file.

On Aug 8, 1:21 pm, Tal Shalif <tsha...@gmail.com> wrote:
> You will probably need to demux each ogg file, than mux all the various
> tracks back into the output ogg. See oggdemux, oggmux gstreamer elemens.
>
> 2009/8/8 Pascha <schaty...@googlemail.com>

Tal Shalif

unread,
Aug 8, 2009, 7:54:28 AM8/8/09
to gstream...@googlegroups.com
Are you trying to a: concatenate the files to play sequentially, b: mux them - so the user may select which video/audio to play, or c: merge video, so video from file2.ogg will be overlayed on top of the video from file1.ogg?

2009/8/8 Pascha <scha...@googlemail.com>

Pascha

unread,
Aug 8, 2009, 8:15:16 AM8/8/09
to gstreamer-java
a) i'am trying to concatenate the files ;)

On Aug 8, 1:54 pm, Tal Shalif <tsha...@gmail.com> wrote:
> Are you trying to a: concatenate the files to play sequentially, b: mux them
> - so the user may select which video/audio to play, or c: merge video, so
> video from file2.ogg will be overlayed on top of the video from file1.ogg?
> 2009/8/8 Pascha <schaty...@googlemail.com>

Pascha

unread,
Aug 9, 2009, 5:46:06 AM8/9/09
to gstreamer-java
any idea how i can do it? :/

Roberto Fagá

unread,
Aug 9, 2009, 10:48:37 PM8/9/09
to gstream...@googlegroups.com
I don't know if it works in gst-java, but take a look:

http://gnonlin.sourceforge.net/

I think it is what you want, right?

Roberto

Roberto Fagá

unread,
Aug 9, 2009, 10:59:32 PM8/9/09
to gstream...@googlegroups.com
Just to better understand:

http://www.jonobacon.org/2006/12/27/using-gnonlin-with-gstreamer-and-python/

A tutorial for python, but has the same idea to do in Java. Gnonlin is a plugin, so I think you can use like any other gst-element.

Roberto

2009/8/9 Roberto Fagá <rober...@gmail.com>

Pascha

unread,
Aug 10, 2009, 7:35:15 AM8/10/09
to gstreamer-java
Thanks, but afaik it's not possible to add sources to the
gnlcomposition, is it? :/

http://groups.google.com/group/gstreamer-java/browse_thread/thread/58a96d3dcb0ce3c1

On Aug 10, 4:59 am, Roberto Fagá <robertof...@gmail.com> wrote:
> Just to better understand:
>
> http://www.jonobacon.org/2006/12/27/using-gnonlin-with-gstreamer-and-...
>
> A tutorial for python, but has the same idea to do in Java. Gnonlin is a
> plugin, so I think you can use like any other gst-element.
>
> Roberto
>
> 2009/8/9 Roberto Fagá <robertof...@gmail.com>
>
>
>
> > I don't know if it works in gst-java, but take a look:
>
> >http://gnonlin.sourceforge.net/
>
> > I think it is what you want, right?
>
> > Roberto
>

Tal Shalif

unread,
Aug 10, 2009, 11:56:17 AM8/10/09
to gstream...@googlegroups.com
You may also want to ask on the main gstreamer IRC channel or mailing list. If they can suggest a pipeline that will achieve concatenation, it can be launched from inside gstreamer-java.

2009/8/10 Pascha <scha...@googlemail.com>
Reply all
Reply to author
Forward
0 new messages