[vlc-devel] Getting informations on a RTP stream
rdenis at simphalempin.com
Mon Jun 16 17:43:27 CEST 2008
Le lundi 16 juin 2008 06:50:25 benoit begue, vous avez écrit :
> I'm working on a project where I need to identify some properties about a
> RTP video stream. My software reads a network capture file from
> tcpdump/wireshark and I can isolate the bits corresponding to the RTP
> layer. I would like to detect :
> - video codec and bitrate
> - audio codec and bitrate
> - video resolution and framerate (this seems to be in the Video_format_t
> structure from what I tried to find)
> Is it possible using the VLC API or by taking parts of its code to input
> the bits of my RTP stream and get those informations ?
> Could somebody give me any help, point me to the right functions/source
> code files or to a sample code using the VLC API for a similar purpose ?
This would work for MPEG-TS, MPEG Audio and MPEG Video, by just reordering the
packets and stripping the RTP headers.
For static RTP audio payload formats, the bitrate can be deduced directly from
the payload number, so you don't need VLC.
For dynamic RTP payload formats, this is an impossible task by definition.
Then again, the codec information would be in the SDP, so you don't need to
read the RTP packets in the first place.
More information about the vlc-devel