rekado / soundCLI

A command line client for soundcloud.com with streaming support via gstreamer
soundcli.elephly.net
96 stars 11 forks source link

soundcli refuses to run #10

Open therobot opened 12 years ago

therobot commented 12 years ago
$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin11.0.1]
$ soundcli       
undefined method `+' for nil:NilClass

help subcommand works tough

$ soundcli --help-all
Usage:
  ruby [OPTION...] - GStreamer initialization

Help Options:
  -h, --help                        Show help options
  --help-all                        Show all help options
  --help-gst                        Show GStreamer Options

GStreamer Options
  --gst-version                     Print the GStreamer version
  --gst-fatal-warnings              Make all warnings fatal
  --gst-debug-help                  Print available debug categories and exit
  --gst-debug-level=LEVEL           Default debug level from 1 (only error) to 5 (anything) or 0 for no output
  --gst-debug=LIST                  Comma-separated list of category_name:level pairs to set specific levels for the individual categories. Example: GST_AUTOPLUG:5,GST_ELEMENT_*:3
  --gst-debug-no-color              Disable colored debugging output
  --gst-debug-disable               Disable debugging
  --gst-plugin-spew                 Enable verbose plugin loading diagnostics
  --gst-plugin-path=PATHS           Colon-separated paths containing plugins
  --gst-plugin-load=PLUGINS         Comma-separated list of plugins to preload in addition to the list stored in environment variable GST_PLUGIN_PATH
  --gst-disable-segtrap             Disable trapping of segmentation faults during plugin loading
  --gst-disable-registry-update     Disable updating the registry
  --gst-disable-registry-fork       Disable spawning a helper process while scanning the registry
rekado commented 12 years ago

did you install the gem or latest from git? I can't reproduce this.

therobot commented 12 years ago

I just did gem install soundcli.

related rubygems installed:

json (1.6.5, 1.5.2) gstreamer (1.0.3) curb (0.8.0)

gstreamer packages:

gstreamer 0.10.35 gst-plugins-base 0.10.35

rekado commented 12 years ago

Okay, this could be issue #3. I don't have a Mac so I cannot test this. Do you have this environment variable set: $XDG_CONFIG_HOME ? If so, what is its value?

soundcli wants to read/write a simple config file, but that doesn't come with the gem (yet). I haven't worked on soundcli for a while but I'm going to have a look at it again soon, seeing somebody else but me is using it (or at least trying to do so).

rekado commented 12 years ago

Is there a backtrace?

therobot commented 12 years ago

Progress have been made (but not finally done).

$ export XDG_CONFIG_HOME=$HOME/.soundcli/ $ soundcli stream http://soundcloud.com/dropoutorchestra/automan-drop-out-orchestra No config file found or error parsing it. Ignoring. No such action: stream Usage: /Users/therobot/.rvm/gems/ruby-1.8.7-p352/bin/soundcli features|revoke|stream|download|set|play|search_user|usage|me [url|query]

I'd love to use soundcloud from my command line, their osx app sucks, also don't like to have another browser tab just for music. Thanks for your efforts.

EXAMPLES:

Play a track by URL: /Users/therobot/.rvm/gems/ruby-1.8.7-p352/bin/soundcli stream http://soundcloud.com/rekado/the-human-song /Users/therobot/.rvm/gems/ruby-1.8.7-p352/bin/soundcli http://soundcloud.com/rekado/the-human-song

Play a track by ID: /Users/therobot/.rvm/gems/ruby-1.8.7-p352/bin/soundcli stream 15966266 /Users/therobot/.rvm/gems/ruby-1.8.7-p352/bin/soundcli 15966266

Stream a whole playlist: /Users/therobot/.rvm/gems/ruby-1.8.7-p352/bin/soundcli set http://soundcloud.com/rekado/sets/staging/

Stream all of your favourite tracks: /Users/therobot/.rvm/gems/ruby-1.8.7-p352/bin/soundcli me favorites

UNFINISHED STUFF:

Show my user info: /Users/therobot/.rvm/gems/ruby-1.8.7-p352/bin/soundcli me

List my tracks: /Users/therobot/.rvm/gems/ruby-1.8.7-p352/bin/soundcli me tracks

List my exclusive tracks: /Users/therobot/.rvm/gems/ruby-1.8.7-p352/bin/soundcli me activities tracks exclusive

Search for a user: /Users/therobot/.rvm/gems/ruby-1.8.7-p352/bin/soundcli search_user fronx

You say goodbye and I say hello. --- Hello, Goodbye

rekado commented 12 years ago

That is quite strange as "stream" is in fact a correct action. Leave away "stream" and see what happens. I hope to find some minutes this weekend to have a look at the code again.

rekado commented 12 years ago

ruby-1.8.7-p352? I have only tested this with v1.9.3.

therobot commented 12 years ago

Now I am using 1.9.3

Things have improved, but still no luck.

$ soundcli http://soundcloud.com/dropoutorchestra/automan-drop-out-orchestra
No config file found or error parsing it. Ignoring.

Now playing: "Newcleus - Automan (Drop Out Orchestra Dub)"
==========================================================
No URI handler implemented for "http".
gsturidecodebin.c(1177): gen_source_element (): /GstPlayBin2:playbin20/GstURIDecodeBin:uridecodebin0

You say goodbye and I say hello.
   --- Hello, Goodbye
rekado commented 12 years ago

Now that's a lot better already. This error now stems from some missing gstreamer plugin.

rekado commented 12 years ago

Does it work now after installing gstreamer plugins?

therobot commented 12 years ago

No luck, I have the following hombrew packages installed:

gst-plugins-bad gst-plugins-base gst-plugins-good gst-plugins-ugly

rekado commented 12 years ago

It's definitely a gstreamer issue. Works for me here. You can find this error message in other projects' bug trackers too. The gstreamer plugin packages you listed look okay to me.

What does gst-inspect-0.10 | grep uridecodebin give you? What about gst-inspect-0.10 | grep http?

cheets commented 12 years ago

I have exact same problem. Upper command gives: uridecodebin: uridecodebin: URI Decoder uridecodebin: decodebin2: Decoder Bin And lower doesn't give anything. Seems http-support is missing but I can't figure out why. I have tested on Ruby 1.8.7 and 1.9.3p194. I can't get gst-ffmpeg to install but I think it doesn't add http-support anyway. neonhttpsrc is in the bad-plugins and souphttpsrc in the good-plugins, so there should be http available. I'm using brew to install these in Mac, dunno if there's a problem with that or why http is not working.

rekado commented 12 years ago

@cheets: Ruby 1.9.3 is the only supported version. I don't have a Mac (and I don't suppose I could run MacOS in a virtual machine to test this), so it is difficult for me to figure out what's amiss. There definitely should be an http handler for GStreamer and it is odd that there is none on your system. I'll have to think about a way to help you find out what's wrong.

Thanks for testing! If we ever get to sort this out I'll add some more notes to the README.

cheets commented 12 years ago

There are some unofficial guides on how to get OS X virtualized. Anyway I can help testing if you have suggestions. Using different version of ruby didn't affect the outcome. It stops to complain about No URI handler implemented for "http"..