RasPipC - Cameras on your TV made Easy.

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,666
Reaction score
14,005
Location
USA
I have a dumb question. Can this be used to overlay video streams over something else?

I have this bedside display but it can't achieve good frame rates in firefox (a.k.a. iceweasel) when streaming jpegs even on a Pi 3. I'm trying to see if I have a better option than to throw a bigger computer at the job.

 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
omxplayer can overlay other videos with transparency on top of others.. might be able to do text, can probably do a red filter no problem.. when my alarm system arms or disarms I have a 30s countdown video that is displayed with 60% transparency over my normal grid of video cams.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,666
Reaction score
14,005
Location
USA
I've seen the opacity filter in the documentation, but nothing indicating that I could achieve a red filter without modifying source code (even then, I bet it isn't just going to give me an array of RGB color values to play with). I looked into dropping the green and blue color channels at a system-wide level but didn't come up with anything there either. I'm not too concerned about the red filter because when using a VA panel at 0% brightness didn't dim the black level as much as I wanted, I put four layers of red cellophane (giftwrap, lol) over the screen, and this blocks most non-red light anyway. Makes it glossy as hell but that is no problem in a dark bedroom.
 

bob2701

Getting comfortable
Joined
Jan 7, 2016
Messages
1,009
Reaction score
482
Location
Jersey Shore
I have 2 new monitors and a Raspberry Pi3 I just got w/my yearly bonus.. setting the lab up for this project now.

I have a few more summer projects to finish up, but this is at the top of my list.. I'll dive back into it here in November hopefully.

Ive done a tiny amount of work on it off and on throughout the summer, fixed a few big bugs that were in my way and its nearly functional.. mostly cleanup work and a little bit of functionality left.
Any progress?
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
none what so ever; sitting in ICU @ Cancer Treatment Centers of America in Tulsa watching over my mother... and I have another kid on the way; aint life grand.
 

wantafastz28

Getting comfortable
Joined
Nov 18, 2016
Messages
550
Reaction score
253
Location
Phoenix, az
none what so ever; sitting in ICU @ Cancer Treatment Centers of America in Tulsa watching over my mother... and I have another kid on the way; aint life grand.

Sorry to hear about your mother, glad she is in a good hospital/center though.
 

bob2701

Getting comfortable
Joined
Jan 7, 2016
Messages
1,009
Reaction score
482
Location
Jersey Shore
none what so ever; sitting in ICU @ Cancer Treatment Centers of America in Tulsa watching over my mother... and I have another kid on the way; aint life grand.
So sorry to hear about your Mom, best wishes.
Congrats on the up coming arrival.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,666
Reaction score
14,005
Location
USA
I couldn't get raspIPC working in its current state last night, and it turned out my pi's software was too old to run nayr's modified omxplayer. So I ended up wiping and installing the latest Raspbian PIXEL. I familiarized myself with omxplayer and decided it wouldn't be too much trouble to build a crude app of my own to manage a raspberry pi as a camera display.



I think this screenshot is pretty self-explanatory. This web interface lets me configure as many omxplayer processes as I want just by editing their command line arguments. If any omxplayer process stops for any reason, it gets restarted automatically. Pretty basic stuff. It runs perfectly stable on my Pi 2.

If anyone wants a copy of this program, I'd be happy to share it, but I won't be developing it further. For a nicer user experience, we'll just have to wait for raspIPC to be done.
 
Last edited:

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,666
Reaction score
14,005
Location
USA
I have attached the program I was talking about in the previous post, which I've called OmxPlayerAuto. You don't need the zip labeled SourceCode unless you want to modify the program's source code.

Installation instructions


Prerequisites

I recommend you use a recent version of the Raspbian operating system, and have it configured to boot directly to the desktop without requiring authentication.

You need the mono runtime to be installed. You can install it by opening a terminal window and entering the following command:
Code:
sudo apt-get install mono-complete
Installation

1) Create a new folder to contain the program files. e.g. "/home/pi/omxplayerauto"
2) Download or copy an OmxPlayerAuto release to this new folder.
3) Open a terminal in the folder (one way to do this is through the menu: Tools > Open Current Folder in Terminal)
4) Run the unzip command (adjust file name as necessary):
Code:
unzip OmxPlayerAuto_1.1.zip
5) Start OmxPlayerAuto.exe with this command:

Code:
sudo mono OmxPlayerAuto.exe
At this point, the program should start its embedded web server and wait for you to configure it.
6) Enter your Raspberry Pi's IP address into any web browser on your network. If you don't know how to find your Pi's IP address, google it.

If all goes well you should get an ugly web page that looks like this:


Starting the program automatically when the pi boots up

There are many ways to do this. I'll show you how I do it on my system.

1) Create a new empty file called "start.sh". This can go anywhere, in your home directory perhaps. For this example, we'll put it in "/home/pi/omxplayerauto".

2) Open start.sh in a basic text editor (Right click the start.sh file and choose Text Editor or LeafPad or whatever you've got). Enter the following content, then close and save the file.
Code:
cd /home/pi/omxplayerauto
mono OmxPlayerAuto.exe
3) Give yourself Execute permission for start.sh. One way to do this is to right click the file and go to Properties, Permissions tab, and allow Anyone to Execute the file.

4) Next, we create an autostart directive in "/home/pi/.config/autostart/". In Linux, file and folder names starting with a period are hidden, so we need to show hidden objects first. In a file explorer window, click on the View menu, then click Show Hidden.

5) Now navigate to "/home/pi/.config/autostart/". If the autostart folder does not exist, you must create it yourself.

6) Create a new empty file here and name it "OPA.desktop". (any file name should be fine, but I think it needs to end in ".desktop")

7) Open the file in a basic text editor, and enter the content:
Code:
[Desktop Entry]
Type=Application
Name=OmxPlayerAuto
Exec=lxterminal --command="sudo /home/pi/omxplayerauto/start.sh" --title="OmxPlayerAuto"
Terminal=false
Close and save the file.

8) Reboot the pi, and shortly after the desktop appears, a terminal window should open and start OmxPlayerAuto.

.....

And now I know why nayr wants to distribute raspIPC as a disk image.

You can download releases of my gimpy OmxPlayerAuto app from github: bp2008/OmxPlayerAuto
 
Last edited:

nogi

Young grasshopper
Joined
Feb 9, 2017
Messages
93
Reaction score
8
Wow, looks like an awesome project. I might have to dig out one of my old Pi's and play around with this. I assume it's only the newer pi3 that people are having issues with rather than the newer/update OS on them (pi2 or 3)?
 

nogi

Young grasshopper
Joined
Feb 9, 2017
Messages
93
Reaction score
8
I have 2 new monitors and a Raspberry Pi3 I just got w/my yearly bonus.. setting the lab up for this project now.

I have a few more summer projects to finish up, but this is at the top of my list.. I'll dive back into it here in November hopefully.

Ive done a tiny amount of work on it off and on throughout the summer, fixed a few big bugs that were in my way and its nearly functional.. mostly cleanup work and a little bit of functionality left.
@nayr, any progress with getting some time to spend on this?
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
work is slowing down but the wife's still preggo and cant be neglected and treated like a machine.. she's far too illogical for me to get my head into code
 

Tiger Tony

n3wb
Joined
Apr 12, 2017
Messages
6
Reaction score
0
Location
Oxford , UK
I have attached the program I was talking about in the previous post, which I've called OmxPlayerAuto. You don't need the zip labeled SourceCode unless you want to modify the program's source code.

Installation instructions


Prerequisites

I recommend you use a recent version of the Raspbian operating system, and have it configured to boot directly to the desktop without requiring authentication.

You need the mono runtime to be installed. You can install it by opening a terminal window and entering the following command:
Code:
sudo apt-get install mono-complete
Installation

1) Create a new folder to contain the program files. e.g. "/home/pi/omxplayerauto"
2) Download or copy OmxPlayerAuto_1.0.zip to this new folder.
3) Open a terminal in the folder (one way to do this is through the menu: Tools > Open Current Folder in Terminal)
4) Run the unzip command:
Code:
unzip OmxPlayerAuto_1.0.zip
5) Start OmxPlayerAuto.exe with this command:

Code:
sudo mono OmxPlayerAuto.exe
At this point, the program should start its embedded web server and wait for you to configure it.
6) Enter your Raspberry Pi's IP address into any web browser on your network. If you don't know how to find your Pi's IP address, google it.

If all goes well you should get an ugly web page that looks like this:
Hi,

As a complete novice to Raspberry and Linux, but have managed to install and run satisfactory another ip camera program ( github.com/SvenVD/rpisurv), I now thought I'd try yours.
But I'm having a few problems with your program. I was wondering if you can help me at all.

I've managed to upload the latest Raspian os, and downloaded Mono. I've also downloaded your OmxPlayerAuto_1.0 image and unzipped it, but when I go to run (from your instructions line 5) I get the following messages :-


pi@raspberrypi:~/omxplayerauto $ sudo mono OmxPlayerAuto.exe
Can't find custom attr constructor image: /home/pi/omxplayerauto/BPUtil.dll mtoken: 0x0a000001 due to: Could not load file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. assembly:System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 type:<unknown type> member:<none>
OmxPlayerAuto will listen on port 80, configurable in OPA_Settings.cfg
14/04/2017 17:31:06
Starting Service.

Unhandled Exception:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00017] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00031] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
at System.Threading.ThreadHelper.ThreadStart () [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
Type "exit" to close
[ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
File name: 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00017] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x0008d] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00031] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0
at System.Threading.ThreadHelper.ThreadStart () [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0


Any help would be appreciated

Tony
 
Last edited by a moderator:

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,666
Reaction score
14,005
Location
USA
It sounds like mono did not install correctly. Did you specifically install the "mono-complete" package?
 
Top