IsSuEat / open-livestreamer-firefox-addon

Addon for firefox to quickly open stream urls in vlc using livestreamer
GNU General Public License v3.0
18 stars 7 forks source link

After fiddling with "optional arguments for livestreamer", addon no longer working #37

Closed Smultie closed 9 years ago

Smultie commented 9 years ago

As the subject says, I was trying to get the file-caching working with "'/Applications/VLC.app/Contents/MacOS/VLC' --file-caching 5000", but when that didn't work I just deleted the entry in the "optional arguments for livestreamer"-box in the settings.

To my surprise, the addon is now no longer working... After rightclicking an applicable link, the small popup "Launching Livestreamer" pops up, but nothing happens after that.

Settings: OSX El Capitan dev preview 5, Fx 39.0 Path to livestreamer: /usr/local/bin/livestreamer Stream quality: best

Is there a log that maybe gives some information as to why the stream won't open in VLC?

IsSuEat commented 9 years ago

Hi there!

You can try launching Firefox from the commandline, at least under Linux it shows the livestreamer output there. Make sure you really deleted everything from the arguments input field.

IsSuEat commented 9 years ago

I somehow managed to reproduce this now. Will look into it

julianrichen commented 9 years ago

Tried using --player mpv as an additional argument and livestreamer fails to launch. No output from the sdk, tried to debug and placed the following after line 150;

console.log(path, args, args.length);

Which returns:

console.log: open-livestreamer: /usr/bin/livestreamer Array ["<stream url>","best","--player mpv"] 3

Using the same commands in a normal terminal runs livestreamer.

Maybe it has something to do with process.run()?

// Build file
file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
file.initWithPath(path);
// New child process
process = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
process.init(file);
process.run(false, args, args.length);

Does using --player mpv (assuming you have mpv installed) work for you @IsSuEat ?

baizon commented 9 years ago

I had the same problem, that's why i added the right parameters to https://github.com/IsSuEat/open-livestreamer-firefox-addon/wiki That works for me on both OS.

IsSuEat commented 9 years ago

@julianrichen works for me. You are missing the "=", as baizon noted. --player=mpv

baizon commented 9 years ago

I'm not sure who edited the Wiki page, but --player=mpv,--no-cache doesn't work. It has to be --player=mpv --no-cache. That means that the player mpv got 1 parameter. I personally use --player=mpv --no-cache --hwdec=vdpau, so i got 2 parameters.

IsSuEat commented 9 years ago

I changed it. When you don't seperate them with commas the whole string is interpreted as one argument. So when not using a comma, the whole string gets passed to mpv.

baizon commented 9 years ago

I meant it like that, because I run mpv with that 2 arguments. It's like --player="mpv --no-cache". That's why there shouldn't be commas there, where you added them. It's 1 argument that is passed for livestreamer, but 2 for mpv.

IsSuEat commented 9 years ago

Okay, edited it again.

baizon commented 9 years ago

Thank you. You can add a second example to clarify it. Examples (I've tested them):

  1. With 1 argument: --player=mpv --no-cache
  2. With 2 arguments: --player-no-close,--player=mpv --no-cache
  3. With 3 arguments: --player-no-close,--player=mpv --no-cache,--retry-open=5
julianrichen commented 9 years ago

@julianrichen works for me. You are missing the "=", as baizon noted. --player=mpv

bwahhh I'm dumb, it's working now.

IsSuEat commented 9 years ago

hehe happens :)

I'm thinking about reworking how livestreamer gets launched. If we switch this to the child_process API aswell, we could capture livestreamer exit codes and display proper error messages.