views:

177

answers:

3

Hi All,

I am trying to concatenate two video files with the gnonlin components of the gstreamer.

The pipeline I am using is

gst-launch-0.10 gnlcomposition { gnlfilesource name="s1" location="/home/s1.mp4" start=0 duration=2000000000 media-start=0 media-duration=2000000000 gnlfilesource name="s2" location="/home/s2.mp4" start=2000000000 duration=2000000000 media-start=0 media-duration=2000000000 } ! queue ! videorate ! progressreport name="Merging Progress" ! ffmpegcolorspace ! ffenc_mpeg4 ! ffmux_mp4 ! filesink location="/home/merge.mp4"

As a result I am getting only the second file for the duration specified in the parameters. Tried several things and also searched on google but I could not figure out the problem with the above command. Can anyone point what i am doing wrong? Any other way of concatenating multiple files into one based on time is welcome too.

Thanks

A: 

I found out the problem was with frame timestamps created by the composition. Using an identity element with single-segment set to true, before the encoding fixed the problem.

Hardy
A: 

Could you post the final pipeline. I put the identity element in all places but didn't work. Also, I had problems reading mp4 files(It said This file contains no playable streams)

Jhon
Try it with another file. Check if you can normally play the file in vlc etc?
Hardy
A: 

I ended up doing this work in Python. Look here for details.

http://www.opensource-archive.org/showthread.php?t=178364

Hardy
Your link doesn't work
Oleg Sakharov