Hi,
I’m listening using my own RTP socket implementation and receiving and parsing the packets including the version, padding, extension, csrc count, marker, payload type, sequence number, time-stamp, ssrc and the data itself.
The codec are H.264 and G.722.
Basically I use similar code to publish the stream:
publisher = Publisher.createInstance(vhost, appInstance.getApplication().getName(), appInstance.getName());
publisher.setFileExtension(“flv”); // I tried also mp4
publisher.setStreamType(“live-record”);
publisher.publish(currentStreamName, “live”);
byte rawBuf = rtpPacket.getData();
if (rtpPacket.getPayloadType() == G722)
publisher.addAudioData(rawBuf, 0, rawBuf.length, rtpPacket.getTimestamp());
if (rtpPacket.getPayloadType() == H264)
publisher.addAudioData(rawBuf, 0, rawBuf.length, rtpPacket.getTimestamp());
I also recording the content.
The stream and the recorded file are not playable.
Can you please offer me a better solution or help me understand what I do wrong?
Thanks,
T.