RasPipC - Cameras on your TV made Easy.

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,681
Reaction score
14,043
Location
USA
My own set of commands is almost identical. I just used different layer numbers for each of them. I run 7 cams on a pi 2, however some of them are super small streams while at least one is 1280x720.
 

Jmtyra

Young grasshopper
Joined
Nov 10, 2016
Messages
47
Reaction score
10
Location
Texas
I'll try modifying the layer numbers, didn't think (or notice) that previously. I'm not all that certain about the command options with Omxplayer and should probably read up on the syntax.

7 on a RPi2? That's not bad, even with the variety of stream sizes. Worse case I can get another monitor and RPi to show more streams. Still much cheaper than a whole other desktop just to display security cameras.
 

nogi

Young grasshopper
Joined
Feb 9, 2017
Messages
93
Reaction score
8
OK finally got around to looking at this. Are you guys running this on the desktop Raspian OS on the pi or the streamlined CLI only OS?

I'm command line only version and can't get it to autostart the web service. Manual load is fine. Still have to configure the cameras.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,681
Reaction score
14,043
Location
USA
OK finally got around to looking at this. Are you guys running this on the desktop Raspian OS on the pi or the streamlined CLI only OS?

I'm command line only version and can't get it to autostart the web service. Manual load is fine. Still have to configure the cameras.
Some autostart methods work specifically with the GUI and won't work with a CLI-only installation. Try adding the startup command to rc.local instead.

Code:
sudo nano /etc/rc.local
Five Ways to Run a Program On Your Raspberry Pi At Startup
 

nogi

Young grasshopper
Joined
Feb 9, 2017
Messages
93
Reaction score
8
Ok i must be doing something wrong with my syntax:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

sudo /home/pi/omxplayerauto/start.sh

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi

exit 0




Error:
pi@raspberrypi:~ $ systemctl status rc-local.service
● rc-local.service - /etc/rc.local Compatibility
Loaded: loaded (/lib/systemd/system/rc-local.service; static; vendor preset: enabled)
Drop-In: /lib/systemd/system/rc-local.service.d
└─debian.conf
/etc/systemd/system/rc-local.service.d
└─ttyoutput.conf
Active: failed (Result: exit-code) since Sat 2018-10-27 03:54:54 UTC; 1min 26s ago
Process: 692 ExecStart=/etc/rc.local start (code=exited, status=1/FAILURE)

Oct 27 03:54:50 raspberrypi systemd[1]: Starting /etc/rc.local Compatibility...
Oct 27 03:54:50 raspberrypi sudo[693]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/home/pi/omxplayerauto/start.sh
Oct 27 03:54:50 raspberrypi sudo[693]: pam_unix(sudo:session): session opened for user root by (uid=0)
Oct 27 03:54:54 raspberrypi rc.local[692]: [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
Oct 27 03:54:54 raspberrypi rc.local[692]: at OmxPlayerAuto.Program.Main (System.String[] args) [0x000c1] in <a37d2292889c489eac85461f43134450>:0
Oct 27 03:54:54 raspberrypi sudo[693]: pam_unix(sudo:session): session closed for user root
Oct 27 03:54:54 raspberrypi systemd[1]: rc-local.service: Control process exited, code=exited status=1
Oct 27 03:54:54 raspberrypi systemd[1]: Failed to start /etc/rc.local Compatibility.
Oct 27 03:54:54 raspberrypi systemd[1]: rc-local.service: Unit entered failed state.
Oct 27 03:54:54 raspberrypi systemd[1]: rc-local.service: Failed with result 'exit-code'.
Warning: rc-local.service changed on disk. Run 'systemctl daemon-reload' to reload units.
 

nogi

Young grasshopper
Joined
Feb 9, 2017
Messages
93
Reaction score
8
mmmmm manually running it throws some errors as well:

Exception thrown at 27/10/2018 04:05:32
System.ComponentModel.Win32Exception (0x80004005): Cannot find the specified file
at System.Diagnostics.Process.StartWithShellExecuteEx (System.Diagnostics.ProcessStartInfo startInfo) [0x00129] in <bd46d4d4f7964dfa9beea098499ab597>:0
at System.Diagnostics.Process.Start () [0x00038] in <bd46d4d4f7964dfa9beea098499ab597>:0
at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
at System.Diagnostics.Process.Start (System.Diagnostics.ProcessStartInfo startInfo) [0x0001e] in <bd46d4d4f7964dfa9beea098499ab597>:0
at System.Diagnostics.Process.Start (System.String fileName, System.String arguments) [0x00007] in <bd46d4d4f7964dfa9beea098499ab597>:0
at OmxPlayerAuto_OmxManager.StartProcess () [0x00031] in <a37d2292889c489eac85461f43134450>:0
at OmxPlayerAuto_OmxManager.RestartProcess () [0x00006] in <a37d2292889c489eac85461f43134450>:0
at OmxPlayerAuto_OmxManager.BackgroundWork () [0x00003] in <a37d2292889c489eac85461f43134450>:0
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,681
Reaction score
14,043
Location
USA
I just don't know linux well enough to know what is wrong or what needs to change. Sorry.
 

Jmtyra

Young grasshopper
Joined
Nov 10, 2016
Messages
47
Reaction score
10
Location
Texas
*7/24/19 update*
While the RPi works wonderfully with Omxplayer, I cannot get it to work on the second monitor. I tried every combination of --display n that I could think of without success. Normal desktop graphics work normally on the primary and secondary monitor. I also tried an x,y range outside of the primary monitor that would put it on the secondary monitor and that was unsuccessful also.

I'll keep tinkering with it next week but it's going on the shelf for now. The 'old' setup of 2x RPi3s work great! ;)

*7/23/19 update*

PSA: The RPi4 works great with OmxPlayerAuto, just don't forget to set your memory split! The current version of Raspbian as of this post has a default of 64mb for the GPU. I'll post additional updates if anything useful comes up.

*Original Post*
PSA: I tested OmxPlayerAuto on a RPi4 and for some reason it won't play more than 4 streams at a time (in my 3x3 configuration). Not sure if it's because of the different GPU/software or what but wanted to share in case anyone has a similar issue. My old RPi3 boards still work OK with the same config.

I'm happy to provide log/debug output for anyone that is curious.
 
Last edited:

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,681
Reaction score
14,043
Location
USA
@Jmtyra Maybe your RPi4 doesn't have as much memory allocated to the video device? I really have no idea how OmxPlayer works internally; only that it accesses the pi's hardware video decoder. Enough people use pi for video walls that I'm sure if there is a widespread problem it will get figured out sooner or later.
 

Jmtyra

Young grasshopper
Joined
Nov 10, 2016
Messages
47
Reaction score
10
Location
Texas
That's a good point on the GPU setting, I don't recall changing that after the initial install of the OS and might be the issue. I'll try that tomorrow. :)
 

Jmtyra

Young grasshopper
Joined
Nov 10, 2016
Messages
47
Reaction score
10
Location
Texas
*DING* *DING* *DING* We have a winner! @bp2008 That was exactly it, the setting was at the default 64mb. I should have checked that first!!! :eek: After changing that it worked flawlessly. I'll update the earlier thread for anyone else who might come across this or when they're considering a RPi4 for their setup. :)
 

Jmtyra

Young grasshopper
Joined
Nov 10, 2016
Messages
47
Reaction score
10
Location
Texas
Another update to my original post regarding the secondary monitor. That said, the RPi4 seems faster all around, even with this issue.
 
Top