Anonymousdog / displaycameras

System for displaying RTSP feeds from IP cameras on the Raspberry Pi
Apache License 2.0
566 stars 113 forks source link

New features and updates #36

Closed fctr closed 4 years ago

fctr commented 4 years ago

I made 2 changes in the script that do the following:

  1. Replaced fbset with tvservice. tvservice uses actual HDMI output settings
...
# If enabled, autodetect display mode, check for layout config file for that
# mode, and load that file if present.
if [ "$displaydetect" = "true" ]; then
        if [ "`grep disable_overscan /boot/config.txt | egrep -v ^#`" = "disable_overscan=1" ]; then
                # This is what I'm talking about
                mode="`tvservice -s | sed 's/.*\], //' | sed 's/ @ .*//'`"
                if [ -r /etc/displaycameras/layout.conf.$mode ]; then
                        . /etc/displaycameras/layout.conf.$mode
                        displaydetectactive=true
...
  1. Added option force4x4 to calculate and automatically use four windows equally divided on the current output screen.
...
else
        . /etc/displaycameras/layout.conf.default
fi

if [ "$force4x4" = "true" ]; then
        mode="`tvservice -s | sed 's/.*\], //' | sed 's/ @ .*//'`"
        vwidth="`echo $mode | sed 's/x.*//'`"
        vheight="`echo $mode | sed 's/.*x//'`"
        vwidthhalf="`expr $vwidth / 2`"
        vheighthalf="`expr $vheight / 2`"
window_positions=(
"0 0 $vwidthhalf $vheighthalf" \
"$vwidthhalf 0 $vwidth $vheighthalf" \
"0 $vheighthalf $vwidthhalf $vheight" \
"$vwidthhalf $vheighthalf $vwidth $vheight" \
)
fi
...
ptrtw commented 4 years ago

may I ask which file to look for and I can add this script?

fctr commented 4 years ago

Yes.  Hold off for a few, because I'm adding one or two more features. I will email you the entire file when I'm ready.---=> Andrew BurnsSent from the deepest, darkest reaches of my universe. Pretty neat, huh? -------- Original message --------From: ptrtw notifications@github.com Date: 1/8/20 3:40 AM (GMT-05:00) To: Anonymousdog/displaycameras displaycameras@noreply.github.com Cc: fctr github@fctr.net, Author author@noreply.github.com Subject: Re: [Anonymousdog/displaycameras] New features and updates (#36) may I ask which file to look for and I can add this script?

—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or unsubscribe. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/Anonymousdog/displaycameras/issues/36?email_source=notifications\u0026email_token=AOEZ2E32BPISFEUJI5YUUD3Q4WGRJA5CNFSM4KBHBN22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEILTNAA#issuecomment-571946624", "url": "https://github.com/Anonymousdog/displaycameras/issues/36?email_source=notifications\u0026email_token=AOEZ2E32BPISFEUJI5YUUD3Q4WGRJA5CNFSM4KBHBN22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEILTNAA#issuecomment-571946624", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

fctr commented 4 years ago

OK, so here's the final update.

I added a few options to make this a little nicer.

displaycameras.zip

ptrtw commented 4 years ago

thank u sir :)

fctr commented 4 years ago

After letting it run for 24 hours, I noticed I missed one small thing. I'll try to post the fixes today or tomorrow.---=> Andrew BurnsSent from the deepest, darkest reaches of my universe. Pretty neat, huh? -------- Original message --------From: ptrtw notifications@github.com Date: 1/8/20 7:40 PM (GMT-05:00) To: Anonymousdog/displaycameras displaycameras@noreply.github.com Cc: fctr github@fctr.net, State change state_change@noreply.github.com Subject: Re: [Anonymousdog/displaycameras] New features and updates (#36) thank u sir :)

—You are receiving this because you modified the open/close state.Reply to this email directly, view it on GitHub, or unsubscribe. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/Anonymousdog/displaycameras/issues/36?email_source=notifications\u0026email_token=AOEZ2EZCI6EUBZFVB2UF7NDQ4ZXBRA5CNFSM4KBHBN22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIOQEVA#issuecomment-572326484", "url": "https://github.com/Anonymousdog/displaycameras/issues/36?email_source=notifications\u0026email_token=AOEZ2EZCI6EUBZFVB2UF7NDQ4ZXBRA5CNFSM4KBHBN22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIOQEVA#issuecomment-572326484", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

fctr commented 4 years ago

OK, here's the updated "displaycameras" script. Sorry about that...

displaycameras.zip