Read the statement by Michael Teeuw here.
MMM-MPlayer
-
Here two questions:
1/ What does
streamIntervaldo ?2/ Is it possible to rotate the output ?
I am using my screen in portrait mode and therefore need my RTSP stream to be rotated by 90 degrees.Thanks in advance.
-
@myfingersarecold Nice! It would be cool if you maybe reconsidered and uploaded it to GitHub 👩💻
-
@myfingersarecold Nice! It would be cool if you maybe reconsidered and uploaded it to GitHub 👩💻
In order to encourage and to help you a bit, here a README.md:
# MMM-MPlayer A MagicMirror module that uses MPlayer to display rtsp streams ## Project Status This module is working, but still under development. ## Installation of mplayer ### Verify if mplayer is already installed ```shell $ which mplayer /usr/bin/mplayerInstall mplayer (when not installed yet)
$ sudo apt install -y mplayerInstallation of the MM module
-
In your terminal, change to your Magic Mirror module directory
cd ~/MagicMirror/modules -
Clone this repository
git clone https://github.com/myfingersarecold/MMM-MPlayer -
Make changes to your
config.jsfile.
Config Example
Edit the file
~/MagicMirror/config/config.jsto add or modify the module.{ module: 'MMM-MPlayer', disabled: false, position: "top_left", header: "MPlayer", config: { useTwoWindows: true, layout: 'row', windowSize: { width: 525, height: 295 }, windowPosition: { x: 12, y: 575 }, streamInterval: 30000, streams: { window1: [ 'something_else.mp4', 'something.mp4' ], window2: [ 'rtsp://foo', 'rtsp://bar', ] } } },Configuration Options
Option Description Default useTwoWindowsUse two windows true layoutCan be ‘row’ or ‘column’ row windowSizeWindow size for both windows { width: 525, height: 295 } windowPositionPosition of the first window (window1)
[window2 is either 5px below or to the right of this window, depending on layout]{ x: 12, y: 575 } streamInterval30000 streamswindow1 and / or window2 streams [ mp4 , rtsp ] Test environment
This procedure has been tested on:
- Raspberry Pi 4 Model B Rev 1.5
- Debian GNU/Linux 12 (bookworm)
- Magic Mirror version: 2.30.0
Contributions
Code provided by user ‘myfingersarecold’.
https://forum.magicmirror.builders/user/myfingersarecold -
-
@evroom said in MMM-MPlayer:
Here two questions:
1/ What does
streamIntervaldo ?2/ Is it possible to rotate the output ?
I am using my screen in portrait mode and therefore need my RTSP stream to be rotated by 90 degrees.To answer my own questions:
1/ Cycles the streams defined in window1 and/or window2 after the provided interval (in milliseconds).
Where applicable, the streams will start from the beginning again (for example for mp4 videos).2/ Yes, this is possible using the
-vf rotate=[0-3]option and adjusting thewindowPositionvalues. -
@myfingersarecold said in MMM-MPlayer:
I don’t feel like actually uploading it to github, but here is the source code, and an example config.
I took the liberty to take the provided code, make changes to it and make it available as a public repository:
https://github.com/evroom/MMM-MPlayer
My own main purpose for using it, is to setup a new Raspberry Pi (Raspberry Pi 4 Model B), with Debian 12 (bookworm) and the latest MM version (2.30.0).
Replacing a Pi 3b 32-bit Debian 10 buster setup where OMXPlayer is still working.
I will be using a single window with a single RTSP stream (for an Axis Network Camera).
Nothing fancy.Best regards,
E.J.
-
@evroom Nice! 🚀 Please add it to the module list 🙂
-
-
@evroom you are 100% correct regarding item #1, the streamInterval is for when multiple streams are defined, it will switch between the available streams.
regarding #2 on my pi i didnt have to rotate the mplayer orientation, but i adjusted the output of my pi to portrait and everything behaved but ymmv depending on how it’s setup.
-
@evroom thanks for that. glad its of use to someone 😊
-
@myfingersarecold said in MMM-MPlayer:
I couldnt get the EXT-FreeboxTV module to work on my magic mirror
Out of curiosity what was the issue with it?
I use that module all the time to watch the TV channels of my Enigma2 decoder.
-
@myfingersarecold said in MMM-MPlayer:
regarding #2 on my pi i didnt have to rotate the mplayer orientation, but i adjusted the output of my pi to portrait and everything behaved but ymmv depending on how it’s setup.
Could you please tell me how you do the general rotation to portrait ?
I use the custom.css to get it rotated clockwise.
As MPlayer is an overlay, like OMXPlayer, it is not affected by this.body { : : transform: rotate(-90deg); transform-origin: top left; width: 100vh; height: 100vw; : : }But of course there are more, potential better, ways of getting it rotated.
-
i didnt use this guide to do it, but this is how i rotated my screen.
https://www.makeuseof.com/how-to-rotate-your-raspberry-pi-screen-without-moving-the-display/
I am running the latest version of raspbian on my pi3
this results in my magicmirror instance loading in portrait mode, and my 16x9 streams loading properly where i want them without having to do any CSS rotation.
-
@Cr4z33 no idea but couldn’t get RTSP streams to work.
-
HI, im running my MM on on Proxmox VM and pointing my display to IP on VM, when i try to run Mplayer it just displays black box but no feed, i doo see the feed on the server VM. any ideas how to get this playing on my remote display?
-
@Guku did you expose that port on the vm to another connecting host?
maybe a firewall filter?I don’t use proxmox, but I see this on windows VM’s all the time
-
thanks for checking in with me, i gave up on the player since even when i ran it localy on my VM the camera feed was delayed by about 5sec which defeted the pourpose. thanks anyways!
-
Just a comment
I am using MagicMirror on a pi using bullseye 32bit.
When using a rpi4 everything works fine. When I transfer the sd card to a rpi3 every time the MPlayer shows a live feed the desktop taskbar shows up, when MPlayer is switching between feeds the taskbar is not visible.
This is probably due to my specific choice of settings but just thought it might help someone.
-
@clakkentt if you use my backup/restore to capture your MM config
and build a new card ON the pi3, and install MM and restore the config
do you see the same problem?backup/restore here https://github.com/sdetweil/MagicMirror-backup-restore
install/upgrade here https://github.com/sdetweil/MagicMirror_scripts
-
@sdetweil
Yes the problem is the same. I initially had MM running on a rpi3, when I installed MMM-MPlayer, I noticed the taskbar showing every time there was a feed showing.
I started from scratch on an rpi4 and saw no problem but when I transferred the card to the rpi3 the issue came up again.Since I wanted to keep using the rpi3 for the MagicMirror I solved the problem by making the taskbar 0 pixels in height.
-
@clakkentt what do you mean by taskbar?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login