willprice / python-omxplayer-wrapper

:tv: Control OMXPlayer, the Raspberry Pi media player, from Python
http://python-omxplayer-wrapper.readthedocs.io
GNU Lesser General Public License v3.0
253 stars 71 forks source link

omxplayer wrapper no sound when playing mp3 #121

Closed chadi8 closed 5 years ago

chadi8 commented 6 years ago

README

READ BELOW THE FOLD BEFORE REPORTING AN ISSUE


If you're looking for help on how to use the library head over to the Raspberry Pi forums

If you're reporting an issue or requesting a feature, read on! Pick one of the following templates depending on your issue type.


If you're going to report an issue, please pick one of the template below:

Delete the template you aren't using.

FINALLY, DELETE ALL THE ABOVE AND THIS LINE.

Issue Report

Description

A short description of the problem you're facing

Problem reproduction

A MINIMAL example of how to reproduce the example, don't post the contents of your whole file. Take the time to trim it down to the minimal number of steps required

Environment details

Software Version
python-omxplayer-wrapper 0.1.0
python-dbus (dpkg -s python-dbus) 1.2.0
python (python --version) 2.7.9
omxplayer (omxplayer --version) 6c90c75

Feature Request

Description

A short description (preferably a one liner) of the feature you desire.

Example use case

An example of how the feature you request would be used, demonstrating it's utility (and why the current solution doesn't solve your problem).

chadi8 commented 6 years ago

Hello , i have installed omxplayer-wrapper and now i'm testing the advanced example,

!/usr/bin/env python

from omxplayer.player import OMXPlayer from pathlib import Path from time import sleep import logging logging.basicConfig(level=logging.INFO)

VIDEO_1_PATH = "..mp3" player_log = logging.getLogger("Player 1")

player = OMXPlayer(VIDEO_1_PATH, dbusname='org.mpris.MediaPlayer2.omxplayer1') player.playEvent += lambda : playerlog.info("Play") player.pauseEvent += lambda : playerlog.info("Pause") player.stopEvent += lambda : player_log.info("Stop")

it takes about this long for omxplayer to warm up and start displaying a picture on a rpi3

sleep(2.5)

player.set_position(5) player.play()

I have done some changes i'm executing the file as python not python3(to avoid omxplayer module not found) , and i'm trying to play mp3 file. it is working since i'm getting omxplayer.player:Playing?: True but there is no sound coming from the aux

do you have any suggestions? thank you

willprice commented 5 years ago

Likely due to incorrect sound output device, see https://www.raspberrypi.org/documentation/usage/audio/