[gst-devel] Problem using gnlcomposition
Edward Hervey
bilboed at gmail.com
Fri Mar 26 09:33:42 CET 2010
On Thu, 2010-03-25 at 23:30 +0530, Hardeep Singh wrote:
> Hi,
>
>
> Please see reply below.
>
[...]
> Hi,
>
> Thanks for your reply.
>
> I did the changes mentioned below, but the problem remains in writing
> the encoded file, however i can see the merged video on screen using
> xvimagesink plugin.
Perfect, that means your code is fine from a gnonlin point of view.
The problem you're facing is that most elements don't know how to
handle segments. GstBaseSink (and any implementations like xvimagesink)
*do* know how to handle that properly. Basically the encoder is choking
on that.
You can solve that by inserting just after your gnlcomposition a
identity element with the 'single-segment' property set to True. This
will effectively:
* Consume all incoming segments and only output one
* Change the timestamps of the buffers to running time, making them
appear as a continuous stream of data.
That should solve your issues.
Edward
>
> Changes:
> 1) Kept duration and media-duration to same i.e. 3 secs.
> 2) Introduced a gap of 1 sec in ending of first stream and start of
> second stream. Thus second stream now starts at 4 sec. ( also tried with 3 sec)
> 3) Cleaned up the caps filter.
> 4) Commented the property setting code, so as to let them use the
> default priority. Although that would be same too. ( also tried with
> specifying same priority)
>
> Observations:
> 1) If I replace the ffmpeg encoding/writing to file with xvimage sink
> then the merging of video works It seems like the problem is with
> encoding the resulting stream.
> 2) Even in this case introduction of Gap of 1 sec or more, between the
> start time of the streams, does not appear as a black( or some other
> default image). I am not sure if this is even the expected behavior as
> per design.
>
More information about the gstreamer-devel
mailing list