I\'m developing a DirectShow filter which has 2 input pins (1 for audio, 1 for video). I\'m using libavcodec/libavformat/libavutil of FFMpeg for encoding the video to H264, audi
Try checking out the code in HandBrake. Specifically, this file muxmp4.c, which was a jem I found working with FFMpeg / RTP. Be sure and use av_interleaved_write_frame() and the extradata fields correctly. Those were some key differences I remember for RTP.
Still, I had some stability issues with RTP/RTSP with FFMpeg, (I'm sure it's getting better). I had much better luck with live555, and you can look at the code in VLC and MPlayer for good examples on how to use it.