Read the statement by Michael Teeuw here.
Ghost Overlay / OMXPlayerTransparency
-
@Reotch2 If you’re still shooting for this, I HIGHLY recommend using ffmpeg to convert the clip to .webm format, which was developed for web streaming video — it’s crazy efficient with file size and perfect for this type of thing. If you’ve never used ffmpeg before it can be daunting, but the gist of what you do is ‘’’ffmpeg -i .mp4 -o .webm’’’ and then let it do its thing. It may take some googling to get exactly the settings you want but a basic conversion should do pretty well for you.
Good luck!
-
@pyrosmiley said in Ghost Overlay / OMXPlayerTransparency:
@Reotch2 If you’re still shooting for this, I HIGHLY recommend using ffmpeg to convert the clip to .webm format, which was developed for web streaming video — it’s crazy efficient with file size and perfect for this type of thing. If you’ve never used ffmpeg before it can be daunting, but the gist of what you do is ‘’’ffmpeg -i .mp4 -o .webm’’’ and then let it do its thing. It may take some googling to get exactly the settings you want but a basic conversion should do pretty well for you.
Good luck!
Formatting got messed up on my phone but the ffmpeg command is ffmpeg -i input.mp4 -o output.webm
It should work just fine, I literally did it for my mirror today.
-
@Reotch2
Have you tried to convert your ghost.mp4 to your native screen resolution?
I think the pi will have a hard time to do the scale conversion live.If you dont have the software for it, i can help you out.
-
@pyrosmiley I converted the M4V to .webm using ffmpeg (incredible tool btw). Unfortunately, it’s still super choppy. @Nystro0m in a later post suggested converting it to the native resolution, so that will be the next step. That’ll be my last attempt before I stick with the semi-transparent OMXPlayer. My kid is only 11 months old, so I’ve got a couple years before it needs to be “perfect” to scare the hell out of him.
You guys have been awesome. Thanks for all the continued help.
-
@Reotch2
Is you other widgets also laggy chunky?
Im thinking about the transitions on the RSS module etc. -
@Nystro0m I have minimal transitions on the screen (weather, newsfeed, clock). It looks like there is an occasional hiccup on the newsfeed, but otherwise, no issues. My front door cam is kind of a cluster and naturally clunky because it’s a non-rtsp feed, so I’m stuck doing snapshots every 500ms to give ma a “live” picture. Thinking this may be the culprit, I disabled it in the config.js to verify it wasn’t the one killing the video.
I like where you’re headed though. (top) is showing two electron processes, is that normal? The highest processor abusers are Electron # 1 / Electron # 2 / XORG.
-
@Reotch2 said in Ghost Overlay / OMXPlayerTransparency:
it turns out running the video as a module within electron is super “clunky” on my RPI-3.
What version combination of MM and Electron are you running? We’ve had great success eliminating excessive Electron CPU usage with MM v2.1.0 and Electron v1.4.15 on Pi3 B’s, and just recently, a Pi2 as well.
Obviously, the results are at the end of the topic
https://forum.magicmirror.builders/topic/4684/electron-cpu-usage
-
@Mykle1 said in Ghost Overlay / OMXPlayerTransparency:
What version combination of MM and Electron are you running? We’ve had great success eliminating excessive Electron CPU usage with MM v2.1.0 and Electron v1.4.15 on Pi3 B’s, and just recently, a Pi2 as well.
Obviously, the results are at the end of the topic
https://forum.magicmirror.builders/topic/4684/electron-cpu-usage
Unsure on electron (kinda hard to find a version). But I’m running 2.1.2, and still running Jessie. I should have some more time MUCH later today to tinker. I’ll use the steps on page 15 of that thread for a clean install and report back. Do any of these combinations allow GPU usage within electron? As always, appreciate the help.
-Rich
-
@Reotch2
I got helped with this yesterday from Mykle and i went from 80-100% cpu usage to 2-45% cpu usage.
The biggest difference was by downgrading electron to 1.4.15.
But running MM 2.1.0 instead of 2.1.2 also made a improvement.How to downgrade electron
Navigate to your home folder, from here delete all maps including electron. there should be two:
.electron & .electron-glpyh.
Navigate to you node-modules inside MM.§ cd ~/MagicMirror/node_modules
Uninstall electron by
§ sudo npm uninstall electron
install electron with desired version in this case 1.4.15 by:
§ sudo npm install electron@1.4.15
Now open file manager or navigate to “~/MagicMirror/node_modules/electron” and look in package.json
Here you can confirm your version number of electron.How to downgrade MagicMirror
If you want to downgrade your MM version you will need to make a new install.
I would suggest everyone doing this to NOT delete it BEFORE you have made a backup.You can find MM 2.1.0 here (thanks to Mykle for providing me with link):
https://github.com/MichMich/MagicMirror/archive/v2.1.0.zip.Unpack the zip in you home folder, and rename it to MagicMirror
then just run npm install from the folder.§ cd ~/MagicMirror/ § npm install
Note: You will need to re-install electron 1.4.15 after the clean install of MM 2.1.0.
Make sure to have everything up and running before you do that.I did run the gun and needed to redo everything twice.
-
@Nystro0m So went all out, and did a fresh install of Raspbian Stretch, MM2.1.0 and electron 1.4.15… even with just the default modules and htmlvideo, electron has the CPU pegged at >75% playing the .webm file. The video is slightly less choppy than before, but still not as seamless as OMXPlayer. Do I just have a crappy Pi3? Are there memory, GPU, or overclock settings I’m missing in my pi config file that may help? I’m also running it through PM2… is that causing issues?
Thanks,
Rich