Thanks for your reply, Charlie
I’ve examined server-side API, in Publisher class example there are lines like
AMFPacket amfPacket;
// read packet from audio, video, data source
// amfPacket = readPacketFromSomewhere();
So I supposed that I should intercept that packet from somewhere. Please correct me if I’m wrong.
You wrote
The Publisher API expects raw encoded media frames with the proper 1, 2 (AAC audio), or 5 (H.264 video) byte header
I’we tried that also, actually I made another test-case for it.
I’m getting raw RTP data (payload) from packets and concatenating that data according to timestamps into single byte array (assuming I’ll get single frame in result).
It takes from 2 up to 7 packets for single frame.
After I got complete frame - I’m sending it to Publisher via
publisher.AddVideoData
After reading about RTP timestamps, specially this post http://stackoverflow.com/questions/2439096/h264-rtp-timestamp
I’m using current date converted to milliseconds as a RTP timestamp. I believe it should work, because I’m waiting some amout of milliseconds before publishing next frame.
Once again, you wrote about headers:
The Publisher API expects raw encoded media frames with the proper 1, 2 (AAC audio), or 5 (H.264 video) byte header
I suppose that frame that I’m sending contains all necessary header bytes - the original packets was captured from live srtream, and all I did - was just recovering original frame from multiple packets. Please, correct me if I’m wrong.
Anyway - I can’t get any video playing.
After enabling DEBUG in log4j.properties file, I can see some debug data from Wowza, and it looks strange for me. This output was prodused while I was publishing frames and after I’ve clicked “Play” button in Flash-player. Can you please take a look at it?
DEBUG server comment - checkFlush[false,false,75]: tc:1285510496282>1285510496285 || rt:1285510496283>1285510496285
DEBUG server comment - checkFlush[false,false,75]: tc:1285510496283>1285510496285 || rt:1285510496284>1285510496285
DEBUG server comment - send[823773096]: size:0:0 filter:7 time:253 tOffset:0 rwrt:true
DEBUG server comment - checkFlush[true,false,75]: tc:1285510496317>1285510496285 || rt:1285510496317>1285510496285
DEBUG server comment - flush: notify:false tSize:38 dataObjs:2750 time:107 tOffset:0
DEBUG server comment - checkFlush[false,false,75]: tc:1285510496321>1285510496392 || rt:1285510496321>1285510496392
DEBUG server comment - checkFlush[false,false,75]: tc:1285510496323>1285510496392 || rt:1285510496323>1285510496392
How do you think, why I get this line
DEBUG server comment - send[823773096]: size:0:0 filter:7 time:253 tOffset:0 rwrt:true
with size:0:0?
I really don’t know where should I go from this point.
Only thing in my mind is to capture stream in h264, currently I’m experimenting with stream captured in MP4V-ES/90000 format.