AnsweredAssumed Answered

Recalculate duration of video in Gstreamer

Question asked by jimheath on Apr 18, 2014

I’m using Gstreamer 0.10.36 in a C program under Linux 3.0.35-ts-armv7l (Timesys BSP for the Nitrogen6X board). I’m playing a VOB file via a network share as the file is being copied off a DVD. The process seems to work but I’m trying to figure out how to detect a duration change since I begin playing the video seconds after beginning the copy process from DVD to hard drive. Obviously when the copy first starts, Gstreamer is only detecting a duration of a few minutes.


I’m wondering why I don’t see subsequent GST_MESSAGE_DURATION messages on the bus since the stream duration keeps changing as more of the VOB file is available as the copy the progresses. According to the documentation, when performing a GST_QUERY_DURATION query with the same format on the top level bin, a cached value will be returned if it exists. So I’m assuming this is why I still get the initial duration even though I’m well passed that as the video plays.


Is there a way to force a recalculation of the duration or do I need to send the duration query somewhere else? I’m using the playbin2 element.