jansmolders86 / mediacenterjs

A HTML/CSS/Javascript (NodeJS) based Media center
http://mediacenterjs.com
1.29k stars 243 forks source link

Error when trying to play movie #151

Closed CodingPeak closed 9 years ago

CodingPeak commented 9 years ago

Getting this error, every time I try to play a movie or series. (output from npm window)

image

Jon889 commented 9 years ago

Do you have ffmpeg installed?

jansmolders86 commented 9 years ago

Are you using the Exe that is included with the package? https://github.com/jansmolders86/mediacenterjs-windows/blob/master/executable/mediacenterjs.exe

The exe adds ffmpeg to the path environment allowing you to use it without having to install it separately. You make sure you have this bin folder in the root of MCJS https://github.com/jansmolders86/mediacenterjs-windows/tree/master/pack/bin

Let me know it it works now :)

CodingPeak commented 9 years ago

Well, as I said in my other issue, I had issues while installing this software.. My AVG antivirus gave errors and I was not even authorized to run the .exe... Then I disabled AVG, uninstalled the software and reinstalled it. Then when I tried to run, the black window immediately disappeared, so I restarted my computer. I disabled AVG again and tried to run the .exe. This worked, but I was getting errors.. I found that I had to install nodejs separately... So I did (from the dist folder). I installed both .msi files, as I was still getting errors...

So at that moment, everything was up and running (finally). But I guess my installation failed at more things (such as adding stuff to the path environment etc.)

I added the path to the environment variable. Playing any video, works now..

jansmolders86 commented 9 years ago

Hey Thanks for sticking with it and I'm glad you got it to work!

The installer should prompt you to install nodejs after installing the application, so if it didn't that is very wierd. I'l check the exe to see if I compiled it correctly. After you have installed both MCJS as well as NodeJs, it should also prompt you to restart your PC (so that the the path variables of Nodejs can take effect)

Sadly though, you are right that setup doesn't write any path variables for ffmpeg yet. The exe just refers to the binaries on startup.

Again thanks for not giving up and giving it a try. It's very much appreciated.

CodingPeak commented 9 years ago

No problem, Jan.

About the installation.. If you want, I'll install again (in another path) and show you the errors I got while installing. Actually, I'll do this right away.

jansmolders86 commented 9 years ago

That would be very helpful Ruben! Thanks!

CodingPeak commented 9 years ago

image

image

image

jansmolders86 commented 9 years ago

Excellent! I just noticed I was a bit to enthusiastic the last time I packaged the EXE, as it can't find the NodeJS install MSI during setup. That is the second error you're seeing. I'm fixing that now, but that will take some time as packaging is quite slow.

As for the first I'm going to dig in Google to find a way for virusscanners to trust my EXE file :)

Thanks again for reporting this!

CodingPeak commented 9 years ago

That solves part of the problem.. Nice!

You're welcome!

jansmolders86 commented 9 years ago

New version is online! The second error should be gone now!

CodingPeak commented 9 years ago

The "virus" is still there, but the other error is gone!

CodingPeak commented 9 years ago

But... You should move/merge all this with the other issue I filed.. Because this issue (about playing movie) is solved.

jansmolders86 commented 9 years ago

Sadly moving and merging issues is not possible on github. But a closed issue can always be found and reopened easily. Closing this for now!

maevelander commented 9 years ago

Hi Jans, I have this same error issue playing movies and tv.

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
    at errnoException (child_process.js:1001:11)
    at Process.ChildProcess._handle.onexit (child_process.js:792:34)

I am using the exe included with the package

This bin folder is in the root https://github.com/jansmolders86/mediacenterjs-windows/tree/master/pack/bin

No problems for me during install process. Functions other than movies/tv work perfectly.

And yes, the filepath to the movies and tv is definitely set correctly and metadata is being correctly pulled in.

Platform: Windows. Version: Latest... and I even tried a reinstall to confirm

Any suggestions greatly appreciated.

jansmolders86 commented 9 years ago

Hey there,

Could you try to start the application with this: https://github.com/jansmolders86/mediacenterjs-windows/blob/master/mediacenterjs.bat (just place it in the root of the application)

There might be an issue with the EXE.

Thanks!

maevelander commented 9 years ago

Thanks or your reply Jan. I added the batch file in the root but unfortunately still same error on play. I tried on a different computer at home last night too, also running Windows 7 and was able to replicate the issue.

jansmolders86 commented 9 years ago

That's strange! Do you have an Ffmpeg folder in de bin directory?

maevelander commented 9 years ago

Yep, that was the first thing I checked. Any other suggestions?

jansmolders86 commented 9 years ago

And this error occurs when you're about to play a movie right? It's very strange, I can't seem to reproduce it.

maevelander commented 9 years ago

It does it for both movies and TV. Music works fine. I asked another friend to try it and he had the exact same problem. Is there any test steps I could try in order to isolate the error?

jansmolders86 commented 9 years ago

I have the same issue with the EXE. But the bat does the job just fine. Did you add it like this?:

image

maevelander commented 9 years ago

Working now! My mistake, I added the batch file but was still running the exe to test. Executing the batch file works perfectly now.

Thanks so much for your help, and great product. Now it's working on Windows, next I want to try it out on my Raspberry Pi. :-)

jansmolders86 commented 9 years ago

Very glad it's working and thanks for the kind words!

I'm re-factoring the exe/install script to make it work better out of the box. Let me know how far you'll get with the Pi. I haven't tried in a while. My previous attempt is documented here: https://github.com/jansmolders86/mediacenterjs/wiki/WIP-ONHOLD:-Manually-setup-MediacenterJS-on-RaspberryPi-with-clean-raspbian-distro

It might help you get started!