[FFmpeg-soc] [PATCH] xiph packetizer

Martin Storsjö martin at martin.st
Thu Jul 29 21:49:45 CEST 2010


On Thu, 29 Jul 2010, Josh Allmann wrote:

> On 29 July 2010 04:54, Martin Storsjö <martin at martin.st> wrote:
> > On Thu, 29 Jul 2010, Josh Allmann wrote:
> >
> >> > Also, there's an issue with vorbis timestamps if you stream copy from an
> >> > ogg file - not all packets have pts/dts set when reading them, and for
> >> > vorbis, you'd need to decode it to figure out the proper length of each
> >> > frame. In ffmpeg.c, lines 1622-1623, the pts is updated using an estimate
> >> > of the frame size, which doesn't turn out to be right (in my case at
> >> > least).
> >> >
> >> > If playing only vorbis over RTSP/RTP, it still worked, but the timestamps
> >> > advanced slowly from 0 to perhaps 1, then jumped to 5-6 seconds, advanced
> >> > slowly there again, and jumped onwards when the ogg demuxer returned a
> >> > packet that actually had a timestamp. Combined with a video stream, it
> >> > doesn't work too well in that setup of course.
> >> >
> >> > If live transcoding into theora/vorbis, and sending it out over RTSP/RTP,
> >> > it seemed to work really well, though!
> >> >
> >>
> >> That's pretty strange, I would like to see your sample. With Big Buck
> >> Bunny, Vorbis standalone timestamps are fairly linear.
> >
> > Can you give an url to this test clip?
> >
> 
> http://mirrorblender.top-ix.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_stereo.ogg

Yes, this one seems to work just fine. I think this comes from the way 
that many individual packets are stored in one ogg page(?) or something - 
I think the libavformat ogg muxer changed to store many packets per page 
not too long ago. That would explain the difference.

> >> Using Theora and Vorbis together with RTSP/RTP, things work well.
> >> Theora standalone is still full of artifacts around motion with TCP,
> >> and UDP is a slideshow because of all the dropped packets. Tomorrow,
> >> I'll copy over the packetization routine from Feng and see if the
> >> results are more sane.
> >
> > Hmm, that sounds really strange. Can you give the command lines that
> > you've used for these test setups?
> >
> 
> ffmpeg -re -i acodec copy -vcodec copy -f rtsp rtsp://localhost/foo.sdp
> 
> also with -an, -vn, and ?tcp variants.
> 
> ffplay rtsp://localhost/foo.sdp

Ok, I'll see if I can reproduce your problems in a while.

// Martin


More information about the FFmpeg-soc mailing list