Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VLC Player issues #33

Closed
anthony6608 opened this issue Jan 4, 2019 · 28 comments
Closed

VLC Player issues #33

anthony6608 opened this issue Jan 4, 2019 · 28 comments

Comments

@anthony6608
Copy link

Thank you again for updating and yes, I chose to go the VLC route :)

Ok, so I decided to create an issue here just to keep things neat and easier to track for anyone in the future having these issues. I apologize in advance for the messy post, Ive been posting all over today, lol.

So initially I was attempting to configure omxplayer but you said there may have been something broken in the master branch so I could either downgrade? or try the new VLC player configuration.

I had a fresh install of Raspbian (Nov 2018) with the latest MagicMirror2. Followed all the instructions from the forum post.

First of all, I know I initially was getting some permission errors when running 'npm install' in the RTSP directory. Also, I have a 4MP Dahua camera, is there a way to stream the highest resolution in the little box on my MagicMirror instead or would this not work and I have to used Sub stream?

The major issues I have noticed while trying to get this to run right:

  • I cannot get the stream to size correctly in the box. I've played with ALL of the height/width settings and there always seems to be a black space on the right side no matter what I do. I was trying to get it from end to end and larger if I could to have a cleaner look.

img_2406

  • MMM-GoogleMapsTraffic: When this module is added to the config, for some reason RTSP shows no video. I can see it attempting to load and can see the box but nothing ever loads. In order for to play I have to comment out or remove GoogleMapsTraffic from the config.js file. RTSP seems to be the only module that I notice an issue with. All other modules seem to play fine with GMT. Please see picture below. I have also attached logs WITH GoogleMapsTraffic enabled and WITHOUT GoogleMapsTraffic enabled just in case it can help decipher what's going on. When GMT is enabled I do notice RTSP doesn't even attempt to start the VLC player:

img_2409

With GoogleMapsTraffic ENABLED (apologize for the lengthiness)

PM2 | Stopping app:MagicMirror id:0
0|MagicMirror | Shutting down server...
0|MagicMirror | Stopping module helper: updatenotification
PM2 | pid=25411 msg=failed to kill - retrying in 100ms
PM2 | App [MagicMirror:0] exited with code [0] via signal [SIGINT]
PM2 | pid=25411 msg=process killed
PM2 | App [MagicMirror:0] starting in -fork mode-
PM2 | App [MagicMirror:0] online
0|MagicMirror | > [email protected] start /home/pi/MagicMirror
0|MagicMirror | > sh run-start.sh
0|MagicMirror | Starting MagicMirror: v2.6.0
0|MagicMirror | Loading config ...
0|MagicMirror | Loading module helpers ...
0|MagicMirror | No helper found for module: alert.
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: updatenotification
0|MagicMirror | No helper found for module: clock.
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: calendar
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: MMM-GoogleMapsTraffic
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: MMM-MyCommute
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: MMM-RTSPStream
0|MagicMirror | No helper found for module: currentweather.
0|MagicMirror | No helper found for module: weatherforecast.
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: newsfeed
0|MagicMirror | All module helpers loaded.
0|MagicMirror | Starting server on port 8080 ...
0|MagicMirror | Server started ...
0|MagicMirror | Connecting socket for: updatenotification
0|MagicMirror | Connecting socket for: calendar
0|MagicMirror | Starting node helper for: calendar
0|MagicMirror | Connecting socket for: MMM-GoogleMapsTraffic
0|MagicMirror | Starting node_helper for module: MMM-GoogleMapsTraffic
0|MagicMirror | Connecting socket for: MMM-MyCommute
0|MagicMirror | ====================== Starting node_helper for module [MMM-MyCommute]
0|MagicMirror | Connecting socket for: MMM-RTSPStream
0|MagicMirror | PM2: Stopping all OMXPlayer Streams...
0|MagicMirror | Connecting socket for: newsfeed
0|MagicMirror | Starting module: newsfeed
0|MagicMirror | Sockets connected & modules started ...
0|MagicMirror | Launching application.
0|MagicMirror | libGL error: MESA-LOADER: failed to retrieve device information
0|MagicMirror | MESA-LOADER: failed to retrieve device information
0|MagicMirror | MESA-LOADER: failed to retrieve device information
0|MagicMirror | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMirror | Create new calendar fetcher for url: http://www.calendarlabs.com/templates/ical/US-Holidays.ics - Interval: 300000
0|MagicMirror | Working notification system. Notification: MMM-GOOGLE_MAPS_TRAFFIC-GET payload: { style: 'black' }
0|MagicMirror | Create new news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000

With GoogleMapsTraffic DISABLED

M2 | Stopping app:MagicMirror id:0
0|MagicMirror | Shutting down server...
0|MagicMirror | Stopping module helper: updatenotification
PM2 | pid=25411 msg=failed to kill - retrying in 100ms
PM2 | App [MagicMirror:0] exited with code [0] via signal [SIGINT]
PM2 | pid=25411 msg=process killed
PM2 | App [MagicMirror:0] starting in -fork mode-
PM2 | App [MagicMirror:0] online
0|MagicMirror | > [email protected] start /home/pi/MagicMirror
0|MagicMirror | > sh run-start.sh
0|MagicMirror | Starting MagicMirror: v2.6.0
0|MagicMirror | Loading config ...
0|MagicMirror | Loading module helpers ...
0|MagicMirror | No helper found for module: alert.
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: updatenotification
0|MagicMirror | No helper found for module: clock.
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: calendar
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: MMM-GoogleMapsTraffic
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: MMM-MyCommute
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: MMM-RTSPStream
0|MagicMirror | No helper found for module: currentweather.
0|MagicMirror | No helper found for module: weatherforecast.
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: newsfeed
0|MagicMirror | All module helpers loaded.
0|MagicMirror | Starting server on port 8080 ...
0|MagicMirror | Server started ...
0|MagicMirror | Connecting socket for: updatenotification
0|MagicMirror | Connecting socket for: calendar
0|MagicMirror | Starting node helper for: calendar
0|MagicMirror | Connecting socket for: MMM-GoogleMapsTraffic
0|MagicMirror | Starting node_helper for module: MMM-GoogleMapsTraffic
0|MagicMirror | Connecting socket for: MMM-MyCommute
0|MagicMirror | ====================== Starting node_helper for module [MMM-MyCommute]
0|MagicMirror | Connecting socket for: MMM-RTSPStream
0|MagicMirror | PM2: Stopping all OMXPlayer Streams...
0|MagicMirror | Connecting socket for: newsfeed
0|MagicMirror | Starting module: newsfeed
0|MagicMirror | Sockets connected & modules started ...
0|MagicMirror | Launching application.
0|MagicMirror | libGL error: MESA-LOADER: failed to retrieve device information
0|MagicMirror | MESA-LOADER: failed to retrieve device information
0|MagicMirror | MESA-LOADER: failed to retrieve device information
0|MagicMirror | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMirror | Create new calendar fetcher for url: http://www.calendarlabs.com/templates/ical/US-Holidays.ics - Interval: 300000
0|MagicMirror | Working notification system. Notification: MMM-GOOGLE_MAPS_TRAFFIC-GET payload: { style: 'black' }
0|MagicMirror | Create new news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000
PM2 | Change detected on path config/config.js for app MagicMirror - restarting
PM2 | Stopping app:MagicMirror id:0
0|MagicMirror | Shutting down server...
PM2 | pid=25866 msg=failed to kill - retrying in 100ms
PM2 | App [MagicMirror:0] exited with code [0] via signal [SIGINT]
PM2 | pid=25866 msg=process killed
PM2 | App [MagicMirror:0] starting in -fork mode-
PM2 | App [MagicMirror:0] online
0|MagicMirror | > [email protected] start /home/pi/MagicMirror
0|MagicMirror | > sh run-start.sh
0|MagicMirror | Starting MagicMirror: v2.6.0
0|MagicMirror | Loading config ...
0|MagicMirror | Loading module helpers ...
0|MagicMirror | No helper found for module: alert.
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: updatenotification
0|MagicMirror | No helper found for module: clock.
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: calendar
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: MMM-MyCommute
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: MMM-RTSPStream
0|MagicMirror | No helper found for module: currentweather.
0|MagicMirror | No helper found for module: weatherforecast.
0|MagicMirror | Initializing new module helper ...
0|MagicMirror | Module helper loaded: newsfeed
0|MagicMirror | All module helpers loaded.
0|MagicMirror | Starting server on port 8080 ...
0|MagicMirror | Server started ...
0|MagicMirror | Connecting socket for: updatenotification
0|MagicMirror | Connecting socket for: calendar
0|MagicMirror | Starting node helper for: calendar
0|MagicMirror | Connecting socket for: MMM-MyCommute
0|MagicMirror | ====================== Starting node_helper for module [MMM-MyCommute]
0|MagicMirror | Connecting socket for: MMM-RTSPStream
0|MagicMirror | PM2: Stopping all OMXPlayer Streams...
0|MagicMirror | Connecting socket for: newsfeed
0|MagicMirror | Starting module: newsfeed
0|MagicMirror | Sockets connected & modules started ...
0|MagicMirror | Launching application.
0|MagicMirror | libGL error: MESA-LOADER: failed to retrieve device information
0|MagicMirror | MESA-LOADER: failed to retrieve device information
0|MagicMirror | MESA-LOADER: failed to retrieve device information
0|MagicMirror | ATTENTION: default value of option force_s3tc_enable overridden by environment.
0|MagicMirror | Create new calendar fetcher for url: http://www.calendarlabs.com/templates/ical/US-Holidays.ics - Interval: 300000
0|MagicMirror | Create new news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000
0|MagicMirror | Starting stream stream1 using VLC with args --width 352 --height 242 -I dummy --no-video-deco --no-embedded-video --video-title=stream1 rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1...
0|MagicMirror | DP2: Running window resizers...
0|MagicMirror | DP2: Running window resizers...

@anthony6608 anthony6608 added the bug label Jan 4, 2019
@shbatm
Copy link
Owner

shbatm commented Jan 4, 2019

To tackle the first problem of half the video showing, do an experiment and delete the two lines in node_helper.js that say undecorate_window();, should be lines 163 and 172. When you restart you should see the VLC title bar. That will tell you if the VLC window is not sized correctly (title bar does not match the width of the box) or if the video inside the window is off.

You can also try adding '--autoscale', to the start of the args array on this line and see if that helps.

I'll look at the traffic module tomorrow.

@shbatm
Copy link
Owner

shbatm commented Jan 4, 2019

MMM-GoogleMapsTraffic: When this module is added to the config, for some reason RTSP shows no video. I can see it attempting to load and can see the box but nothing ever loads. In order for to play I have to comment out or remove GoogleMapsTraffic from the config.js file. RTSP seems to be the only module that I notice an issue with.

Please check the DevTools console (Ctrl+Shift+I on the Mirror's screen) and see if you have any errors. If it's not trying to start the stream then it's never getting a signal from the front-end that its ready to start.

@anthony6608
Copy link
Author

Hi there!

Ok, i just got back to the office. Will spend some time working on this and also the changes you requested to figure out the placement. Will get back to you shortly with updates. Thanks!

@anthony6608
Copy link
Author

anthony6608 commented Jan 4, 2019

MMM-GoogleMapsTraffic: When this module is added to the config, for some reason RTSP shows no video. I can see it attempting to load and can see the box but nothing ever loads. In order for to play I have to comment out or remove GoogleMapsTraffic from the config.js file. RTSP seems to be the only module that I notice an issue with.

Please check the DevTools console (Ctrl+Shift+I on the Mirror's screen) and see if you have any errors. If it's not trying to start the stream then it's never getting a signal from the front-end that its ready to start.

Am I looking for anything specific? When I mentioned I don't see it loading, if you look at the pm2 logs above when GoogleMapsTraffic is enabled with RTSP I don't see VLC trying to load, when GoogleMapsTraffic is disabled I see it load:

0|MagicMirror | Starting stream stream1 using VLC with args --width 352 --height 242 -I dummy --no-video-deco --no-embedded-video --video-title=stream1

The 1 error I see in the console from RTSP module is:

Uncaught TypeError: console.log is not a function
at class.resume (MMM-RTSPStream.js:161)
at setTimeout (MMM-RTSPStream.js:647)

@anthony6608
Copy link
Author

anthony6608 commented Jan 4, 2019

Although GoogleMapsTraffic loads and displays the correct data I am getting the following errors in console:

Uncaught TypeError: Cannot read property (MMM-GoogleMapsTraffic.js:77)
'length of undefined at HTMLScriptElement.script.onload MMM-GoogleMapsTraffic.js:77)

You have included the Google Maps Javascript API multiple times on this page. This may cause unexpected errors. (:121)

@shbatm
Copy link
Owner

shbatm commented Jan 4, 2019

I saw you opened a bug for this on MMM-GoogleMapsTraffic. I'll let them sort it out, but the simplest fix for now looks like it would be to add markers: [], to your MMM-GoogleMapsTraffic config section and see what that does.

@anthony6608
Copy link
Author

I saw you opened a bug for this on MMM-GoogleMapsTraffic. I'll let them sort it out, but the simplest fix for now looks like it would be to add markers: [], to your MMM-GoogleMapsTraffic config section and see what that does.

Yep, the only way I could get it to work was by removing the markers section. Before then I was just get "Loading..." so yeah I don't think that is affecting the RTSP module. Did you get anything from the RTSP error above?

@shbatm
Copy link
Owner

shbatm commented Jan 4, 2019

Actually, that only fixes part of the problem. vicmora/MMM-GoogleMapsTraffic#15 is the real problem child.

Update this line: https://github.com/vicmora/MMM-GoogleMapsTraffic/blob/master/MMM-GoogleMapsTraffic.js#L106 to say: console.log(this.styledMapType);

@anthony6608
Copy link
Author

Ok, added markers: [], and edited line 106 and now my stream is working!!! You got it. Thank you!

Now, on to the last issue of placement. Its still not filling the entire box. I'm going to make the changes you suggested last night and report back.

@anthony6608
Copy link
Author

anthony6608 commented Jan 4, 2019 via email

@anthony6608
Copy link
Author

img_2423

@anthony6608
Copy link
Author

With the undecorate lines commented out, I also added --autoscale arg but it doesn't make a difference. The right edge is still missing :(

@shbatm
Copy link
Owner

shbatm commented Jan 5, 2019 via email

@anthony6608
Copy link
Author

Well, when I updated undecorate lines were re-enabled. I will double check but does that mean every time the mirror restarts I have to comment out undecorated , and manually adjust/resize for it to fit in the box and show full video?

Also; could I execute anything in the args to have it show the full picture? This is a 4PM camera with high resolution but that wouldn't be an issue right? Since the sub stream uses a lower resolution which is what VLC is streaming?

@shbatm
Copy link
Owner

shbatm commented Jan 5, 2019

The commented lines coming back is just because you updated the module. It should stay throughout normal restarts.

It could be that the lower resolution stream is a different aspect ratio. You can try changing the module or stream size in the config.

There may be some vlc command line options you can play with, it should output the VLC command used in the console log... Just play w that without the mirror running.

So when you resize the window it goes to full window? You can try the alternative method for moving windows... Near the undecorate lines there should be a set_window_geometry( line, try set_window_geometry2(

@anthony6608
Copy link
Author

Thanks a lot. So you're saying to close MagicMirror and try to run VLC from terminal on the desktop to troubleshoot? Could you recommend some vlc command line options to try? I am completely new to all of this but have just been doing as much research/reading as possible so please forgive me as you have been extremely responsive and helpful to my nagging self :) 👍

@shbatm
Copy link
Owner

shbatm commented Jan 5, 2019 via email

@anthony6608
Copy link
Author

anthony6608 commented Jan 5, 2019 via email

@shbatm
Copy link
Owner

shbatm commented Jan 5, 2019 via email

@anthony6608
Copy link
Author

anthony6608 commented Jan 6, 2019

Thank you, going to try that shortly.

Most likely this is a vlc player issue. I’m going to mess with the rags and stuff now but if all fails, knowing that I have a fresh install and configured only for vlc, what changes do I need to make to switch and test it with oxmplayer?

Thanks again 🙏

@anthony6608
Copy link
Author

Ok, so using the big buck bunny test steam proves that its something with VLC player and not my camera, therefore I think anyone using the VLC method is going to run into this problem. Ive tried with a couple different videos from local lan and same thing as well, the right portion of the video is missing.

Any ideas here? I'm not sure what else to do. Also, I may just switch back to omxplayer. What do you think and what changes need to be made to switch over smoothly to oxmplayer?

Thanks!

img_2484

@anthony6608
Copy link
Author

anthony6608 commented Jan 6, 2019

Another update: I ran vlc directly in terminal as you suggested (with and without args) and same thing, Cutting off right side of video... Could It specifically be this version of VLC or something?

img_2486

@shbatm
Copy link
Owner

shbatm commented Jan 7, 2019 via email

@anthony6608
Copy link
Author

Thanks a lot, for now I reverted back to omxplayer and not having any problems however I only have 1 camera added right now and will be adding more soon and enabling rotation. Hopefully I can retry vlc player soon.

When you use the vlcplayer, did you encounter the same issues I am having? I did try uninstalling the default vlc version that comes with raspbian stretch however I couldn't get the older version installed for some reason. Also I noticed on the downloads page, the dates did not match the version number for some reason? For example, 3.0.4 came out in august and 3.0.5 came out in December. If I recall correctly, during the bootstrap command it stopped and gave me an error that lua wasn't installed although it is?

Lastly, I was to place the stream on the right side bottom, how can I make the line under "LIVE FEED" smaller so it doesn't stretch across the screen? It seems like its configured for middle placement.

Thanks again for all your help! I will do more testing on vlc and report back anything I find soon.

@shbatm
Copy link
Owner

shbatm commented Jan 9, 2019

When you use the vlcplayer, did you encounter the same issues I am having? I did try uninstalling the default vlc version that comes with raspbian stretch however I couldn't get the older version installed for some reason.

It may be worth starting with a fresh download of the current version of Raspbian Stretch (do it on a different SD Card or backup your image first) and just see if a clean install gives the same issues. I did not see any of the issues you described with my 5 Hikvision cameras.

Lastly, I was to place the stream on the right side bottom, how can I make the line under "LIVE FEED" smaller so it doesn't stretch across the screen? It seems like its configured for middle placement.

Make sure you're using bottom_right in the position section of your config and check the moduleWidth value. If that's not working, you'll need to play with your custom.css file to make the changes you need. That's something for the forum.

@BKeyport
Copy link

FWIW, I tried VLC - and it didn't work either - my fix was to go back to the legacy screen driver.

(Works for OMXPLayer and FFMPeg too)

@Anonym-tsk
Copy link

I cannot get the stream to size correctly in the box. I've played with ALL of the height/width settings and there always seems to be a black space on the right side no matter what I do. I was trying to get it from end to end and larger if I could to have a cleaner look.

This problem is related to screen rotation.
How to fix:

  1. Use Fake KMS driver (raspi-config)
  2. Remove display_rotate property from /boot/config.txt
  3. For rotation add line @xrandr --output HDMI-1 --rotate right to ~/.config/lxsession/LXDE-pi/autostart

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Feb 20, 2022
@github-actions github-actions bot closed this as completed Mar 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants