H264/AVC composition time

Hi, I try to stream raw H264 video packets to the flash players. The raw video packets came from RTP stream. My question is how to calculate the compositionTime for each raw Video packet and fill it into the header of H264 packet to the flash clients? Thanks,

I don’t really understand the question. Can you provide more detail about exactly what you are trying to do?

Charlie

We support H.264 over RTP. There is no need for you to implement this.

Charlie

This is all available in Wowza 2.0. I suggest playing around with the preview release and trying all this stuff out. Then ask specific questions where there are gaps in information.

Charlie

I don’t understand are you trying to receive an RTP stream and send it to Flash over RTMP? Or are you trying to take in an RTMP stream and send it out over RTP? I am confused.

Charlie

Hi, Charles,

Thanks for your reply. From the doc, the header of H264 audio packet in RTMP looks like below,

H.264

byte[0] = [1-byte header]

byte[1] = [1-byte codec config indicator (1 - video data, 0 - codec config packet)]

byte[2…4] = [3-byte time difference between dts and pts in milliseconds]

byte[2…4] is the composition time offset.

If wowza server receives raw H264 packets from a remote server via RTP and I want to forward to a flash client with API publisher.addVideoData(), I have to fill in the 5-bytes header.

byte[0] = byte (0x27),

byte[1] = byte(0x1),

byte[2…3] = ??

is that right? how to calculate the composition time offset for byte[2…3]?

Thanks

Hi, Charles,

Any sample code for the direct conversion between RTMP stream and RTP stream?

I am interested in knowing if I can configure the RTP stack in wowza server to pointing to the port# and remote server addr? Thanks,

Hi, Charlies,

Thanks for your prompt reply.

(1) My first request is to receive a RTP stream and send it to flash client over RTMP?

(2) Since I have RTMP stream from flash client as well and I like to send to my remote RTP server, my second request is to receive a RTMP stream and send it over RTP to a remote server listening to a specific port number? To do that, I have somehow to configure the RTP stack to specify the IP address/Port number of the remote server, I think.

Hope that I explain it more clearly. Thanks,

After reading through the userguide 2.0 and the posts from the forum, I think I can use the sample from http://community.wowza.com/t/-/46 to receive the audio/video stream over RTP and send it over RTMP with Wowza rtp live encoder to the flash client. I will go ahead to test this feature.

two question ons this, (1) in the AV RTP stream, video and audio are in seperate ports. Currently in our A/V RTP stream, video codec is H264 and audio codec are Speex/PCMU. Does the wowza RTP live encoder support those video/audio codecs? Any other other A/V codecs are supported in currently wowza 2.0. [Quick Update, I followed the link above to play a audio stream with speex, I didnot hear any sound. I didnot see any error in parsing SDP file from server log. Any thoughts?]

(2) In the other direction, from the flash client to RTP servers. Is there any live encoder to encode/convert the A/V stream over RTMP into another A/V stream over RTP to a remote RTP server. I didnot find out the info from either the userGuide or the forum. Currently I have to retrieve the raw A/V packets from RTPM stream and maunally send them out over RTP. I wonder if there may exist an easy solution.

Thansk a lot,

Hi, Charles,

I fixed some mistakes and got sortof working but with bad sound quality.

Since the discussion is not related to the topic of this post. I will post my following questions under relevant threads. Thanks for your helps,