Problems with my video source and avimux

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with my video source and avimux

Jonne Mäkinen
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems with my video source and avimux

Sudarshan Bisht
Hi
   
    Insert a queue in between src and avimux and try .

On Thu, Oct 16, 2008 at 6:10 PM, Jonne Mäkinen <[hidden email]> 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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Problems With Feeding gstpipeline with gstapp spurce

Ankur Sharma-2
In reply to this post by Jonne Mäkinen

 

Hello,

 

I am facing a problem while feeding a gstreamer pipeline using gstappsrc. The details are:

 

  1. I create gstbuffers and sub-buffers to collect TS packets, read from another application (through a Shared Memory) and then I push these buffers to the gstappsrc element.
  2. My pipeline consists of ffmpegdec and an imagesink.
  3. I calculate the buffer_timestamps using PTS values and stamp the outgoing buffers.

 

The strange problem I face is that if I feed PES packet with a one byte wrong start_offset, then the pipeline throws error messages (using GST_DEBUG) but it PLAYS the video. If however, I give the correct PES packets start, the pipeline does not throw any errors, but cant play the file.

 

It would be great if some expert could give me a hint based on this observation. How should my external application sync with the “state” of the gstreamer pipeline and feed it with data buffers.

 

Regards

Ankur

 

**************** CAUTION - Disclaimer *****************
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are not 
to copy, disclose, or distribute this e-mail or its contents to any other person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has taken 
every reasonable precaution to minimize this risk, but is not liable for any damage 
you may sustain as a result of any virus in this e-mail. You should carry out your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS******** End of Disclaimer ********INFOSYS***

-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems with my video source and avimux

Jonne Mäkinen
In reply to this post by Sudarshan Bisht
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 <[hidden email]> wrote:
Hi
   
    Insert a queue in between src and avimux and try .

On Thu, Oct 16, 2008 at 6:10 PM, Jonne Mäkinen <[hidden email]> 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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel



-------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel