audio playback shift in time

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

audio playback shift in time

franchan
Hello,

I have a custom mpegts demux. It gets data through the appsrc.
Into the appsrc I push the mpegts coming from an UDP socket.
This allows to do changing from UDP socket (other mpegts stream).

When this happens I change the playbin2 first from playing to ready,
Then back to playing again.

The mpegts demux, when it sees the state change,
removes its pads and waits for the new PAT/PMT information.
When the mpegts sees the new PAT PMT, it recreates the new pads.

Before the mpegts plugin sends out the PES data,
I first send a flush-start, flush-stop and the new_segment event downstream.
with the start and position time corresponding to the first PTS
detected in the new mpegts data.

For the first socket, when starting playback, all works fine: audio
and video are in sync.
When switching the socket the video starts playing fine after 1 to 2 seconds.

However the audio behaves odd: its playback is delayed
by the amount of time socket 1 has been playing.

I verified the PTS timestamps on the input (in mpegts demux) and
the output (audio/video decoders). These all seem fine;
audio/video data is alternately push forward into the sinks.

Still the alsa sink (or something else after the audio decoder)
introduces this strange delay.

Can somebody tell me what is going on and how to remove this delay for audio
and still having the video play back as well?

Thanks,
francis

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: audio playback shift in time

franchan
Hello gstreamer developers,

Nobody knows an answer to my earlier question?

Thanks,
francis


On Fri, Sep 4, 2009 at 5:23 PM, franchan <[hidden email]> wrote:

> Hello,
>
> I have a custom mpegts demux. It gets data through the appsrc.
> Into the appsrc I push the mpegts coming from an UDP socket.
> This allows to do changing from UDP socket (other mpegts stream).
>
> When this happens I change the playbin2 first from playing to ready,
> Then back to playing again.
>
> The mpegts demux, when it sees the state change,
> removes its pads and waits for the new PAT/PMT information.
> When the mpegts sees the new PAT PMT, it recreates the new pads.
>
> Before the mpegts plugin sends out the PES data,
> I first send a flush-start, flush-stop and the new_segment event downstream.
> with the start and position time corresponding to the first PTS
> detected in the new mpegts data.
>
> For the first socket, when starting playback, all works fine: audio
> and video are in sync.
> When switching the socket the video starts playing fine after 1 to 2 seconds.
>
> However the audio behaves odd: its playback is delayed
> by the amount of time socket 1 has been playing.
>
> I verified the PTS timestamps on the input (in mpegts demux) and
> the output (audio/video decoders). These all seem fine;
> audio/video data is alternately push forward into the sinks.
>
> Still the alsa sink (or something else after the audio decoder)
> introduces this strange delay.
>
> Can somebody tell me what is going on and how to remove this delay for audio
> and still having the video play back as well?
>
> Thanks,
> francis
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: audio playback shift in time

franchan
In reply to this post by franchan
Hello gstreamer developers,

Nobody knows an answer to my earlier question?


On Fri, Sep 4, 2009 at 5:23 PM, franchan <[hidden email]> wrote:

> Hello,
>
> I have a custom mpegts demux. It gets data through the appsrc.
> Into the appsrc I push the mpegts coming from an UDP socket.
> This allows to do changing from UDP socket (other mpegts stream).
>
> When this happens I change the playbin2 first from playing to ready,
> Then back to playing again.
>
> The mpegts demux, when it sees the state change,
> removes its pads and waits for the new PAT/PMT information.
> When the mpegts sees the new PAT PMT, it recreates the new pads.
>
> Before the mpegts plugin sends out the PES data,
> I first send a flush-start, flush-stop and the new_segment event downstream.
> with the start and position time corresponding to the first PTS
> detected in the new mpegts data.
>
> For the first socket, when starting playback, all works fine: audio
> and video are in sync.
> When switching the socket the video starts playing fine after 1 to 2 seconds.
>
> However the audio behaves odd: its playback is delayed
> by the amount of time socket 1 has been playing.
>
> I verified the PTS timestamps on the input (in mpegts demux) and
> the output (audio/video decoders). These all seem fine;
> audio/video data is alternately push forward into the sinks.
>
> Still the alsa sink (or something else after the audio decoder)
> introduces this strange delay.
>
> Can somebody tell me what is going on and how to remove this delay for audio
> and still having the video play back as well?

(sorry I forgot to include my question again ...)

Thanks,
francis

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: audio playback shift in time

Wim Taymans
In reply to this post by franchan
On Thu, 2009-09-10 at 07:46 +0200, franchan wrote:
> Hello gstreamer developers,
>
> Nobody knows an answer to my earlier question?

It could be this bug:

http://bugzilla.gnome.org/show_bug.cgi?id=594136

Wim

>
> Thanks,
> francis
>
>
> On Fri, Sep 4, 2009 at 5:23 PM, franchan <[hidden email]> wrote:
> > Hello,
> >
> > I have a custom mpegts demux. It gets data through the appsrc.
> > Into the appsrc I push the mpegts coming from an UDP socket.
> > This allows to do changing from UDP socket (other mpegts stream).
> >
> > When this happens I change the playbin2 first from playing to ready,
> > Then back to playing again.
> >
> > The mpegts demux, when it sees the state change,
> > removes its pads and waits for the new PAT/PMT information.
> > When the mpegts sees the new PAT PMT, it recreates the new pads.
> >
> > Before the mpegts plugin sends out the PES data,
> > I first send a flush-start, flush-stop and the new_segment event downstream.
> > with the start and position time corresponding to the first PTS
> > detected in the new mpegts data.
> >
> > For the first socket, when starting playback, all works fine: audio
> > and video are in sync.
> > When switching the socket the video starts playing fine after 1 to 2 seconds.
> >
> > However the audio behaves odd: its playback is delayed
> > by the amount of time socket 1 has been playing.
> >
> > I verified the PTS timestamps on the input (in mpegts demux) and
> > the output (audio/video decoders). These all seem fine;
> > audio/video data is alternately push forward into the sinks.
> >
> > Still the alsa sink (or something else after the audio decoder)
> > introduces this strange delay.
> >
> > Can somebody tell me what is going on and how to remove this delay for audio
> > and still having the video play back as well?
> >
> > Thanks,
> > francis
> >
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel