Fix RTSP decoding errors in 1.26.4 (addresses #221)#259
Fix RTSP decoding errors in 1.26.4 (addresses #221)#259kylejohnson merged 7 commits intoZoneMinder:masterfrom
Conversation
|
When I get home I'll test this. Please don't merge until I do, to help with distributing the bounty. P.s. Thank you! Ed Barnard notifications@github.com wrote:
|
|
I'm seeing this in my log files while accessing the RTSP stream on my Axis Q6032-E camera You should be able to access this camera at rtsp://public:public@camera.gnulnx.net:554/axis-media/media.amp |
|
If I open the camera in vlc it only displays one or a few frames and then freezes, and eventually crashes vlc. Are you able to view the stream in anything? I'm thinking its either a camera bug or an ffmpeg (h264 decoder) one. Which version are you building against? |
|
Hey there, I'm having some very poor internet at the moment - access the RTSP On 12/2/2013 2:00 PM, Ed Barnard wrote:
|
|
I'm getting a decent bitrate and vlc seems to be leaking memory. I'll try with zm and ffmpeg git head and see what happens. |
|
I'm also still having issues with another camera - a Grandstream. I can access the following URL in VLC fine, but it doesn't work in ZM: rtsp://71.251.199.163:554 |
|
Sorry, didn't look at your config. It should be RTP/RTSP and don't specify the port in the hostname. That works fine for me. No idea what was up with vlc. |
|
I messed up there - I didn't put the port in the hostname, was just copying and pasting from VLC. Let me try with RTP/RTSP though. |
|
Alright, I'm getting a monitor stream, but I'm still seeing this in the logs: |
|
Is your zm server on the same lan as the camera? My first thought is that its simply providing frames to trigger the zmc anti-freeze function (ie kill it). |
|
Yup - my ZM server is on the same network as the first camera that I pointed you to (the axis). |
|
How long is it between zmc restarts? |
|
The logs are showing it at 7, 15, 21 and 32 seconds |
|
While the second camera was causing zm to raise an exception due to an unexpected stream type it also doesn't seem to be standards compliant. When sent a SETUP command it fails to return a Transport parameter. It's possible zm is doing something wrong although all of the requests seem fine. I think vlc is just a bit more flexible. I think this is something better sorted out once we have new rtsp infrastructure in place (probably using curl). I'll have a look at the first one tomorrow. |
|
It's definately zm. Should have looked at a pcap earlier. I think I'll just rewrite to use curl. It shouldn't take too long. |
|
Really zm is restarted (see log`s in forum http://ftp.cinepost.ru/temp/from_rd/tcp_dump.zip (~100M)). But the picture shows :) It's not ideal, but agree that better than working through ffmpeg stream. @ebarnard - see stream rtsp://ipcam.zapto.org/cam/realmonitor?channel=1&subtype=0&authbasic=YWRtaW46YWRtaW4= Vlc report - two video stream: zm show only frame differences (as i think - use stream |
|
I've been quite busy over the last coupe of days but just a heads up on what I'm doing. Having rewritten zm to use curl for rtsp I then discovered that curl doesn't yet support authentication for rtsp. In fact their source includes the helpful comments which is a little frustrating. I'm fairly certain none of the cams above worked in 1.26.3 so my suggestion would be to merge this which would fix the regression and enable a few more cameras to work. I'll then rewrite to use live555. It turns out it shouldn't be too hard to patch for ipv6 if it's wanted (someone did it in 2011) although the rtsp 1.0 spec doesn't actually allow ipv6 (rtp does but if you can access the rtsp server to get the session descriptor then you can just use ipv4 anyway). I think that's a lot easier than trying to debug code that only exhibits flaws with certain cameras. |
|
I'd like @mastertheknife the chime in before I merge, but otherwise I agree with you. He's also ran into the curl issues with RTSP. |
|
@ebarnard exactly - none of the RTP/RTSP cams worked till 1.26.3 |
|
@kylejohnson @POKKAHOH |
|
Please try my crappy camera (Internet Eye MPEG4). at www.connortechnology.com:554 Not sure if the path matters. ffmpeg works without a path, but from what I've read, you can use /cam1/mpeg4 or /cam1/h264 to get different stream types. I have not got this working with the rtsp code in zm. However ffmpeg works. admin:password@ |
|
@connortechnology |
|
i'm a newbie and was wondering if anyone can try to view my camera in ZM? I can't see video in ZM, only in VLC. (admin:admin) The logs show a ton of "Error while decoding frame 0" messages - see below. tnx 11/30/13 17:17:08.391631 zmc_m5[2009].ERR-zm_remote_camera_rtsp.cpp/216 [Error while decoding frame 0] |
|
I've been running it live for 5 days now with no problems. Only using mpeg4, but did test briefly with h.264 and it worked ok |
|
@connortechnology - time out :) in vlc sometimes see patterned glass .... sometimes - gray screen @appnouvea with ebarnard`s patch - rtsr log look like this If use ffmpeg stream - error 1386314902.867313 zmc_m5 12583 0 INF Starting Capture zmc.cpp 195 vlc play this stream... format is mjpg |
|
@POKKAHOH the patterned glass is what you should be seeing or the top of my head :) Can I ask what other settings you are using? cuz I can only get it to work with ffmpeg. SO I use RTSP for protocol, I have tried all of the Remote methods, and both no path, and various paths. |
|
@POKKAHOH nevermind, apparentlly I had it "disabled" bad UI! It works. |
|
@ebarnard Any idea why I'm getting those zmc restarts? |
|
Adding my test results to the mix. I used the camera @appnouvea posted. Before applying the rtsp fix: |
|
@connortechnology - perfectlly... @kylejohnson - i think zmc restarts on timeout (send TEARDOWN command) @knnniggett - seems appnouvea`s cam send pure mjpeg (my vlc(v2.0.0) play it) |
|
@kylejohnson zmwatch.pl restarts zmc if it captured an image in the last 5 seconds even if packets are still arriving (so not necessarily an rtp timeout). As for why it's not capturing frames I'm really not sure but I haven't managed to successfully get a stream from that camera with vlc or ffmpeg (different rtsp/rtp backend). @knnniggett I get h264 from appnouvea's cam. It looks like keyframes are being dropped (I now see what you meant by only showing differences @POKKAHOH). I think that's because my patch is stricter on how the end of fragmented frame sequences are marked. I'll see if I can get it working tomorrow. |
|
@appnouvea @knnniggett Latest commit fixes that camera. |
|
@ebarnard this is great news (i'm assuming you meant my camera - the link i published above). I'm working on building your fork and will report back with the results. Thanks |
|
@ebarnard Thanks for your work. I can now view the stream from @appnouvea camera with the latest changes. However, the log is still filling up quite rapidly with "packet in sequence" & "discarding frame" warnings. Is this an indication of: If B, then I think we may need to look into creating a user-toggle-able option to suppress these warnings. Trying to troubleshoot other problems with all those warnings in the logs will make life difficult. Thoughts? |
|
@appnouvea Yeah I meant yours. @knnniggett I'm pretty sure it's B as the reason it didn't work originally is it wasn't conforming to rtp specs. I agree about the warnings although for the moment you can filter by component. In fact it might be better to improve the filtering system to be able to selectively exclude components than to add the ability to disable a specific warning. Even if it does turn out to be A the longer term plan is to move to using something like live555 for rtsp/rtp once we've fixed the regressions in 1.26.4. |
|
@ebarnard - works like a charm. It seems like all ZM features are working well - Thanks a lot for the fix! I still get some errors though - see attached image, just wanted to find out if this is normal or there is something i can do about it. |
|
Let us keep this conversation going. As I see, here are the current concerns with this pull:
Did I miss anything else? |
|
@kylejohnson That list is all that I am aware of. The following pertains to item 3. @kylejohnson it sounds like we are on the same page. And there I just reminded myself a second time today that I should start testing the new UI. |
|
Quick note from the mobile, I bring up suppressing these messages as they have more than once made my system completely unusable by filling up the logs table and eating up ram and disk space. Easy to happen of you don't know better. I would suggest a 'logs' tab in the config, with one option "do not log $these warnings' Andrew Bauer notifications@github.com wrote:
|
|
My opinion #221 (comment) |
|
@kylejohnson I'd suggest moving all those warnings to debug messages and then have an overall warning such as "Dropped 50 bad frames out of 300" similarly to the fps message. I just can't think of a situation other than debugging when you'd want all those messages and if you were debugging you'd most likely want all the other debug messages as well. @POKKAHOH I've finally got round to getting my libvlc camera to work. It's the libvlc branch in my repo. At the moment it only works consistently with rgb32 colourspace and I've only tested building with cmake although it should build with autotools. |
Regression: Fix RTSP decoding errors in 1.26.4 fixes #221







Fixes #221. ZoneMinder now supports H.264 and MPEG4 RTSP streams.