[Live-devel] how to use openrtsp get nal unit and video config info

Ross Finlayson finlayson at live555.com
Tue Dec 20 01:25:39 PST 2011


>  i want use live555 openrtsp get nal data from h264 encode device. i see live555 testprog playcommon.cpp code.it use h264videofilesink. my question:
> 1、i hope use playcommon get nal data rather than write file.so i must write our myh264videosink? yes or no?

Yes, if you want to do something with the incoming NAL units - other than write them to a file - then you will need to write your own "MediaSink" subclass to do this (instead of using "H264VideoFileSink").


> 2、if use our myh264videosink get nal data,i how to get video config info? i.e. video size and 
> video bit?

First, you get the 'sprop-parameter-sets' configuration string from the stream's SDP description, by calling
	subsession->fmtp_spropparametersets()
This returns an ASCII string, that you can parse with the "parseSPropParameterSets()" function, to get a set of (binary) NAL units (usually, SPS and PPS).  (Note, for example, the implementation of "H264VideoFileSink", which calls "parseSPropParameterSets()".)


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20111220/3f801e1e/attachment.html>


More information about the live-devel mailing list