[gstreamer-bugs] [Bug 599649] New: Support for frame-based subtitles using playbin2 and subparse

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Oct 26 06:31:17 PDT 2009


https://bugzilla.gnome.org/show_bug.cgi?id=599649
  GStreamer | gst-plugins-base | git

           Summary: Support for frame-based subtitles using playbin2 and
                    subparse
    Classification: Desktop
           Product: GStreamer
           Version: git
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: itoral at igalia.com
         QAContact: gstreamer-bugs at lists.sourceforge.net
      GNOME target: ---
     GNOME version: ---


Created an attachment (id=146258)
 View: https://bugzilla.gnome.org/attachment.cgi?id=146258
 Review: https://bugzilla.gnome.org/review?bug=599649&attachment=146258

Adds support for frame-based subtitles in playbin2 and subparse

Frame-based Subtitle parsers need to know the video framerate to generate
proper timestamps for the subtitle buffers so that video and subtitles are
properly synchronized. Unfortunately, as far as my understanding goes,
obtaining the video framerate from the subtitle element is not possible, since
there is no communication between the video and text pipelines.

Currently, there is only one frame-based subtitle format supported in gstreamer
(MicroDVD in subparse element), but it only works properly if the subtitle file
provides proper video framerate information, which is not always the case, and
even if it does, it may not match the actual video framerate. Also, some other
frame-based subtitle formats (like AQ Title) do not even provide video
framerate information at all along with the subtitles. However, playbin2 does
have access to reliable framerate information and it can provide this
information to the subparse element, enabling it to synchronize frame-based
subtitles and video properly.

Attached is a patch that implements this. This patch does the following:

In playin2, it gets the video stream framerate from the video decoder caps, and
then provides it to the subtitle parser element by means of the "video-fps"
property.

In subparse, it adds the "video-fps".

I do not claim this to be the best solution, it is just the one I came up with,
but if there is a better approach to solve this problem I would work on a new
patch. Also, if this approach is considered good, a better solution would be to
have a subtitle parser base class exposing the "video-fps" property, so that
any subtitle parser element can get access to this information.

A similar approach can be used for playbin, however playbin starts the subtitle
decoding before it I can get the video framerate information, meaning that the
first buffer of subtitles will be parsed before subparse gets to know the video
framerate. Probably this can be fixed somehow but I think it would need a bit
of rework in playbin.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.




More information about the Gstreamer-bugs mailing list