async Audio/Video

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

async Audio/Video

Matthias Rolf
Hi all,

I'm using gstreamer for realizing an audio/video-synchrony-detection
algorithm and having the following problem:  using the following
test-script causes audio and video to go out of sync:

gst-launch-0.10 \
    filesrc location=$1 ! queue ! decodebin2 name=dec \
    dec. ! queue ! identity check-perfect=true ! \
       videorate ! ffmpegcolorspace ! ximagesink \
    dec. ! queue ! audiorate ! \
       audioconvert ! alsasink \
    --gst-debug=videorate:3,identity:4,audiorate:4

The impact highly depends on the concrete video, but I can reproduce it
across several test-videos. You can hear/see the asynchrony and it is
reflected in my computation results from my orignal (very large)
pipeline (thats my pain-point!).

My observation is: when removing the queue between filesrc and decodebin
both streams get synchronized again. Though seeming to solve the problem
in this special case that knowledge is not sufficient to me, since the
reliability of my results depends on whether this effect can also impact
in other situations.

Note: audiorate and videorate are necessary for my purpose since I have
to compute precise timing relations between audio and video and thus
need an absolute high-quality streams.

Does anybody have an explanation or at least a hypothesis for that
phenomenon?

Thanks in advance,
Matthias

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: async Audio/Video

Stefan Sauer
hi,


Quoting Matthias Rolf <[hidden email]>:

> Hi all,
>
> I'm using gstreamer for realizing an audio/video-synchrony-detection
> algorithm and having the following problem:  using the following
> test-script causes audio and video to go out of sync:

What format are the files in. A demuxer pipleine is prefferably  
working so that the demuxer pulls from its source (the filesrc) and  
pushes on the decoders. Adding a queue after filesrc forces the  
demuxer into streaming mode (push based parsing). Thats separate  
codepath in the demxer and maybe you see a bug there.

Stefan

>
> gst-launch-0.10 \
>     filesrc location=$1 ! queue ! decodebin2 name=dec \
>     dec. ! queue ! identity check-perfect=true ! \
>        videorate ! ffmpegcolorspace ! ximagesink \
>     dec. ! queue ! audiorate ! \
>        audioconvert ! alsasink \
>     --gst-debug=videorate:3,identity:4,audiorate:4
>
> The impact highly depends on the concrete video, but I can reproduce it
> across several test-videos. You can hear/see the asynchrony and it is
> reflected in my computation results from my orignal (very large)
> pipeline (thats my pain-point!).
>
> My observation is: when removing the queue between filesrc and decodebin
> both streams get synchronized again. Though seeming to solve the problem
> in this special case that knowledge is not sufficient to me, since the
> reliability of my results depends on whether this effect can also impact
> in other situations.
>
> Note: audiorate and videorate are necessary for my purpose since I have
> to compute precise timing relations between audio and video and thus
> need an absolute high-quality streams.
>
> Does anybody have an explanation or at least a hypothesis for that
> phenomenon?
>
> Thanks in advance,
> Matthias
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: async Audio/Video

Matthias Rolf

> What format are the files in.

The files are AVI containing
Video: MPEG 4
Audio: MPEG 1 Layer 2

> A demuxer pipleine is prefferably working
> so that the demuxer pulls from its source (the filesrc) and pushes on
> the decoders. Adding a queue after filesrc forces the demuxer into
> streaming mode (push based parsing).

The decodebin choses avidemux as demuxer. I'm not able to test
ffdemux_avi instead (manually chosen), as it reports:
> gstffmpegdemux.c(1375): gst_ffmpegdemux_sink_activate_push (): /pipeline0/demux:
> failed to activate sinkpad in pull mode, push mode not implemented yet

Matthias

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel