Difference between revisions of "Doing your best to get rid of smudging in FFMPEG transcoding of RTSP streams"

From ZoneMinder Wiki
Jump to navigationJump to search
Line 13: Line 13:
* Foscam seems to only stream MJPEG as 640x480. That was not acceptable (and the quality of the stream seemed to have a lot of artifacting)
* Foscam seems to only stream MJPEG as 640x480. That was not acceptable (and the quality of the stream seemed to have a lot of artifacting)
* So really, the only option left was RTSP
* So really, the only option left was RTSP


===RTSP via FFMPEG/VLC/Remote ===
===RTSP via FFMPEG/VLC/Remote ===
Line 18: Line 19:
Now that RTSP was the only viable option, there are 3 methods you can use (well, maybe 4, not sure if Curl supports RTSP - never tried)
Now that RTSP was the only viable option, there are 3 methods you can use (well, maybe 4, not sure if Curl supports RTSP - never tried)
* You can use source type as FFMPEG, VLC or (a new addition with ZM 1.28) Remote
* You can use source type as FFMPEG, VLC or (a new addition with ZM 1.28) Remote


====Source Type: Remote====
====Source Type: Remote====


Based on [https://github.com/ZoneMinder/ZoneMinder/issues/734 this] issue in github
Based on [https://github.com/ZoneMinder/ZoneMinder/issues/734 this] issue in github, knnniggett writes that starting ZM 1.28, they have built in their own RTSP handler that does not rely on FFMPEG.
 
Well, that's great. Except, it never worked for me. When I tried, I would get errors like this:
<nowiki>
2015-03-23 18:39:44.255471 zmc_m3 713 INF Recieved new Content-Base in DESCRIBE reponse header. Updated device Url to: 'rtsp://192.168.1.xxx:65534/videoMain/' zm_rtsp.cpp
2015-03-23 18:42:10.721264 zmc_m3 770 FAT No RTSP sources zm_remote_camera_rtsp.cpp
</nowiki>
===Smearing===
===Smearing===
Once I had ZM up and running for a day or two, I started noticing a lot of frame "smearing". This is what I mean by smearing:
Once I had ZM up and running for a day or two, I started noticing a lot of frame "smearing". This is what I mean by smearing:


[[File:Smearing_example.jpeg]]
[[File:Smearing_example.jpeg]]

Revision as of 11:33, 24 March 2015

<Home

Background

All my cameras are Foscam HD cameras (1280x960) and support RTSP. Further , 4 out of my 5 cameras are connected via WiFi. Zone minder has many options to capture frames, but for Foscam cameras it boils down to:

  • Using the Foscam "snapshot2" URL to capture images instead of live streaming
  • Using RTSP URL
  • Using MJPEG URL (needs a configuration change to Foscam)

I investigated all 3 options.

  • In terms of quality, Option 1 (image snapshot) is the best. No artifacts, no smudging nothing. The downside is there are a high amount of connection drops, even if I dropped the HD stream to 720p.
  • Foscam seems to only stream MJPEG as 640x480. That was not acceptable (and the quality of the stream seemed to have a lot of artifacting)
  • So really, the only option left was RTSP


RTSP via FFMPEG/VLC/Remote

Now that RTSP was the only viable option, there are 3 methods you can use (well, maybe 4, not sure if Curl supports RTSP - never tried)

  • You can use source type as FFMPEG, VLC or (a new addition with ZM 1.28) Remote


Source Type: Remote

Based on this issue in github, knnniggett writes that starting ZM 1.28, they have built in their own RTSP handler that does not rely on FFMPEG. Well, that's great. Except, it never worked for me. When I tried, I would get errors like this:

2015-03-23 18:39:44.255471 zmc_m3 713 INF Recieved new Content-Base in DESCRIBE reponse header. Updated device Url to: 'rtsp://192.168.1.xxx:65534/videoMain/' zm_rtsp.cpp
2015-03-23 18:42:10.721264 zmc_m3 770 FAT No RTSP sources zm_remote_camera_rtsp.cpp

Smearing

Once I had ZM up and running for a day or two, I started noticing a lot of frame "smearing". This is what I mean by smearing:

Smearing example.jpeg