GNOME Bugzilla – Bug 143703
duration always 0 for some (gst produced) .ogg files
Last modified: 2004-12-22 21:47:04 UTC
gst_element_query () returns a total duration of 0 for some .ogg files I have (while the correct total duration should be 70-something minutes). 99% of all .ogg files I have work perfectly fine, it's just a few that don't work. All of those that do not work were GStreamer-produced with filesrc ! monkeysdec ! audioconvert ! rawvorbisenc quality=0.7 ! oggmux ! filesink, (it's not that all gst-produced .ogg files fail though). This problem happens in rhythmbox and in my own code, and I could not extract the correct duration from the audiosink no matter what - even later when the file is playing. The full file is more than 100 MB. I'll make the first couple of MB of the file available in the hope that that's sufficient. If it is not, let me know and I'll put up the full file somewhere. Cheers -Tim
Here's the beginning of one of the problematic oggs: http://www.zen18864.zen.co.uk/tmp/zero-duration-143703.ogg Cheers -Tim
I guess the problem is that the oggs are not properly finisahed with an eos page. Could you confirm that by looking at the whole file?
Yes, you are right, that seems to be the problem (if I was supposed to look at whether the last OggS page has bit 0x04 set, that is - otherwise I don't know what to look for). Manually setting that bit didn't change much though (not sure if that's supposed to work anyway). ogg123 shows the correct length, btw. ;) Cheers -Tim
If it's what Benjamin suggests, than this is a dup of bug #144241 .
I actually filed bug #144241 as a separate bug on purpose, because it's a bug in oggmux, while this bug is more general. I'd expect GStreamer to correctly determine the approximate length even of truncated ogg/vorbis files (like ogg123 apparently does), independent of why the EOS flag is missing or not or who is responsible for that.
I believe the recent setup reorganization properly detects the size of truncated ogg streams. At least this file is correctly identified as having a length of 1:22 in Rhythmbox and it allows seeking. So I'm closing this.