Discussion:
Errors when streaming HD H.264 using Live555
팜반푸
2013-12-11 11:48:44 UTC
Permalink
Hi experts,

I am using VLC to playback H.264 (720p and 1080p) streaming from live555 with the I frame's size is about 100000 kbytes then I get errors. Some first frames arrivate at the VLC player and are displayed broken. After 4 or 5 seconds the VLC player refreshes the screen and after that it works fine. The H.264 file I used to test live555 saved from an IP camera that does not get errors when playing back at VLC player.
Here is the link to the image show the errors.
Loading Image....html
Ross Finlayson
2013-12-11 16:40:03 UTC
Permalink
VLC is not our software, and problems with VLC should be posted on a VLC mailing list - not here. However, in this case, I know the answer to your question.

Your problem is that your stream's I-frames are too large. VLC uses an initial buffer size of 100,000 bytes when receiving data. If a data frame (in this case, your stream's first I-frame) is larger than this, then the remaining data will be truncated (i.e., lost). VLC recovers from this by doubling the size of the buffer for receiving future frames, but it cannot recover the data that was lost from the first I-frame.

The solution is to not send very large I-frames as single NAL units. Instead, you should encode these I-frames into multiple 'slice' NAL units. (Alternatively, if you can't do that, then try to encode I-frame NAL units to be smaller than 100,000 bytes.)


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
팜반푸
2013-12-13 09:26:24 UTC
Permalink
Hi Ross, thank you for your response,

All our boards IPNC DM368, DM8148 that use Live555 for streaming commit that problem. But when I use VLC to playback the HD H.264 from a streaming board I don't get that kinda error. (Actually I don't know what kind of streaming libraries they use inside ). When I use RTSPClient to retrieve and save that stream to a .h264 file and use live555 to stream out that file over rtsp, at the client side I also use VLC player to playback then the errors happen. I don't know but are you sure this problem is not caused by Live555?

BTW, I read the VLC source code then I find out that they have a module call 'access->mms->mmstu.h' which is used to initially retrieve data from the server has a buffer of 100000 bytes. I increase that buffer to have enough room for incoming I-frames. But it doesn't help me out. Do you have any ideas?

I appreciate your help.


Re: [Live-devel] Errors when streaming HD H.264 using Live555


VLC is not our software, and problems with VLC should be posted on a VLC mailing list - not here. However, in this case, I know the answer to your question.


Your problem is that your stream's I-frames are too large. VLC uses an initial buffer size of 100,000 bytes when receiving data. If a data frame (in this case, your stream's first I-frame) is larger than this, then the remaining data will be truncated (i.e., lost). VLC recovers from this by doubling the size of the buffer for receiving future frames, but it cannot recover the data that was lost from the first I-frame.


The solution is to not send very large I-frames as single NAL units. Instead, you should encode these I-frames into multiple 'slice' NAL units. (Alternatively, if you can't do that, then try to encode I-frame NAL units to be smaller than 100,000 bytes.)



Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
Craig Matsuura
2013-12-12 07:59:56 UTC
Permalink
I want to use the proxy server to connect to cameras in my system.
However I want to pass the user:password
from the url used to access the cameras via the proxy. For example:

If using live555proxyServer and I have a camera stream proxied via the
proxyServer. The stream has some user:password that I want to pass from
the proxied url.

My camera url is rtsp://user:***@xx.yy.zz.aa:554/Video-0

Instead of providing the user:pass I want to do it at runtime when using
the url from the proxy.

Say the proxy says to use rtsp://1.2.3.4:554/Video, I want to use a
client that provides the user:pass to the url. Like so.

rtsp://user:***@1.2.3.4:554/video and the user:pass is passed on to the
rtsp://user:***@xx.yy.zz.aa:554/Video-0

I know you can provide the user/pass on a commandline. But I want to do
it run time from the url. What can I change or where can I access the
user:pass from the url in the RTSPServer?

Thanks,
Craig
Ross Finlayson
2013-12-19 00:32:43 UTC
Permalink
Note that whatever authentication that the proxy server uses to authenticate 'front-end' streams is completely independent of whatever authentication the 'back-end' stream requires. You can have authentication on the front-end stream, but not the back-end stream, or vice-versa.

Note also that because the proxy server accesses the back-end stream (using "DESCRIBE") before the first front-end client connects, it makes no sense to talk about using any information from the front-end client to authenticate the back-end stream.

Also, if you want to customize the authentication mechanism, and you're feeling adventurish, you can subclass "RTSPServer" and redefine one or both of the virtual functions "specialClientAccessCheck()" and "specialClientUserAccessCheck()". You're on you own here though...


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

Loading...