[gst-devel] Problems with my video source and avimux

Jonne Mäkinen jonnemakin at gmail.com
Tue Oct 21 15:53:14 CEST 2008


I tried the queue and it didn't help.
I'm wondering if my timestamping is correct, this is the part of the code
that does the timestamping:

_____________________________________________________________________________________
>From the source's create function

// the newBuffer.timestamp is a 64bit integer that comes from a non-GST
datasource that encodes the video
timestamp = newBuffer.timestamp;

// the timestampoffset is the difference between the clocks of the non-GST
datasource and the GST element
// so this adjust the external timestamp to match with the GST element time
timestamp = timestamp + src->timestampOffset;

GST_BUFFER_TIMESTAMP(outbuf) = timestamp;

// duration is set as 1000000000 / fps (15)
GST_BUFFER_DURATION(outbuf) = src->duration;

// n_frames contains the amount of frames sent so far
GST_BUFFER_OFFSET(outbuf) = src->n_frames;
src->n_frames = src->n_frames++;
GST_BUFFER_OFFSET_END(outbuf) = src->n_frames;
__________________________________________________________________


So, any more ideas on what might be wrong?




- Jonne



On Thu, Oct 16, 2008 at 4:12 PM, sudarshan bisht
<bisht.sudarshan at gmail.com>wrote:

> Hi
>
>     Insert a queue in between src and avimux and try .
>
> On Thu, Oct 16, 2008 at 6:10 PM, Jonne Mäkinen <jonnemakin at gmail.com>wrote:
>
>> Hello
>> I'm having a problem when using my own videosource with the avimux and
>> filesink. For some reason the avi that gets created is broken.
>> My videosource inputs MPEG4 video, one frame per buffer. And I'm not using
>> any audio in the pipeline.
>> If I do videotestsrc -> avimux -> filesink everything works like it should
>> work
>> But if I do this MPEG4src -> avimux -> filesink , two things can happen:
>> If I abort the pipeline without letting it finish correctly, then an AVI
>> file gets created and I can play the video with e.g. VLC player. However the
>> fps of the video
>> isn't correct (it should be 15 frames per second but the playback speed is
>> almost double of that).
>> If I don't abort the pipeline and let the file get finished (setting
>> num-buffers of the source element to something like 100 or 300), then the
>> avi file that gets created cannot be opened with any video player.
>> So I'm wondering if anyone has any ideas what might be causing the
>> corruption of the AVI file. What kind of requirements are expected from the
>> video source for it to be able to work with avimux?
>>
>> Any help is greatly appreciated
>>
>>
>> - Jonne Mäkinen
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>>
>>
>
>
> --
> Regards,
>
> Sudarshan Bisht
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20081021/ef719097/attachment.htm>


More information about the gstreamer-devel mailing list