baudm / mplayer.py

Lightweight Python wrapper for MPlayer
http://pypi.python.org/pypi/mplayer.py
GNU Lesser General Public License v3.0
117 stars 32 forks source link

No audio or metadata #35

Closed kxkayser closed 5 years ago

kxkayser commented 5 years ago

Environment: Raspberry Pi Stretch Python 3.5.3 MPlayer 1.3.0 (Debian)

I am attempting top use mplayer.py using the python command interface.

I have not found any documentation as to the actual methods and properties that can be used.

I am able to do a p.loadfile and can print the correct filename and length. However, I get no audio either via local or HDMI audio devices., The file plays fine when using mplayer from the linux command line. Also, when I try the metadata it seems to return None. Here is my code:

Python 3.5.3 (default, Sep 27 2018, 17:25:39) [GCC 6.3.0 20170516] on linux Type "help", "copyright", "credits" or "license" for more information.

from mplayer import Player p = Player() p.loadfile('kk.mp3') print (p.filename) kk.mp3 print (p.length) 252.0 metadata = p.metadata print (metadata) None print (metadata.get('Title', '')) Traceback (most recent call last): File "", line 1, in AttributeError: 'NoneType' object has no attribute 'get'

baudm commented 5 years ago

Duplicate of #32