After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 557161 - Wrong time displayed and no seeking with MPEG PS cut from VOB file
Wrong time displayed and no seeking with MPEG PS cut from VOB file
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.10
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-10-20 22:46 UTC by Robin Stocker
Modified: 2008-12-29 18:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
remove base_time, start all timestamps at 0 (4.03 KB, patch)
2008-10-20 22:52 UTC, Robin Stocker
committed Details | Review

Description Robin Stocker 2008-10-20 22:46:23 UTC
There are MPEG PS files which were directly cut from the middle of a VOB file without remuxing (e.g. a video clip from a DVD). Because of this, the timestamps in the file don't start at 0 but at the time they originally started on the DVD.

When such a file is viewed in Totem, it displays a full progress slider and the time is displayed like this: 1:35:08 / 5:00. Because the progress slider is already at the end, seeking is not possible, not even with the keyboard shortcuts.
Comment 1 Robin Stocker 2008-10-20 22:52:46 UTC
Created attachment 120966 [details] [review]
remove base_time, start all timestamps at 0

I don't know if this could/should be fixed in Totem, but the attached patch "fixes" mpegdemux in that it removes base_time so that all videos start with timestamp 0. With that patch applied, Totem behaves as it should (and as other players behave) in that it displays the correct time and seeking is possible. I hope changing this behaviour doesn't break other use cases. Does it?
Comment 2 Wim Taymans 2008-12-29 17:32:19 UTC
The part where the elapsed time is converted to bytes and where the position is reported are definitely correct and now commited:

        Patch by: Robin Stocker <robin at nibor dot org>

        * gst/mpegdemux/gstmpegdemux.c: (gst_flups_demux_src_query):
        Converting from time to bytes operates on the stream_time, not the SCR
        timeline.
        The position reporting should happen in stream_time, not the segment
        timestamp range. See #557161.
Comment 3 Robin Stocker 2008-12-29 18:25:48 UTC
I just updated my checkout and am happy to report that (with revision 1.9 of gstmpegdemux.c) the file now plays fine in Totem, position is correct and seeking works :).
Comment 4 Wim Taymans 2008-12-29 18:33:24 UTC
some more patches to make it even better:

        * gst/mpegdemux/gstmpegdemux.c: (gst_flups_demux_send_data):
        * gst/mpegdemux/gstmpegdemux.h:
        The position member in the newsegment event corresponds to the
        stream_time of the segment start position.

        * gst/mpegdemux/gstmpegdemux.c: (gst_flups_demux_src_query),
        (gst_flups_demux_parse_pack_start):
        Use the adjusted SCR for calculating the mux rate.
        Don't update the rate estimation after a discont.