<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[MMM-MPlayer - display issue]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I have this issue with MMM-MPlayer, that also has been reported by other users of the module.</p>
<p dir="auto">When using the module, the MPlayer window is seen in the middle of the screen and has a MPlayer title.</p>
<p dir="auto">This is what is running when using the module:</p>
<pre><code>admin@MagicPi3b:~/MagicMirror/modules/MMM-MPlayer $ ps -eaf | grep mplayer | grep -v grep
admin 38919 38729 18 12:17 ? 00:00:01 mplayer -monitoraspect 0  -noborder -vf rotate=-1 -geometry 10:225 -xy 640 -rtsp-stream-over-tcp -vo xv,gl,gl_nosw,vdpau, -nosound rtsp://axisviewer:password@192.168.178.55/axis-media/media.amp?streamprofile=ACC_Low
</code></pre>
<p dir="auto">The value of DISPLAY is: <code>:0</code></p>
<p dir="auto">When I run the same command like this, it is working as expected:</p>
<pre><code>admin@MagicPi3b:~/MagicMirror/modules/MMM-MPlayer $ DISPLAY=:0 mplayer -monitoraspect 0  -noborder -vf rotate=-1 -geometry 10:225 -xy 640 -rtsp-stream-over-tcp -vo xv,gl,gl_nosw,vdpau, -nosound rtsp://axisviewer:password@192.168.178.55/axis-media/media.amp?streamprofile=ACC_Low
</code></pre>
<p dir="auto">The MMM-MPlayer module uses this to start mplayer:</p>
<pre><code>    const env = { ...process.env, DISPLAY: ':0' };
    const mplayerProcess = spawn(`mplayer`,
       [`${mplayerOption}`, `${mplayerOptionValue}`,
        :
        :
        `${stream}`],
        {env: env});
</code></pre>
<p dir="auto">I cannot get my finger behind this and I have no idea why this happens like this.<br />
Any ideas ?</p>
]]></description><link>https://forum.magicmirror.builders/topic/19539/mmm-mplayer-display-issue</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Jul 2026 07:59:58 GMT</lastBuildDate><atom:link href="https://forum.magicmirror.builders/topic/19539.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 16 Mar 2025 12:26:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MMM-MPlayer - display issue on Tue, 18 Mar 2025 15:51:22 GMT]]></title><description><![CDATA[<p dir="auto">To answer myself:</p>
<p dir="auto">I cleaned the array using:</p>
<pre><code>    const mplayerArgumentsArrayFilter = mplayerArgumentsArray.filter(discardEmptyArgument);
    function discardEmptyArgument(value, index, array) {
      return value != '';
    }
</code></pre>
<p dir="auto">Then spawned using that array:</p>
<pre><code>    // Spawn a new mplayer process
    const env = { ...process.env, DISPLAY: ':0' };
    const mplayerProcess = spawn(`mplayer`, mplayerArgumentsArrayFilter, {env: env});
</code></pre>
<p dir="auto">Now it is working correct.</p>
]]></description><link>https://forum.magicmirror.builders/post/125007</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/125007</guid><dc:creator><![CDATA[evroom]]></dc:creator><pubDate>Tue, 18 Mar 2025 15:51:22 GMT</pubDate></item><item><title><![CDATA[Reply to MMM-MPlayer - display issue on Tue, 18 Mar 2025 10:24:53 GMT]]></title><description><![CDATA[<p dir="auto">I found out following:</p>
<p dir="auto">When using</p>
<pre><code>    // Spawn a new mplayer process
    const env = { ...process.env, DISPLAY: ':0' };
    const mplayerProcess = spawn(`mplayer`,
       ['-rtsp-stream-over-tcp',
        '-noborder',
        '-monitoraspect', '0',
        '-vf', 'rotate=-1',
        '-geometry', '5:225',
        '-x', '640',
        '-y', '360',
        'rtsp://axisviewer:password@192.168.178.55/axis-media/media.amp?streamprofile=ACC_Low'],
        {env: env});
</code></pre>
<p dir="auto">The stream is correct on the monitor.</p>
<p dir="auto">When using</p>
<pre><code>    // Spawn a new mplayer process
    const env = { ...process.env, DISPLAY: ':0' };
    const mplayerProcess = spawn(`mplayer`,
       ['',
        '', '',
        '-rtsp-stream-over-tcp',
        '',
        '', '',
        '-noborder',
        '-monitoraspect', '0',
        '-vf', 'rotate=-1',
        '-geometry', '5:225',
        '-x', '640',
        '-y', '360',
        'rtsp://axisviewer:password@192.168.178.55/axis-media/media.amp?streamprofile=ACC_Low'],
        {env: env});
</code></pre>
<p dir="auto">The stream is NOT correct on the monitor (MPlayer window in the center).</p>
<p dir="auto">So the problem is spawning with empty parameters.<br />
When running it from the command line, this is not an issue, as the shell takes care of the empty places between the arguments.</p>
<p dir="auto">I tried with <code>undefined</code> and <code>null</code> iso <code>''</code>but that does not work.</p>
<p dir="auto">Only idea how to solve this ?<br />
Cleaning the array somehow ?</p>
]]></description><link>https://forum.magicmirror.builders/post/124998</link><guid isPermaLink="true">https://forum.magicmirror.builders/post/124998</guid><dc:creator><![CDATA[evroom]]></dc:creator><pubDate>Tue, 18 Mar 2025 10:24:53 GMT</pubDate></item></channel></rss>