Join Two video files and one audio file into one mkv file

Tim-Philipp Müller t.i.m at zen.co.uk
Wed Aug 14 10:30:36 PDT 2013


On Wed, 2013-08-14 at 11:44 +0200, Marcin Kolny wrote:

Hi,

> I'm going to join my video and audio files into one mkv file. My
> pipeline looks like this:
> 
> filesrc -> oggdemux -> theoraparse->
>                                                       \
>                                                        | ->
> matroskamux -> filesink
>                                                       /
> filesrc -> mad ------------------------------
> ->
> 
> My mp3 file is much longer than video files, and I'm going to play two
> video files, the second after the first one, with 3-sec break.
> 
> So I'm going to obtain output shown below:
> 
>                                 file1.mp3
> audio stream:
> --------------------------------------------------------------------
>                     video1.ogg                        video2.ogg
> video stream: ------------- [ 3 sec. nothing ] --------------
> [nothing]
> 
> How can I change file source of a video stream, and wait between
> video1 and video2?
> I'm using C-api, and I can create queries/capture messages/add probes
> etc.

I think you might have to re-encode the theora video, so that you get
one single continuous stream with one set of stream headers.
Theora-in-matroska doesn't really support jumping onto another stream in
the middle of the file.

ges-launch / gst-editing-services might be able to help with the big
picture stuff (but for ges you'll need git / latest 1.1.x if you're
using 1.x [which you should use]).

Cheers
 -Tim




More information about the gstreamer-devel mailing list