0

Both in Arch Linux and in Ubuntu, I installed popcorntime and mplayer from official sources, and even if the "Watch Now" button in Popcorn Time does display MPlayer as an option, when you click on it, it downloads the movie but fails to stream it to MPlayer.

I managed to debug the problem by hitting F12 in Popcorn Time and realized it's calling MPlayer with the following command:

"/usr/bin/mplayer" --really-quiet http://127.0.0.1:23244/3

I pasted that command in my console and got this:

$ "/usr/bin/mplayer" --really-quiet http://127.0.0.1:23244/3
Unknown option on the command line: --really-quiet
Error parsing option on the command line: --really-quiet
MPlayer SVN-r37916 (C) 2000-2017 MPlayer Team
225 audio & 460 video codecs

I realized that my version of MPlayer doesn't accept double-hyphen options. It is expecting -really-quiet instead of --really-quiet. Popcorn Time doesn't seem to have a way to configure this command, and I've been unable to find a version of MPlayer that accepts double-hyphen options. What to do?

e18r
  • 7,578
  • 4
  • 45
  • 40

1 Answers1

0

I built a script that transforms double hyphens into single hyphens. First, rename mplayer to mplayerr:

$ sudo mv /usr/bin/mplayer /usr/bin/mplayerr

Then open a text editor on /usr/bin/mplayer with appropriate permissions,

$ sudo emacs /usr/bin/mplayer

And paste this code:

#! /bin/bash

safe_command="/usr/bin/mplayerr"
for arg in $@
do
    if [ ${arg:0:2} = "--" ]
    then
        safe_arg=${arg:1}
        safe_command="$safe_command $safe_arg"
    else
        safe_command="$safe_command $arg"
    fi
done
echo "$safe_command"
$safe_command

I hope somebody can provide a less hacky solution!

e18r
  • 7,578
  • 4
  • 45
  • 40