vorbis timeline

lestoilfante lestoilfante at gmail.com
Fri May 24 00:40:24 PDT 2013


Thank you Tim for reply,

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 video01.ogg |grep pos|head*
*00:00:00.000: serialno 0713580012, granulepos 0|0, packetno 0 *** bos: 42
bytes
*
*00:00:00.000: serialno 0713580012, calc. gpos 0|0, packetno 1: 58 bytes*
*00:00:00.000: serialno 0713580012, granulepos 0|0, packetno 2: 2.552 kB*
*00:00:00.000: serialno 0713580012, granulepos 1|0, packetno 3: 26.219 kB*
*00:00:00.200: serialno 0713580012, granulepos 1|1, packetno 4: 3.496 kB*
*00:00:00.400: serialno 0713580012, granulepos 1|2, packetno 5: 2.944 kB*
*00:00:00.600: serialno 0713580012, granulepos 1|3, packetno 6: 2.529 kB*
*00:00:00.800: serialno 0713580012, granulepos 1|4, packetno 7: 2.785 kB*
*00:00:01.000: serialno 0713580012, granulepos 1|5, packetno 8: 2.549 kB*
*
*
*#oggz-dump video02.ogg |grep gpos|head pos*
*00:00:00.000: serialno 0584889258, calc. gpos 0|0, packetno 1: 58 bytes*
*00:00:00.000: serialno 0584889258, granulepos 0|0, packetno 2: 2.552 kB*
*00:00:15.000: serialno 0584889258, granulepos 76|0, packetno 3: 26.238 kB*
*00:00:15.200: serialno 0584889258, granulepos 76|1, packetno 4: 3.472 kB*
*00:00:15.400: serialno 0584889258, granulepos 76|2, packetno 5: 2.591 kB*
*00:00:15.600: serialno 0584889258, granulepos 76|3, packetno 6: 2.597 kB*
*00:00:15.800: serialno 0584889258, granulepos 76|4, packetno 7: 2.404 kB*
*00:00:16.000: serialno 0584889258, granulepos 76|5, packetno 8: 2.912 kB*
*00:00:16.200: serialno 0584889258, granulepos 76|6, packetno 9: 2.416 kB*
*
*
*#oggz-dump video03.ogg |grep gpos|head pos
*
*00:00:00.000: serialno 1850673644, granulepos 0|0, packetno 0 *** bos: 42
bytes*
*00:00:00.000: serialno 1850673644, calc. gpos 0|0, packetno 1: 58 bytes*
*00:00:00.000: serialno 1850673644, granulepos 0|0, packetno 2: 2.552 kB*
*00:00:31.600: serialno 1850673644, granulepos 159|0, packetno 3: 26.148 kB*
*00:00:31.800: serialno 1850673644, granulepos 159|1, packetno 4: 3.206 kB*

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?

Actually my pipeline have 2 bins:
-in first bin I have souphttpsrc ! jpegdec ! videorate !
video/x-raw-yuv,framerate=5/1 ! timeoverlay ! queue
-in second bin theoraenc ! oggmux ! filesink

When I need to close a file an make a new one I block the queue src pad ->
unlink second bin (old) from first bin -> send eos to theoraenc -> set
second bin to null and make a third(new) bin linked to first bin -> set new
bin to playing -> unblock src pad.

Thank you



On Thu, May 23, 2013 at 8:28 PM, Tim-Philipp Müller <t.i.m at zen.co.uk> wrote:

> On Thu, 2013-05-23 at 17:37 +0200, lestoilfante wrote:
>
> >  gst-launch souphttpsrc ! jpegdec ! videorate !
> video/x-raw-yuv,framerate=5/1 ! timeoverlay ! theoraenc keyframe-force=5
> keyframe-freq=5 ! oggmux ! filesink location=test.ogg
> >
> > I can currently change filesink location dinamically each xx seconds or
> > minutes and all resulting files are fine with playbin, however the
> > timestamps in the second and later files seems to don't start from zero
> > because on some players, like vlc or by embedding the video in html5
> > style on chrome , the playing will stall until so many seconds have
> > elapsed from previous files. So I'm looking to figuring out how to
> > avoid this, please help me if you have any hints or solution.
>
> This sounds like a bug in those other players (vlc and whatever is used
> to play this in chrome).
>
> It is perfectly normal that "timestamps" (they are not really
> timestamps) in ogg don't start at 0. In any ogg streaming context they
> will not start at 0, and the player needs to handle that properly.
>
> e.g. try this:
>
>  $ wget -O radio.ogg 'http://stream-uk1.radioparadise.com:80/rp_96.ogg'
>
> control-C after a few seconds, then:
>
>  $ oggz-dump radio.ogg | grep gpos
>
> There isn't really an easy way to make oggmux start at 0 every X seconds
> or minutes.
>
> 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/20130524/2f3d8b4f/attachment-0001.html>


More information about the gstreamer-devel mailing list