[Live-devel] Subclassing OnDemandServerMediaSubsession for Live Video Sources to stream h264

Bhawesh Kumar Choudhary bhawesh at vizexperts.com
Sat Jan 11 00:41:20 PST 2014


Ok, this approach I have tested before also. Though server streams data
happily but clients are not able to play it properly. The approach I have
done is to copy single nal unit data in each getNextFrame() call of my
device source to buffer. Obviously nals doesn't contain the start code. I
removed it by removing first four byte and Live555 seems to be happy with
nal units and streams data without complaining.

In my H264VideoStreamDiscreateFramer it does get sps and pps nals before
every key frame.

But clients (openRTSP.exe) is not able to play. It will get the first play
response from server and then waiting for data forever. I am able to figure
out what I am doing wrong??

 

Thanks

Bhawesh Kumar

VizExperts India Pvt. Ltd.

 

From: live-devel-bounces at ns.live555.com
[mailto:live-devel-bounces at ns.live555.com] On Behalf Of Ross Finlayson
Sent: 10 January 2014 21:22
To: LIVE555 Streaming Media - development & use
Subject: Re: [Live-devel] Subclassing OnDemandServerMediaSubsession for Live
Video Sources to stream h264

 

Thanks, the fix does work, I am able to stream my live source. But the video
quality I am getting on other side is quite glitch. Basically I am streaming
encoded data from ffmpeg's output packet (AVPacket) but I am suspecting that
since FFmpeg Gives more than one nal unit in a single AVPacket there might
be data loss in live media while streaming because of which playing in
client side producing wrong images. I have increased the
outPacketBuffer::maxSize to 160000 but it doesn't seem to fix the problem.

Does live media do the parsing of Nal unit which are inside FFmpeg's
AVPacket or I have to copy single nal unit at a time in my device source?

 

The latter - because your input source consists of discrete NAL units,
rather than a byte stream.  Specifically, your input source must deliver NAL
units, one at a time, *without* 0x00000001 start codes, into a
"H264VideoStreamDiscreteFramer" (*not* a "H264VideoStreamFramer"; that class
is used only when streaming a H.264 video byte stream - i.e., from a file or
a pipe).

 

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/ 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20140111/5eb11d3b/attachment-0001.html>


More information about the live-devel mailing list