Rafostar / playercast

Cast to media player and control playback remotely.
GNU General Public License v3.0
108 stars 5 forks source link

Makes a connection but nothing actually plays #9

Closed d-air1 closed 3 years ago

d-air1 commented 3 years ago

Hey. Stumbled across this awesome project and decided I would give it a go. After getting everything setup in the firewall. I was able to get my laptop to establish a connection to my desktop. By monitoring the processes, I see that it does indeed open up mpv, but not graphically it seems. It just runs in the background. Then it exits far quicker than I expect it to no matter the length or quantity of the files that I try to cast. The only message I see after this happens is that the cast finished. On the server side of things it just goes back to waiting on a connection. Tried restarting the computer just in case the firewall exceptions didn't take effect. That didn't work either.

System Info: Operating System: openSUSE Tumbleweed 20210121 KDE Plasma Version: 5.20.5 KDE Frameworks Version: 5.78.0 Qt Version: 5.15.2 Kernel Version: 5.10.7-1-default OS Type: 64-bit Processors: 4 × Intel® Core™ i7-7500U CPU @ 2.70GHz Memory: 15.4 GiB of RAM Graphics Processor: Mesa DRI Intel® HD Graphics 620

On another note I tried using the --player flag to see if vlc would work. That just triggers this error message instead though "Receiver error: Web server connect timeout."

Most problems on openSUSE and Fedora end up being the firewall, so I wanted to expand on what exactly I did. I've allowed ports 4000, 9880, and 9881 (both udp and tcp) through the firewall. I'm using the precompiled binary for linux. Both vlc and mpv are installed natively and not through snap or flatpak or the likes. I also tried specifying the path of mpv using --cwd flag. That lead to another timeout error. Perhaps I used the flag wrong? Anyway I feel like I'm 99% close to getting thigns working. Any help would be greatly appreciated.

Rafostar commented 3 years ago

@Dashon1

Hi, Sorry for late response. First of all can you play the files normally using mpv from command line on the PC where you want to cast them to? Have you tried doing the cast to the same PC with two terminal windows? Also starting app with:

DEBUG=mpc*,playercast* playercast -q

and on second terminal:

DEBUG=mpc*,playercast* playercast -q "/path/to/video.mp4"

I also tried specifying the path of mpv using --cwd flag

The --cwd flag is only useful when you have multiple installations of mpv/vlc (or on Windows OS). If you don't and you can start them from terminal by simply typing that media player app name, you don't need it.

mpv is controlled using a UNIX socket which works faster. vlc does not support UNIX sockets and is controlled via Web API using localhost port 9280 (connection to same device on 127.0.0.1).

d-air1 commented 3 years ago

Hey. Thanks for getting back to me. The file does work from the command line. It also works when casting and receiving from the same machine. I will try and run it from one machine to another with the debugging terms now.

d-air1 commented 3 years ago

Everything seems to be working now. I can't say I decided to try it normally one more time after seeing it work when done on the same machine. Whether or not it was today's update or what I can't say, but not it works. Thanks for your help though.