[Live-devel] unicast onDemand from live source NAL Units
Pablo Gomez
Pablo.Gomez at scch.at
Mon Jan 28 00:50:37 PST 2013
Hi Ross,
>Remember that the data that you copy to *fTo should be a NAL unit, and nothing else. That means no start >code at the front. But it also means nothing else at the front - including your >'length prefix'.
>In other words - you need to omit the 'length prefix' when you copy the NAL unit to *fTo. (Of course, you >will use this 'length prefix' value to tell you how much data to copy, and you'll also set "fFrameSize" to >this value.)
Ok so now I have the problem that I'm not sure if I'm writing something else at the front. I did few tests:
If I set the framing type parameter to '0' -start codes- the output looks like this:
'00 00 00 01 09 10 00 00 00 01 67 42 C0 1F F4 02 00 30 D8 08 80 00 01 F4 ...'
With this NAL unit and the DiscreteFramer as expected it is not working.
If I set the framing type parameter to '1' -prefix length- the output looks like this:
'02 09 10 20 67 42 C0 1F F4 02 00 30 D8 08 80 00 75 30 .... '
With this NAL unit I cannot see anything neither -as expected because there is some prefix at the beginning.
If I set the framing type parameter to '2' also prefix length, the output looks like this:
'00 02 09 10 00 20 67 42 C0 1F F4 02 00 30 D8 08 80 00 01 F4 80 00 75 30 70 00 00 0B ....'
Again cannot see anything
If I set the framing type parameter to '4' also prefix length, the output looks like this:
'00 00 00 02 09 10 00 00 00 20 67 42 C0 1F F4 02 00 30 D8 08 80 00 01 F4 80 00 75 30 ...'
Same results.
Every time the encoder has a NAL unit ready, a callback function it is called.
void nalUnitReady(unsigned char *nal,size_t size);
>From that function -which is called from a different thread than the one that does the doGetNextFrame() at the streaming server- I also signal the H264LiveStreamFramedSource object, based now on the DeviceSource template.
I have tried to omit the front of the NAL units from there increasing the pointer a few bytes.
If I increase the pointer 10 bytes and the encoder parameter is set to '4' the output looks like this:
'67 42 C0 1F F4 02 00 30 D8 08 80 00 01 F4 80 75 30 ...'
But still, I don't see anything neither. Right now I'm not sure if the problem I have is in the NAL Units front.. or I did something wrong with the live555. Is there any special start pattern? It looks like to me that '67 42 C0 1F' somehow it is but not sure. Also I'm not sure about the meaning of length prefix because NAL units seems to have that '02 09 10' at the beginning so it looks like it is not the size of the NAL..
Therefore, regarding the size of the NAL I'm using the size provided in the callback function. I also did a test reducing the size the same amount of bytes I'm skipping at the front. But it doesn't work neither. Any clue?
Thanks!
Best
Pablo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130128/0a2f4061/attachment-0001.html>
More information about the live-devel
mailing list