Please guide me to achieve the following result in my program (written in C): I have a stream source as HTTP MPEG TS stream (codecs h264 & aac), It has 1 video and 1 audio substream. I need to get MPEG ES frames (of same codecs), to send them via RTP to RTSP clients. It'll be best if libavformat give frames with RTP header. MPEG ES is needed, because, as i know, media players on Blackberry phones do not play TS (i tried it). Although, i appreciate if anyone point me some another format, easier to get in this situation, that can hold h264 & aac, and plays well on blackberry and other phones.
I've already succeed with other task to open the stream and remux to FLV container.
Tried to open two output format contexts with "rtp" formats, also got frames. Sent to client. No success.
I've also tried writing frames to "m4v" AVFormatContext, have got frames, have cut them by NAL, added RTP header before each frame, and sent to client. Client displays 1st frame and hangs, or plays a second of video+audio (faster than needed) each 10 seconds or more. In VLC player log i have this: http://pastebin.com/NQ3htvFi
I've scaled timestamps to make them start with 0 for simplicity. I compared it with what VLC (or Wowza, sorry i dont remember) incremented audio TS by 1024, not 1920, so i did additional linear scaling to be similar to other streamers. Packet dump of playback of bigbuckbunny_450.mp4 is here: ftp://rtb.org.ua/tmp/output_my_bbb_450.log
BTW in both cases i've hardly copied SDP from Wowza or VLC.
What is the right way to get what i need? I'm also interested if there's some library similar to libavformat? Maybe even in embryo state.