I cannot get the video with FFMPEG rtsp in Fedora 23 (I had it working in Fedora 21). My camera settings are:
Camera FI9821P V2 - System FW 1.5.2.11 - App FW 2.21.1.43 - Plugin 3.1.0.10
DDNS disabled - UPnP disabled - port HTTP 88 - HTTPS 443 - ONVIF 888 - P2P enabled at port 59963
Mainstream video HD mode - resolution 720P - Bit rate 2M - Frame rate 30 - KeyFrameInterval 30
I run zoneminder 1.28.1.-1.fc23.i686.rpm downloaded from the zmrepo web site. I also tried with the source from the same repo and compiled it. It gave me the same result shown in the log below:avformat_open_input does not open the stream. I also disabled SeLinux and turned off the firewall but to no avail. Here is the log (level 5) with the failing step:
11/20/15 18:49:18.203983 zmc_m7[3714].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_logger.cpp/230 [LogOpts: level=DB5/DB5, screen=OFF, database=INF,
logfile=DB5->/var/log/zm/zm_debug.log.03714, syslog=INF]
11/20/15 18:49:18.204163 zmc_m7[3714].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_utils.cpp/268 [Detected a x86\x86-64 processor with SSE2]
11/20/15 18:49:18.205231 zmc_m7[3714].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_monitor.cpp/2486 [Got 1 monitors]
11/20/15 18:49:18.205326 zmc_m7[3714].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_monitor.cpp/2521 [Got 1 for v4l_captures_per_frame]
11/20/15 18:49:18.205372 zmc_m7[3714].DB2-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_camera.cpp/39 [New camera id: 7 width: 1280 height: 720 colours:
4 subpixelorder: 8 capture: 1]
11/20/15 18:49:18.206459 zmc_m7[3714].DB2-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_image.cpp/167 [Blend: Using SSE2 fast blend function]
11/20/15 18:49:18.206497 zmc_m7[3714].DB2-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_image.cpp/220 [Delta: Using SSE2 delta functions]
11/20/15 18:49:18.206511 zmc_m7[3714].DB2-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_image.cpp/254 [Deinterlace: Using standard delta functions]
11/20/15 18:49:18.206524 zmc_m7[3714].DB2-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_image.cpp/260 [Image buffer copy: Using SSE2 aligned memcpy]
11/20/15 18:49:18.206537 zmc_m7[3714].DB3-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_image.cpp/267 [Setting up static colour tables]
11/20/15 18:49:18.206599 zmc_m7[3714].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_monitor.cpp/369 [monitor purpose=1]
11/20/15 18:49:18.206616 zmc_m7[3714].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_monitor.cpp/377 [mem.size=184321360]
11/20/15 18:49:18.206652 zmc_m7[3714].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_monitor.cpp/522 [Unable to map file /dev/shm/zm.mmap.7 (184321360
bytes) to locked memory, trying unlocked]
11/20/15 18:49:18.206674 zmc_m7[3714].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_monitor.cpp/524 [Mapped file /dev/shm/zm.mmap.7 (184321360 bytes)
to locked memory, unlocked]
11/20/15 18:49:19.064356 zmc_m7[3714].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_monitor.cpp/432 [Monitor FI9821P_3 has no zones, adding one.]
11/20/15 18:49:19.064521 zmc_m7[3714].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_zone.cpp/51 [Initialised zone 0/All - 1 - 1280x720 - Rgb:0000ff,
CM:3, MnAT:15, MxAT:0, MnAP:50, MxAP:75000, FB:3x3, MnFP:50, MxFP:50000, MnBS:10, MxBS:0, MnB:0, MxB:0, OF: 0, AF: 0]
11/20/15 18:49:19.098180 zmc_m7[3714].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_monitor.cpp/442 [Monitor FI9821P_3 has function 2]
11/20/15 18:49:19.098266 zmc_m7[3714].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_monitor.cpp/443 [Monitor FI9821P_3 LBF = '%N - %d/%m/%y %H:%M:%S'
, LBX = 0, LBY = 0]
11/20/15 18:49:19.098313 zmc_m7[3714].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_monitor.cpp/444 [Monitor FI9821P_3 IBC = 50, WUC = 25, pEC = 25,
PEC = 25, EAF = 1, FRI = 1000, RBP = 6, ARBP = 6, FM = 0]
11/20/15 18:49:19.099945 zmc_m7[3714].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_zone.cpp/957 [Got 1 zones for monitor FI9821P_3]
11/20/15 18:49:19.100023 zmc_m7[3714].DB5-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_zone.cpp/989 [Parsing polygon 0,0 1279,0 1279,719 0,719]
11/20/15 18:49:19.100039 zmc_m7[3714].DB3-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_zone.cpp/823 [Parsing polygon string '0,0 1279,0 1279,719 0,719']
11/20/15 18:49:19.100056 zmc_m7[3714].DB3-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_zone.cpp/861 [Got coordinate 0,0 from polygon string]
11/20/15 18:49:19.100071 zmc_m7[3714].DB3-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_zone.cpp/861 [Got coordinate 1279,0 from polygon string]
11/20/15 18:49:19.100084 zmc_m7[3714].DB3-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_zone.cpp/861 [Got coordinate 1279,719 from polygon string]
11/20/15 18:49:19.100097 zmc_m7[3714].DB3-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_zone.cpp/861 [Got coordinate 0,719 from polygon string]
11/20/15 18:49:19.100205 zmc_m7[3714].DB3-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_zone.cpp/881 [Successfully parsed polygon string]
11/20/15 18:49:19.100225 zmc_m7[3714].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_zone.cpp/51 [Initialised zone 7/All - 1 - 1280x720 - Rgb:b60000ff, CM:3, MnAT:25, MxAT:0, MnAP:27648, MxAP:691200, FB:3x3, MnFP:27648, MxFP:691200, MnBS:18432, MxBS:0, MnB:1, MxB:0, OF: 0, AF: 0]
11/20/15 18:49:19.133592 zmc_m7[3714].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_monitor.cpp/2774 [Loaded monitor 7(FI9821P_3), 1 zones]
11/20/15 18:49:19.133685 zmc_m7[3714].INF-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zmc.cpp/195 [Starting Capture]
11/20/15 18:49:19.196907 zmc_m7[3714].INF-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_ffmpeg_camera.cpp/98 [Priming capture from rtsp://jplx:mypwd@192.168.1.28:88/VideoMain]
11/20/15 18:49:19.279430 zmc_m7[3714].DB2-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_ffmpeg_camera.cpp/215 [OpenFfmpeg called.]
11/20/15 18:49:19.279579 zmc_m7[3714].DB2-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_ffmpeg_camera.cpp/237 [Number of Options: 2]
11/20/15 18:49:19.279659 zmc_m7[3714].DB2-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_ffmpeg_camera.cpp/245 [set option 1 'rtsp_transport' to 'tcp']
11/20/15 18:49:19.279755 zmc_m7[3714].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_ffmpeg_camera.cpp/254 [Calling avformat_open_input]
11/20/15 18:49:19.302823 zmc_m7[3714].ERR-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_ffmpeg_camera.cpp/264 [Unable to open input rtsp://jplx:mypwd@192.168.1.28:88/VideoMain due to: Broken pipe]
11/20/15 18:49:20.131769 zmc_m7[3714].DB2-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_ffmpeg_camera.cpp/361 [ReopenFfmpeg called.]
11/20/15 18:49:20.135928 zmc_m7[3723].DB2-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_ffmpeg_camera.cpp/374 [CloseFfmpeg called.]
11/20/15 18:49:20.136044 zmc_m7[3723].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_ffmpeg_camera.cpp/434 [Sleeping 9 seconds before reopening stream.]
11/20/15 18:49:29.136368 zmc_m7[3723].DB2-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_ffmpeg_camera.cpp/215 [OpenFfmpeg called.]
11/20/15 18:49:29.136537 zmc_m7[3723].DB2-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_ffmpeg_camera.cpp/237 [Number of Options: 2]
11/20/15 18:49:29.136582 zmc_m7[3723].DB2-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_ffmpeg_camera.cpp/245 [set option 1 'rtsp_transport' to 'tcp']
11/20/15 18:49:29.136599 zmc_m7[3723].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_ffmpeg_camera.cpp/254 [Calling avformat_open_input]
11/20/15 18:49:29.172924 zmc_m7[3723].ERR-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_ffmpeg_camera.cpp/264 [Unable to open input rtsp://jplx:mypwd@192.168.1.28:88/VideoMain due to: Broken pipe]
11/20/15 18:49:29.257054 zmc_m7[3723].DB2-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_ffmpeg_camera.cpp/374 [CloseFfmpeg called.]
11/20/15 18:49:29.257106 zmc_m7[3723].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_ffmpeg_camera.cpp/434 [Sleeping 10 seconds before reopening stream.]
What is interesting is that I can see the video with the remote http method (remote path = cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=jplx&pwd=mypwd). However, I cannot see the video if using the remote rtsp shown in issue #734 of the github forum.
So, this issue appears to be related to rtsp (FFMPEG and remote methods not working for some reason).
Cannot get rtsp to work in Fedora 23 with FI9821P camera
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: Cannot get rtsp to work in Fedora 23 with FI9821P camera
Did you let zmrepo install the ffmpeg package onto your system for you, or did you get ffmpeg from somewhere else?
It looks like you have multiple cameras. How many do you have? Is the problem isolated to just this camera?
This is interesting. /dev/shm is your ramdisk, which maxes out by default to half of your physical memory. How much physical memory do you have?11/20/15 18:49:18.206652 zmc_m7[3714].DB1-/home/jplx/rpmbuild/BUILD/ZoneMinder-1.28.1/src/zm_monitor.cpp/522 [Unable to map file /dev/shm/zm.mmap.7 (184321360
It looks like you have multiple cameras. How many do you have? Is the problem isolated to just this camera?
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/
Re: Cannot get rtsp to work in Fedora 23 with FI9821P camera
I have two remote cameras but they were all switched to "none". I also have this FI9821P camera in three versions: remote http, remote ffmpeg, rtsp ffmpeg but only the rtsp ffmpeg was switched to "monitor" for this test. The other two were switched to "none". So, it is a total of five cameras with only one switched to "monitor".
ffmpeg was downloaded from the zmrepo into a local repository (/etc/rpms) and installed by invoking
createrepo /etc/rpms
cd /etc/rpms
dnf install ./ffmpeg.....rpm
Here follows the info about the system (IBM X31) and ffmpeg:
[jplx@localhost bin]$ ./inxi -F
System: Host: localhost.localdomain Kernel: 4.2.6-300.fc23.i686 i686 (32 bit)
Desktop: LXDE (Openbox 3.6.1) Distro: Fedora release 23 (Twenty Three)
Machine: Mobo: IBM model: 2884BRU Bios: IBM version: 1QET36WW (1.04a) date: 06/30/2003
CPU: Single core Intel Pentium M (-UP-) cache: 1024 KB flags: (sse sse2) clocked at 1000.00 MHz
Graphics: Card: Advanced Micro Devices [AMD/ATI] RV100/M6 [Rage/Radeon Mobility Series]
Fedora X.org: 118 drivers: ati,radeon (unloaded: fbdev,vesa) Resolution: 1024x768@60.00hz, 1024x768@60.00hz
GLX Renderer: Mesa DRI R100 (RV100 4C59) DRI2 GLX Version: 1.3 Mesa 11.0.4 (git-ec14e6f)
Audio: Card: Intel 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller driver: snd_intel8x0
Sound: Advanced Linux Sound Architecture ver: k4.2.6-300.fc23.i686
Network: Card-1: Intel 82801DB PRO/100 VE (MOB) Ethernet Controller driver: e100
IF: enp2s8 state: up speed: 100 Mbps duplex: full mac: 00:09:6b:2d:d1:2b
Card-2: Intel PRO/Wireless LAN 2100 3B Mini PCI Adapter driver: ipw2100
IF: wlp2s2 state: up mac: 00:04:23:62:03:72
Drives: HDD Total Size: 120.0GB (5.3% used) 1: id: /dev/sda model: WDC_WD1200VE size: 120.0GB
Partition: ID: / size: 40G used: 4.9G (14%) fs: ext4 ID: /boot size: 477M used: 160M (36%) fs: ext4
ID: /home size: 69G used: 954M (2%) fs: ext4 ID: swap-1 size: 2.15GB used: 0.00GB (0%) fs: swap
RAID: No RAID devices detected - /proc/mdstat and md_mod kernel raid module present
Sensors: None detected - is lm-sensors installed and configured?
Info: Processes: 155 Uptime: 7 min Memory: 564.9/2015.1MB Client: Shell inxi: 1.8.20
[jplx@localhost bin]$ dnf info ffmpeg
Last metadata expiration check performed 0:03:41 ago on Mon Nov 23 08:35:35 2015.
Installed Packages
Name : ffmpeg
Arch : i686
Epoch : 0
Version : 2.8.2
Release : 1.fc23
Size : 2.0 M
Repo : @System
Summary : Digital VCR and streaming server
URL : http://ffmpeg.org/
License : GPLv2+
Description : FFmpeg is a complete and free Internet live audio and video
: broadcasting solution for Linux/Unix. It also includes a digital
: VCR. It can encode in real time in many formats including MPEG1 audio
: and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash.
This is a fresh installation of fedora23-LXDE and only zoneminder and a browser was running.
ffmpeg was downloaded from the zmrepo into a local repository (/etc/rpms) and installed by invoking
createrepo /etc/rpms
cd /etc/rpms
dnf install ./ffmpeg.....rpm
Here follows the info about the system (IBM X31) and ffmpeg:
[jplx@localhost bin]$ ./inxi -F
System: Host: localhost.localdomain Kernel: 4.2.6-300.fc23.i686 i686 (32 bit)
Desktop: LXDE (Openbox 3.6.1) Distro: Fedora release 23 (Twenty Three)
Machine: Mobo: IBM model: 2884BRU Bios: IBM version: 1QET36WW (1.04a) date: 06/30/2003
CPU: Single core Intel Pentium M (-UP-) cache: 1024 KB flags: (sse sse2) clocked at 1000.00 MHz
Graphics: Card: Advanced Micro Devices [AMD/ATI] RV100/M6 [Rage/Radeon Mobility Series]
Fedora X.org: 118 drivers: ati,radeon (unloaded: fbdev,vesa) Resolution: 1024x768@60.00hz, 1024x768@60.00hz
GLX Renderer: Mesa DRI R100 (RV100 4C59) DRI2 GLX Version: 1.3 Mesa 11.0.4 (git-ec14e6f)
Audio: Card: Intel 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller driver: snd_intel8x0
Sound: Advanced Linux Sound Architecture ver: k4.2.6-300.fc23.i686
Network: Card-1: Intel 82801DB PRO/100 VE (MOB) Ethernet Controller driver: e100
IF: enp2s8 state: up speed: 100 Mbps duplex: full mac: 00:09:6b:2d:d1:2b
Card-2: Intel PRO/Wireless LAN 2100 3B Mini PCI Adapter driver: ipw2100
IF: wlp2s2 state: up mac: 00:04:23:62:03:72
Drives: HDD Total Size: 120.0GB (5.3% used) 1: id: /dev/sda model: WDC_WD1200VE size: 120.0GB
Partition: ID: / size: 40G used: 4.9G (14%) fs: ext4 ID: /boot size: 477M used: 160M (36%) fs: ext4
ID: /home size: 69G used: 954M (2%) fs: ext4 ID: swap-1 size: 2.15GB used: 0.00GB (0%) fs: swap
RAID: No RAID devices detected - /proc/mdstat and md_mod kernel raid module present
Sensors: None detected - is lm-sensors installed and configured?
Info: Processes: 155 Uptime: 7 min Memory: 564.9/2015.1MB Client: Shell inxi: 1.8.20
[jplx@localhost bin]$ dnf info ffmpeg
Last metadata expiration check performed 0:03:41 ago on Mon Nov 23 08:35:35 2015.
Installed Packages
Name : ffmpeg
Arch : i686
Epoch : 0
Version : 2.8.2
Release : 1.fc23
Size : 2.0 M
Repo : @System
Summary : Digital VCR and streaming server
URL : http://ffmpeg.org/
License : GPLv2+
Description : FFmpeg is a complete and free Internet live audio and video
: broadcasting solution for Linux/Unix. It also includes a digital
: VCR. It can encode in real time in many formats including MPEG1 audio
: and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash.
This is a fresh installation of fedora23-LXDE and only zoneminder and a browser was running.
- knight-of-ni
- Posts: 2406
- Joined: Thu Oct 18, 2007 1:55 pm
- Location: Shiloh, IL
Re: Cannot get rtsp to work in Fedora 23 with FI9821P camera
Wow, you are running this on a single core, 1GHz Pentium? I'm not sure how far you are going to get.
Since your laptop is so slow, running it in Remote HTTP mode is likely going to be the best option for you... it will certainly be the least cpu intensive.
When you are testing, trying starting zoneminder and just wait a good few minutes. Don't try to open a monitor and just watch the log. It will eventually either show events like "processing at x.xx fps" indicating things are working, or it will produce an error message.
Since your laptop is so slow, running it in Remote HTTP mode is likely going to be the best option for you... it will certainly be the least cpu intensive.
You will not get this camera to work on your hardware, using ffmpeg running 720P@30fps. Set the frame in the camera to its lowest setting and try the source type of ffmepg again. If no dice, then try again at a lower resolution.Mainstream video HD mode - resolution 720P - Bit rate 2M - Frame rate 30
When you are testing, trying starting zoneminder and just wait a good few minutes. Don't try to open a monitor and just watch the log. It will eventually either show events like "processing at x.xx fps" indicating things are working, or it will produce an error message.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
All of these can be found at https://zoneminder.blogspot.com/
Re: Cannot get rtsp to work in Fedora 23 with FI9821P camera
OK. Thank you for the suggestions. I am out of town - it is Thanksgiving week - and will try your recommendations early next week.
Thank you!
Thank you!
Re: Cannot get rtsp to work in Fedora 23 with FI9821P camera
The reason why it did not work with ffmpeg/RTP and Remote/RTSP is that videoMain has to be typed as videoMain. I had typed VideoMain (V upper case). So, for ffmpeg, the source path has to be: rtsp://jplx:mypwd@192.168.1.28:88/videoMain
I verified that, when changed back to rtsp://jplx:mypwd@192.168.1.28:88/VideoMain it does not work (broken pipe error in the log).
For Remote/RTSP, the Remote Host Path has to be /videoMain and not /VideoMain.
With my old X31 laptop, it is not necessary to lower the picture definition (1280x720 with 32-bit color is fine). It is not necessary either to lower the frame rate. I had installed Fedora 23 with LXDE to have a "light" system but am not sure whether LXDE helps when running zoneminder with ffmpeg.
As additional info, I installed the same latest zoneminder (from repozoneminder) on two other laptops (IBM X60S and Apple Macbook Pro) running Fedora 23 and 22 respectively and there was no issue to see the video from the FI9821P camera.
I verified that, when changed back to rtsp://jplx:mypwd@192.168.1.28:88/VideoMain it does not work (broken pipe error in the log).
For Remote/RTSP, the Remote Host Path has to be /videoMain and not /VideoMain.
With my old X31 laptop, it is not necessary to lower the picture definition (1280x720 with 32-bit color is fine). It is not necessary either to lower the frame rate. I had installed Fedora 23 with LXDE to have a "light" system but am not sure whether LXDE helps when running zoneminder with ffmpeg.
As additional info, I installed the same latest zoneminder (from repozoneminder) on two other laptops (IBM X60S and Apple Macbook Pro) running Fedora 23 and 22 respectively and there was no issue to see the video from the FI9821P camera.