dbrgn / orochi

Orochi is an interactive command line client for 8tracks.com.
GNU General Public License v3.0
84 stars 17 forks source link

Fatal mplayer crashes #29

Closed darnir closed 11 years ago

darnir commented 11 years ago

This issue might be related to #16.

On my Arch Linux system, I haven't been able to get even one song playing through orochi as of yet. Everytime I try to load a playlist, mplayer seems to crash. Please find the stack trace available on the console:

Traceback (most recent call last): File "/usr/bin/orochi", line 9, in load_entry_point('orochi==0.0.1', 'console_scripts', 'orochi')() File "/usr/lib/python2.7/site-packages/orochi/client.py", line 431, in main client.cmdloop() File "/usr/lib/python2.7/site-packages/orochi/client.py", line 144, in cmdloop super(Client, self).cmdloop() File "/usr/lib/python2.7/cmd.py", line 142, in cmdloop stop = self.onecmd(line) File "/usr/lib/python2.7/cmd.py", line 221, in onecmd return func(arg) File "/usr/lib/python2.7/site-packages/orochi/client.py", line 219, in do_play i = PlayCommand(self.config, mix_id, self) File "/usr/lib/python2.7/site-packages/orochi/client.py", line 249, in init self.p.load(self.status['track']['url']) File "/usr/lib/python2.7/site-packages/orochi/player.py", line 145, in load "Something must have gone wrong.", self.p.readerr()) File "/usr/lib/python2.7/site-packages/orochi/player.py", line 31, in getattr raise TerminatedException('MPlayer has been terminated and cannot be used anymore.') orochi.player.TerminatedException: MPlayer has been terminated and cannot be used anymore.

It looks like a network issue. It could be. But on my ElementaryOS, I usually get about 2-3 songs playing before this issue pops up.

I used to have mplayer2 on my Arch System, figured that could be the issue and replaced it back with mplayer. But the problem persists. Do let me know if I can provide more information / debugging.

dbrgn commented 11 years ago

Hm, this is strange. I use arch too, and it works without any problem. It appears that your mplayer somehow crashes before it can be used.

To debug this issue, try starting mplayer in slave mode in your terminal:

mplayer -slave -idle -really-quiet -msglevel global=6:cplayer=4 -msgmodule -input nodefault-bindings -vo null -cache 1024

Then load a file from the internet:

loadfile http://ia800905.us.archive.org/6/items/JenkinsAndJenkinsMouthOrganBlues1924/Jenkins_and_Jenkins-Hen_Pecked_Man-1924.mp3

Then post the result (did the file play?) and the mplayer output here.

darnir commented 11 years ago

Thanks for the quick response! I tried. MPlayer doesn't crash, but I get no audio output at all.

CPLAYER: MPlayer SVN-r36285-4.8.1 (C) 2000-2013 MPlayer Team GLOBAL: get_path('codecs.conf') -> '/home/sauron/.mplayer/codecs.conf' GLOBAL: get_path('fonts') -> '/home/sauron/.mplayer/fonts' GLOBAL: get_path('input.conf') -> '/home/sauron/.mplayer/input.conf' mplayer: could not connect to socket mplayer: No such file or directory loadfile http://ia800905.us.archive.org/6/items/JenkinsAndJenkinsMouthOrganBlues1924/Jenkins_and_Jenkins-Hen_Pecked_Man-1924.mp3 GLOBAL: get_path('Jenkins_and_Jenkins-Hen_Pecked_Man-1924.mp3.conf') -> '/home/sauron/.mplayer/Jenkins_and_Jenkins-Hen_Pecked_Man-1924.mp3.conf' CPLAYER: Playing http://ia800905.us.archive.org/6/items/JenkinsAndJenkinsMouthOrganBlues1924/Jenkins_and_Jenkins-Hen_Pecked_Man-1924.mp3. GLOBAL: get_path('sub/') -> '/home/sauron/.mplayer/sub/' GLOBAL: get_path('sub/') -> '/home/sauron/.mplayer/sub/' CPLAYER: ========================================================================== CPLAYER: ========================================================================== CPLAYER: AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample) CPLAYER: Video: no video CPLAYER: Starting playback... GLOBAL: EOF code: 1
CPLAYER:

I'll have to check if this is an ALSA issue. It has given me loads of problems in the past.

dbrgn commented 11 years ago

Hm, did it take a few minutes until the "EOF code: 1" appeared? In that case it appears as if mplayer works correctly.

You could remove the -really-quiet parameter and play with the -ao parameter to get things working.

If it works using extra arguments, you can add them to your config as described here: https://github.com/dbrgn/orochi#configuration

If you get mplayer to work but not orochi, we'll have to debug some more.

darnir commented 11 years ago

Thanks! I did some digging. The issue is my ALSA setup. It's completely messed up. I'll have to sit one day and fix it. I guess that is what causes orochi to bow out.

dbrgn commented 11 years ago

When I had problems with ALSA, I ended up installing pulseaudio. Then you can configure almost anything with the pavucontrol tool :)

dbrgn commented 11 years ago

I'll close this issue. If something doesn't work and is Orochi's fault, just add another comment.