Tuesday, May 20, 2014

Tools for RTP packet creation

The purpose of yesterday's and today's work was to find out tools which could create customized RTP packets. Unfortunately after trying almost dozen tools, no such tool exist. If you know any, please let me know by adding your comments. The original exercise that was in my mind was to create custom RTP packets (Where i can define payload type, sequence number etc), save them in a file and later play them back. This would later become testbench for RTP module that is going to be implemented in Verilog.

From the point of view of writing my own RTP traffic generation tool using available libraries, things are little difficult as the RTP payload format is different for every payload type. This makes no sense to me but this is how it is. For example RTP payload format for Vorbis (audio file) http://tools.ietf.org/rfc/rfc5215.txt is different than from MPEG (video file) http://tools.ietf.org/html/rfc2250.

Fortunately, there is RTP payload for uncompressed video,http://tools.ietf.org/html/rfc4175. I am going to write a small program in Python or C that will generate RTP packets with uncompressed video payload and save as file on a disk.

The tools i tried on the 2nd day are

1) LANForge
2) D-ITG Traffic Generator
3) Mausezahn

Time to look at HDMI2USB hardware ...


2 comments:

  1. RTP is pretty generic so the common RTP header is going to also be pretty generic. Each RTP payload is likely to have different requirements, so has different formats.

    http://tools.ietf.org/html/rfc4175 looks like a good RFC to follow as it seems to cover SDI formats (which are a super-set of HDMI formats). See http://en.wikipedia.org/wiki/Serial_digital_interface for more information about SDI.

    When dealing with raw C structures in Python I recommend looking at both the "struct" -- https://docs.python.org/2/library/struct.html and "ctypes" -- https://docs.python.org/2/library/ctypes.html#structures-and-unions

    I also found the following via doing a "Python RTP" -- https://code.google.com/p/dpkt/source/browse/trunk/dpkt/rtp.py The description of the DPKT project is "fast, simple packet creation / parsing, with definitions for the basic TCP/IP protocols".

    ReplyDelete
  2. Post Updated. You can click on the above tools to visit their webpage

    ReplyDelete