Comments (10)
from displaycameras.
Hey Andy,
thanks for reaching out
Here's the layout.conf.default
# This is the camera feed/windows layout configuration file for the
# displaycameras service. It ONLY configures the layout and feeds for
# the cameras; the rest of the configuration is in displaycameras.conf.
# See the comments in that file for notes on configuring the below.
# This example defines seven 1/2-HD windows, three of which are off-screen to the right,
# through which the service rotates six camera feeds (it actually uses only six windows)
# on a full-HD monitor. If this suites your needs, modify only the camera names to taste
# and feed URLs to what your cameras or NVR provides.
# Window names
# 2x2 screen with 3 off-screen windows
windows=(upper_left upper_right lower_left lower_right)
# Make sure to account for each window above in the list below.
# Windows positions
window_positions=(
#First Row
#upper_left
# 960x540
"0 0 719 449" \
#upper_right
# 960x540
"720 0 1439 449" \
#Second Row (missing all but the far right window because large_left is double size
#lower_left
# 960x540
"0 450 719 899" \
#lower_right
# 960x540
"720 450 1439 899" \
#off-screen
# 960x540 window just off-screen to the right
"1920 0 2879 539" \
# 960x540 window just below the other
"1920 540 2879 1079" \
# 960x540 window just off-screen to the left
"2880 0 3839 539" \
)
# Camera Names
camera_names=(NE SE South SW )
# Make sure to account for each camera above in the list of feeds below.
# Camera Feeds
camera_feeds=( \
# Mid-Res if your RPi can handle the load
# "rtsp://xxx.xxx.xxx.xxx/yyyyy_1" \
# Low-Res otherwise
# "rtsp://xxx.xxx.xxx.xxx/yyyyy_2" \
#Front Door
"rtsp://username:[email protected]:554/cam/realmonitor?channel=1&subtype=1" \
#Driveway
"rtsp://username:[email protected]:554/cam/realmonitor?channel=2&subtype=1" \
#Side Door
"rtsp://username:[email protected]:554/cam/realmonitor?channel=3&subtype=1" \
#Street View
"rtsp://username:[email protected]:554/cam/realmonitor?channel=6&subtype=1" \
#West
"<Camera stream URL>" \
#Vestibule
"<Camera stream URL>" \
)
# Are we rotating cameras through the window matrix? (default false if not set here)
# rotate="true"
output of the sudo /usr/bin/displaycameras status
pi@raspberrypi:~ $ sudo /usr/bin/displaycameras status
NE is Playing rtsp://username:[email protected]:554/cam/realmonitor?channel=1&subtype=1
at 15485sec
SE is Playing rtsp://username:[email protected]:554/cam/realmonitor?channel=2&subtype=1
at 15726sec
South is Playing rtsp://username:[email protected]:554/cam/realmonitor?channel=3&subtype=1
at 15720sec
SW is Playing rtsp://username:[email protected]:554/cam/realmonitor?channel=6&subtype=1
at 15713sec
from displaycameras.
I'm having the same problem, it freezes every 2 hours. My setup is exacly the same as Nicarlo. Using a LOREX NVR with same type of rtsp stream. If I do a restart everything is good for another couple hours. Stream is at low res H.264 352x240 512kbps....i've tried multiple resolutions with the same result.
from displaycameras.
from displaycameras.
the sudo /usr/bin/displaycameras status
command returned results that were being incremented every time i would run the command.
After reading your post I started instead focusing my attention on omxplayer. After making changes to the resolution of the substream on the NVR, the feeds started playing again without me having to restart the session.
@chienlaid try playing around with the resolution on your lorex NVR and let us know if this also fixes your issue
from displaycameras.
A little update on this.
I must have spoken to soon because the issue started happening again but this time after a longer time.
I did ran the following command directly to get a log output of the omxplayer instance for a single feed.
sudo omxplayer --no-keys --fps 30 --refresh --video_queue 4 --avdict rtsp_transport:tcp "rtsp://username:[email protected]:554/cam/realmonitor?channel=1&subtype=2" --live -n -1 --timeout 0 -g
As @Anonymousdog mentioned his script is only a wrapper to make it easier to manage the omxplayer so I am convinced this is an issue with the omxplayer.
For those interested here is the last few lines of the log output before the feed freezes
23:22:23 T:18446744071756935099 DEBUG: Normal M:7352767473 (A:0 V:47459890844) P:0 A:-7352.77 V:40107.12/T:0.70 (0,0,1,1) A:0% V:99% (0.00,0.00)
23:22:23 T:18446744071756935183 DEBUG: OMXClock::OMXSetSpeed(1.01) pause_resume:0
23:22:23 T:18446744071756935226 DEBUG: OMXClock::OMXSetSpeed(1.01) pause_resume:1
23:22:23 T:18446744071756935609 DEBUG: Live: 40109.27 (40107.12) S:1.010 T:0.70
23:22:23 T:18446744071756956109 DEBUG: Normal M:7352788690 (A:0 V:47459890844) P:0 A:-7352.79 V:40107.10/T:0.70 (0,0,1,1) A:0% V:99% (0.00,0.00)
23:22:23 T:18446744071756956193 DEBUG: OMXClock::OMXSetSpeed(1.01) pause_resume:0
23:22:23 T:18446744071756956237 DEBUG: OMXClock::OMXSetSpeed(1.01) pause_resume:1
23:22:23 T:18446744071756956617 DEBUG: Live: 40109.25 (40107.10) S:1.010 T:0.70
23:22:23 T:18446744071756966868 DEBUG: OMXClock::OMXStop
23:22:23 T:18446744071756978203 DEBUG: OMXThread::Run - Exited thread with id -1389367616
23:22:23 T:18446744071756978746 DEBUG: OMXThread::StopThread - Thread stopped
23:22:23 T:18446744071756990474 DEBUG: COMXCoreComponent::Deinitialize : OMX.broadcom.video_scheduler handle 0xac900b40
23:22:23 T:18446744071757010371 DEBUG: COMXCoreComponent::Deinitialize : OMX.broadcom.video_decode handle 0xb4e860
23:22:23 T:18446744071757012491 DEBUG: COMXCoreComponent::Deinitialize : OMX.broadcom.video_render handle 0xac900688
23:22:23 T:18446744071757013160 ERROR: COMXPlayer::interrupt_cb - Timed out
23:22:23 T:18446744071757020050 DEBUG: COMXCoreComponent::Deinitialize : OMX.broadcom.clock handle 0xb5a090
Additionally I wanted to rule out that it wasnt an issue with my NVR so I initiated a stream from another computer using VLC and left it running overnight. When I returned the stream was still working properly which furthers my thinking that its an issue with omxplayer.
Lastly, I had a raspberry pi 4 4GB version laying around so I loaded that unit with raspbian lite and went through the installation of the displaycamera script and copied the old layout.default configuration to this unit. After some time, I still continue get a frozen feed.
some poking around on the omxplayer github issue page I've come across quite a few threads with people reporting similar issues.
I've listed some of them below but have not yet tried them all
https://stackoverflow.com/questions/37053495/omxplayer-freezes-when-playing-video
I will continue troubleshooting this issue and will let you know what I do find.
from displaycameras.
Alright another update on this.
The current maintainer of omxplayer is sayingthat omxplayer will be depreciated over vlc
see popcornmix/omxplayer#752 (comment)
Now I did try running the same rtsp stream over vlc and I had no issues with it.
@Anonymousdog , any plans to do the same as you did for omxplayer with vlc?
from displaycameras.
from displaycameras.
@Nicarlo - Have you had any luck since tinkering with this back in Feb? I am experiencing the same issue you described above. The image freezes and it takes a restart of the service to get it back online.
sudo systemctl restart displaycameras.service
-
If I run a system status, it says the stream is running and the # of seconds continue to increase if I keep running the status
-
If I look at network activity, it still looks the PI is pulling the stream
-
If I try to repair the status it does NOT resolve the is.
-
If I kill omxplayer, and then run the repair, this does solve this issue - Is this the same thing as restarting the service?
sudo killall omxplayer.bin
sudo /usr/bin/displaycameras repair
-
I have tried this with a single camera, full-screen stream on a 800x480 screen.
-
I have also tried this with a 4 Camera (2x2) stream, one the same 800x480 screen.
I have yet to try tinkering with any of the timing settings, could those make a difference?
I currently have a cron job that just restarts the service every 30 minutes. But I still seem to catch the stream frozen from time to time.
@Anonymousdog - Thank you for taking the time to put this together. It is a very neat solution. I would be very interested if you do the same with VLC.
from displaycameras.
@AnonWSU86 I ended up settling for a single stream on vlc. Vlc does have the ability to do something similar however their documentation has gaps in it and no one appears to know how to get it working.
As @Anonymousdog mentioned this isn’t an issue with displaycameras but instead an issue with the omxplayer that it uses. I did check out their gitlab and omxplayer will eventually get depreciated for vlc so there are no plans for them to put out a fix for it.
from displaycameras.
Related Issues (20)
- Wont feed on boot HOT 8
- 14 Camera setup Cameras showing in the past HOT 3
- Displaycamera does not work after fresh installation HOT 4
- displaycameras not working after upgrading to bullseye HOT 3
- Service saying that its playing stream but nothing showing HOT 3
- Flicking Screen HOT 3
- Error while loading HOT 5
- Can I access displaycamera output via my network? HOT 1
- Screen is flickering when adding a 5th camera to off screen HOT 2
- Audio from one. camera
- displaycameras service not starting HOT 3
- Camera feed appears zoomed in
- Camera not display video HOT 6
- Cameras Wont playback HOT 6
- Does the layout example file need to be moved to main folder?
- Stuck HOT 1
- audio
- *SOLVED* - rtsp streams not displaying
- [SUGGESTION] revive by inspiring from other open projects HOT 3
- losing the rtsp stream HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from displaycameras.