Raspbery Pi2 Camera Monitor w/Rpisurv

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
Might try playing with your audio/video encoding config on the camera.. iirc I had to change my big black face dahua's audio encoding to get it to play.. it did not like whatever format I had it at and just gave a blank display until I tried playing with encoding settings.. I want to say it did not like uLaw but worked fine with PCM, not that I have any speakers hooked up right now but it did throw a wrench in things when I started off.
 

ruppmeister

Getting the hang of it
Joined
Apr 15, 2015
Messages
668
Reaction score
98
I noticed that you said you had H264 on the camera, but your uri path ends with 265. Is that last digit the encode profile you are requesting hence the problem?
 

cball

Young grasshopper
Joined
Jan 31, 2016
Messages
98
Reaction score
18
Location
North Germany
Got it!
Nayr was right - it was the sound encoding.
265 was just a typingerror.
Can you put an stop command, that the RPi can be edited.
Thanks!
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
RPISurv is not mine, someone else wrote it.. but you can stop the video and let you manually restart it without rebooting the entire device.
Code:
killall -9 omxplayer;killall -9 omxplayer.bin
 

klasipca

Banned
Joined
Mar 27, 2014
Messages
3,146
Reaction score
750
Do you think it could handle 8 streams at 5Mp/3mp/1080p 30 fps? I am currently android streaming box running tiny cam pro, but it can only do 5 fps at the most on across 8 streams, instead I use D1 resolution which works fine.
 
Last edited by a moderator:

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
if your going to display 8 streams then D1 is plenty.. You barely have enough pixels to scale up 4xD1 Substreams @ 1080p (1080p in a 2x2 Grid = 960x540 each)

but saying that Ive had a mixture of up to 5 2MP-3MP cameras at full resolution displaying just fine, the problem Ive found with the high resolution streams is they seem to have a bigger buffer and lag farther behind.. the D1 Substreams display with no more latency than SmartPSS does with all the streams, there latency is all consistent and minimal, but my 1080p front door camera is a second or so behind the rest now since its the only main stream I am displaying... havent had a chance to see if I can improve that.. my system is down until i get a new SD card.
 
Last edited by a moderator:

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
got video tearing? yeah thats cause omxplayer RSTP uses UDP.. patched the code so it uses TCP instead and everything displays perfectly..
source of patch : https://github.com/huceke/omxplayer/issues/242#issuecomment-85034375

attached is my prebuilt version for Raspbian Jessie, I'll package it up into a deb here once I do some more hacking/testing.

slowly making this perfect.. yeah
 

Attachments

Last edited by a moderator:

ruppmeister

Getting the hang of it
Joined
Apr 15, 2015
Messages
668
Reaction score
98
This is an image for Raspbian that can be flashed to sd card for pi with omxplayer?


Sent from my iPhone using Tapatalk
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
no its just the pre-compiled omxplayer binary with the patch applied, building omxplayer is a beast..

I'll consider making a ready to roll image once I have a bit more work all buttoned up.. like putting monitor to sleep and my own display app with web config.
 

ruppmeister

Getting the hang of it
Joined
Apr 15, 2015
Messages
668
Reaction score
98
That would be positively the best! I know I have a wall mounted monitor with a pi on the back ready to go.



From the top view:



Sent from my iPhone using Tapatalk
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
just write the Raspbian Jessie minimal image, login as pi/raspberry

Code:
sudo apt-get -y install omxplayer git
git clone https://github.com/SvenVD/rpisurv.git
cd rpisurv
sudo ./install.sh
sudo echo 'gpu_mem=128' >> /boot/config.txt
nano /etc/rpisurv
sudo reboot
then to use my build that forces tcp:
Code:
unzip omxplayer-dist.zip
sudo cp -a omxplayer-dist/* /
sudo reboot
 
Last edited by a moderator:

ruppmeister

Getting the hang of it
Joined
Apr 15, 2015
Messages
668
Reaction score
98
Got through the config but on reboot I get this... Not sure what I did wrong




Sent from my iPhone using Tapatalk
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
looks like you messed up the config,

sudo nano /etc/rpisurv

look at my first post for guidance.. post it up here and i'll sanity check it for yah. wrap it in 'code'

are you using putty and ssh? its much easier than a keyboard.
 

ruppmeister

Getting the hang of it
Joined
Apr 15, 2015
Messages
668
Reaction score
98
Thanks @nayr




Sent from my iPhone using Tapatalk
 
Last edited by a moderator:

ruppmeister

Getting the hang of it
Joined
Apr 15, 2015
Messages
668
Reaction score
98
And I checked my path in VLC and it worked perfectly

And I haven't used putty or ssh before but am looking into it now


Sent from my iPhone using Tapatalk
 

ruppmeister

Getting the hang of it
Joined
Apr 15, 2015
Messages
668
Reaction score
98
The PuTTy thing is sooo much better.

I added the :554 but getting the same error(s) as before when rebooting.

Code:
essentials:
    #These are the rtsp streams you want the program to display
    #The streams will be displayed in the order you present them here
    rtsp_urls:
        #FrontDoor
        - "rtsp://user:pass@192.168.0.204:554/Streaming/Channels/1"


    #How many columns you want the program to use, it will autocalculate the am$
    nr_of_columns: "1"


#These are fallbacks if autodection fails;
#Normally you do not need to configure these
fallbacks:
    resolution:
        width: "1920"
        height: "1080"
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
Once you have ssh runing try this:
Code:
sudo [COLOR=#333333]omxplayer -p --live --timeout 60 -o hdmi 'rtsp://user:pass@192.168.0.204:554/Streaming/Channels/1' --aspect-mode fill[/COLOR]
Since you only have 1 feed that'll be easier to test and see output, bypasses the script all together.. make sure user:pass are really valid credentials too fyi :)
 

ruppmeister

Getting the hang of it
Joined
Apr 15, 2015
Messages
668
Reaction score
98
Code:
[COLOR=#333333]sudo [/COLOR][COLOR=#333333][COLOR=#333333]omxplayer -p --live --timeout 60 -o hdmi 'rtsp://user:pass@192.168.0.204:554/Streaming/Channels/1' --aspect-mode fill[/COLOR][/COLOR]
That is working, but I am getting some tearing and smearing of the image. Still thinking it is my config file for rpisurv?

Edit: I just thought about it... could be that I am wifi on my pi right now as I am still having to hard wire it. So that is prob why the tearing in the feed (I will live with it until I hard wire it).
 

nayr

IPCT Contributor
Joined
Jul 16, 2014
Messages
9,329
Reaction score
5,325
Location
Denver, CO
nope its the UDP problem, now you'll want to transfer that .zip file to the raspberry and run those commands i gave.

I use CyberDuck via SFTP (File transfer over SSH) to transfer files with ease: https://cyberduck.io/
 
Top