vorbis timeline

lestoilfante lestoilfante at gmail.com
Tue Jun 4 06:11:32 PDT 2013


Ok, I found a possible hugly fix to timestamping problem! Note that I'm
working with theora video, not with audio like vorbis in my wrong mail
object.

Actually I make a query_position on pipeline just before unlink dynamic
bin, then send a new_segment on the queue src pad with
offset=query_position so the resulting file dump is the following:

$ oggz-dump video02.ogv |grep pos|head -5
00:00:00.000: serialno 1209677529, granulepos 0|0, packetno 0 *** bos: 42
bytes
00:00:00.000: serialno 1209677529, calc. gpos 0|0, packetno 1: 58 bytes
00:00:00.000: serialno 1209677529, granulepos 0|0, packetno 2: 2.552 kB
00:00:00.375: serialno 1209677529, granulepos 4|0, packetno 3: 34.163 kB
00:00:00.500: serialno 1209677529, granulepos 4|1, packetno 4: 3.213 kB

Packet 3 which I think is the first video packet driving the timeline now
start with a gap of 0.375 seconds and it is always the same in every
following videoN.ogv file.  I don't know if this gap could be fixed
totally, but until now this is a good workaround and it's ok for my project.

Anyway this solution is working on my old test machine with gstreamer
0.10.28 but on my target machine with gstreamer-sdk 2012.11 the function
query_position always fail without further info, so new mail request is
coming :)

Feel free to reply with suggestion or further consideration about current
duration workaround.

Cheers


On Sat, May 25, 2013 at 6:08 PM, Tim-Philipp Müller <t.i.m at zen.co.uk> wrote:

> On Fri, 2013-05-24 at 09:40 +0200, lestoilfante wrote:
>
> Hi,
>
> > I tried oggz-dump on my files and the output is a bit different from
> > that on radio.ogg you suggest where gpos start from xxxxx and continue
> > to grow:
> > (...)
> > #oggz-dump video03.ogg |grep gpos|head pos
> >
> > 00:00:00.000: serialno 1850673644, granulepos 0|0, packetno 0 *** bos
> > 00:00:00.000: serialno 1850673644, calc. gpos 0|0, packetno 1
> > 00:00:00.000: serialno 1850673644, granulepos 0|0, packetno 2
> > 00:00:31.600: serialno 1850673644, granulepos 159|0, packetno 3
> > 00:00:31.800: serialno 1850673644, granulepos 159|1, packetno 4
> >
> >
> > So I have only one gpos for each file and a lot of granulepos with
> > timing start at 0 and jumping to 15 sec on second file and so on. I'm
> > not so much confident with ogg but why first packets on video02 and
> > video03 start from 00:00:00.000 and jump to 00:00:15.000 and
> > 00:00:31.600?
>
> This is to be expected, I think. The first few packets are header
> packets, which are supposed to have a granulepos of 0 according to
> http://xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-130000A.2 (at least for
> vorbis).
>
> Cheers
>  -Tim
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130604/12cf6e1c/attachment.html>


More information about the gstreamer-devel mailing list