GNOME Bugzilla – Bug 550064
[vorbisenc] Doesn't handle non-zero start timestamps properly
Last modified: 2011-05-20 07:56:33 UTC
Hi, vorbisenc doesn't handle non-zero start timestamps properly. This can be tested with gst-launch-0.10 audiotestsrc num-buffers=1000 timestamp-offset=3000000000 ! vorbisenc ! oggmux ! filesink location=test.ogg This stream starts with sound at 0 seconds while, with exchanging vorbisenc by flacenc, it starts at 3 seconds.
OTOH when muxing together with Theora the offset is handled fine
I think it's vorbisenc that is correct here. In particular, the granulepos values in the resulting file are offset from 0. (There's a test in the testsuite concerning this, IIRC.)
I guess we need to define this as preferred behaviour of encoders somewhere. IMHO the encoders should just passthrough timestamps and timing information/segments and muxers should then muxers should mux them based on the running time. Of course this is a bit complicated in the case of oggmux, but ideally oggmux would generate the granulepos itself without relying on the encoder to create them.
(In reply to comment #3) > I guess we need to define this as preferred behaviour of encoders somewhere. > IMHO the encoders should just passthrough timestamps and timing > information/segments and muxers should then muxers should mux them based on the > running time. This is what vorbisenc does (pipline above): 00:00:00.000: serialno 0316912248, granulepos 0, packetno 0 *** bos: 30 bytes 00:00:00.000: serialno 0316912248, calc. gpos 0, packetno 1: 91 bytes 00:00:00.000: serialno 0316912248, granulepos 0, packetno 2: 3.114 kB 00:00:03.000: serialno 0316912248, calc. gpos 132300, packetno 3: 43 bytes 00:00:03.002: serialno 0316912248, calc. gpos 132428, packetno 4: 20 bytes 00:00:03.015: serialno 0316912248, calc. gpos 133004, packetno 5: 56 bytes 00:00:03.039: serialno 0316912248, calc. gpos 134028, packetno 6: 38 bytes First non-header packet is at 132300, or ~3*44100. I'm not sure what the problem is here.
Yes, you're right. I looked at the output of oggmux (the offset/offset_end) which is of course not the granulepos anymore.