How to seek subtitle precisely

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to seek subtitle precisely

longkas
Hello,

I'm using subtitleoverlay and want to seek a position of the video and also
the subtitle,  but the subtitle is always a little 2 seconds ahead the video

        //seek video
         gst_element_seek_simple(videoElement, GST_FORMAT_TIME,
GstSeekFlags(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT), seekPos);
        setPadOffset(this->videoSrcPad);

        //seek subparse
        gst_element_seek_simple(subparseEle, GST_FORMAT_TIME,
GstSeekFlags(GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT), seekPos);
        setPadOffset(this->subPad);
       
I have also tried to set subtitle-ts-offset instead

    g_object_set(this->subtitleOverlayEle, "subtitle-ts-offset",
getPipeOffset(), NULL);    

please help me to figure the issue, thank you

     







--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel