Ross,
> I don't understand what you mean by this, because VLC - when receiving RTSP
>streams - does so using the LIVE555 libraries, and so does so by receiving one
>NAL unit at a time, just as your own receiver application does.
Sorry, probably not explained myself. I am using the VLC code as reference as
it also does receive one NAL unit at a time in it's live555 demuxer module,
however these units pass through and get collected by a h264 packetizer module
before getting to the avcodec module. VLC does play everything fine in this
setup, unless I delete the h264 packetizer plugin .dll - which causes VLC to
use the fall-back copy packetizer (which just copies each unit as is, no
grouping). With no packetizer VLC as a client really struggles on most H264
RTSP sources, having similar issues as I was having, so it looks like the h264
packetizer in VLC gets it out of a lot of trouble. I was under the impression
the packetizers in VLC were just for making sense from a bitstream but it seems
they are used to 'help' other modules along as well - in this case the live555
demux module.
> One thing to keep in mind, though, is that because network packets have
> 'jitter' (i.e., are not received at a smooth, constant rate), received NAL
> units will need to be buffered before being rendered.
> (The rendering time should be based upon the 'presentation time' that you get
> with each NAL unit.) Some decoders might do buffering automatically; others
> might not (in which case you'll need to add some buffering yourself).
I think you've pretty much hit the issue, I'm guessing (as the MF decoder is
closed source) the MF decoder does this buffering whereas avcodec does not.
I've now implemented the suggestion you have above where I base the rendering
on the 'presentation time' from live555 - all works smoothly, both the
troublesome feeds and the ones that previously worked without this.
Thanks!
Mark.
________________________________
From: Ross Finlayson <finlay...@live555.com>
To: LIVE555 Streaming Media - development & use <live-de...@ns.live555.com>
Sent: Thursday, 14 March 2013, 5:00
Subject: Re: [Live-devel] using live555 as a client to receive 1920x1080 H264
over rtsp
I've been using the RTSP client of live555 to receive a 'full-hd' stream of
H264 encoded video over RTSP, sent by VLC (2.0.5). I have been using the NAL
units sent from live555 (via H264VideoRTPSource) and passing them directly (no
packetizer or grouper e.g, just prefixing the start code) to a Media Foundation
H264 decoder. This worked perfectly, so then I changed decoder to avcodec
(ffmpeg libraries) and the same video source has corrupted decoder output (sort
of grey smudges with bits of the actual frames in).
>
>I've been reading through the live555 code and searching through posts on
>forums to try and see if this is
a issue with live555 or the av decoder.
Because you've demonstrated that your received H.264 NAL units render OK with
one decoder, but not with the other, this suggests that the problem is with the
decoder. (Logic 101 :-)
One thing to keep in mind, though, is that because network packets have
'jitter' (i.e., are not received at a smooth, constant rate), received NAL
units will need to be buffered before being rendered. (The rendering time
should be based upon the 'presentation time' that you get with each NAL unit.)
Some decoders might do buffering automatically; others might not (in which case
you'll need to add some buffering yourself).
FYI, the same RTSP stream works in VLC as client, but *only* with the use of a
H264 packetizer in between the RTSP and decoder modules.
I don't understand what you mean by this, because VLC - when receiving RTSP
streams - does so using the LIVE555 libraries, and so does so by receiving one
NAL unit at a time, just as your own receiver application does.
You should check whether the (original, unmodified) VLC media player
application plays your stream OK. If it does, then you could use the VLC code
as a model.
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel