My requirement is to get iphone camera feed, encode it into H264 format and send it to server. In search, I found encoding part is possible with ffmpeg lib with x264 (libx264). But now the next task is to send the encoded data to Wowza server using rtsp.
Please share some code or useful document if anyone is aware about this.
There is one another library for encoding purpose live555. But I am not sure it can send the data to server using rtsp.
Actualy I made an iOS streaming app (with wowza as streaming server)
I believe you can stream video only with FFmpeg with rtsp protocol although FFmpeg don't fully support it
However with ffmpeg you can get a valid SDP and pass it to wowza using RTCP protocol - ANNOUNCE OPTION SETUP RECORD -
I didn't use FFmpeg for encoding but if you can get the raw H264 data you can packetize it to make a valid RTP packet using rfc6184
edit : here is a sample to connect wowza :
NSString* response = [NSString stringWithFormat:@"ANNOUNCE %@ RTSP/1.0\r\n",self->addr];
response = [response stringByAppendingFormat:@"CSeq: %d\r\n",self->cseq];
response = [response stringByAppendingFormat:@"Content-Type: application/sdp\r\nContent-Length: %d\r\n\r\n", [self->sdp length] ];
response = [response stringByAppendingString:self->sdp];
NSString* result = [self sendAndRecvData:response];
where sendAndRecvData is a tcp socket bound to wowza_ip:1935
you can use the same kind of code for SETUP, which will send back RTP (+RTCP) ports where you should send your datas
Your using live555 , you can use a live 555 server living on the device to send both audio and video, this will give you rtsp+rtcp stream to wowza, for announce and record live 555 has an unsupported dss module.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With