Sync problem with mpeg4

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

Sync problem with mpeg4

ogara
I have following pipeline:
gst-launch-0.10 filesrc location=my_movie.mp4 ! qtdemux name=t ! queue  ! my_mpeg4_dec ! my_video_sink  t. ! queue ! faad ! alsasink.
I am using the same pipeline to play mpeg4 and h264 videos (different decoder for h264). H264 works just fine but mpeg4 has sync problems. The video is as twice as fast as it should be. If I provide sync=false into my_mpeg4_dec line it all works fine but I do not want to do it this way. I just read in the documentation that:

"Sometimes it is a parser element the one that knows the time, for instance if a pipeline contains a
filesrc element connected to a MPEG decoder element, the former is the one that knows the time of
each sample, because the knowledge of when to play each sample is embedded in the MPEG format.
In this case this element will be regarded as the source element for this discussion."

I am not sure how does ALSA gets the time stamp when it cannot see mpeg4 directly? Is mpeg4 supposed to update global clock upstream so ALSA can see it or what?
Cheers,
Ogi
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Sync problem with mpeg4

Sudarshan Bisht
Timestamp of each video frame should be calculated on the basis of framerate in my_mpeg4_dec plugin and that timestamp has to be set to Gstbuffer which has one frame of video data and then Gstbuffer should be pushed to the sink element. You can print timestamp for each frame and check weather is it set correctly or not.


For more information about clocks , go through the following link;



On Sat, Apr 2, 2011 at 3:22 AM, Radivoje Jovanovic <[hidden email]> wrote:
I have following pipeline:
gst-launch-0.10 filesrc location=my_movie.mp4 ! qtdemux name=t ! queue  ! my_mpeg4_dec ! my_video_sink  t. ! queue ! faad ! alsasink.
I am using the same pipeline to play mpeg4 and h264 videos (different decoder for h264). H264 works just fine but mpeg4 has sync problems. The video is as twice as fast as it should be. If I provide sync=false into my_mpeg4_dec line it all works fine but I do not want to do it this way. I just read in the documentation that:

"Sometimes it is a parser element the one that knows the time, for instance if a pipeline contains a
filesrc element connected to a MPEG decoder element, the former is the one that knows the time of
each sample, because the knowledge of when to play each sample is embedded in the MPEG format.
In this case this element will be regarded as the source element for this discussion."

I am not sure how does ALSA gets the time stamp when it cannot see mpeg4 directly? Is mpeg4 supposed to update global clock upstream so ALSA can see it or what?
Cheers,
Ogi
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




--
Regards,

Sudarshan Bisht

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Sync problem with mpeg4

ogara
I understand all this, but how does the my_mpeg4_dec sends the timing data to alsasink?

On Sun, Apr 3, 2011 at 10:06 AM, sudarshan bisht <[hidden email]> wrote:
Timestamp of each video frame should be calculated on the basis of framerate in my_mpeg4_dec plugin and that timestamp has to be set to Gstbuffer which has one frame of video data and then Gstbuffer should be pushed to the sink element. You can print timestamp for each frame and check weather is it set correctly or not.


For more information about clocks , go through the following link;



On Sat, Apr 2, 2011 at 3:22 AM, Radivoje Jovanovic <[hidden email]> wrote:
I have following pipeline:
gst-launch-0.10 filesrc location=my_movie.mp4 ! qtdemux name=t ! queue  ! my_mpeg4_dec ! my_video_sink  t. ! queue ! faad ! alsasink.
I am using the same pipeline to play mpeg4 and h264 videos (different decoder for h264). H264 works just fine but mpeg4 has sync problems. The video is as twice as fast as it should be. If I provide sync=false into my_mpeg4_dec line it all works fine but I do not want to do it this way. I just read in the documentation that:

"Sometimes it is a parser element the one that knows the time, for instance if a pipeline contains a
filesrc element connected to a MPEG decoder element, the former is the one that knows the time of
each sample, because the knowledge of when to play each sample is embedded in the MPEG format.
In this case this element will be regarded as the source element for this discussion."

I am not sure how does ALSA gets the time stamp when it cannot see mpeg4 directly? Is mpeg4 supposed to update global clock upstream so ALSA can see it or what?
Cheers,
Ogi
_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




--
Regards,

Sudarshan Bisht

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel