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

Video playback fails with the exception ...DBus.Error.NoReply #86

Closed jatinkrmalik closed 7 years ago

jatinkrmalik commented 7 years ago

Issue Report

Description

Video playback fails with the exception dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply. I have read almost all the issues and also checked forum but all the other people encountering the same error have either done a mistake in the args=[] or trying to invoke multiple player instances without closing the old ones.

Problem reproduction

Here is the code executed (pretty basic) and the log stack of the issue. I have take steps like rebooting the pi and reinstalling the dependencies but it is still failing. I have also tried execute without the args[].

Sometimes, randomly video does start playing but program still splits the same error in console and nothing is executed after player.play()line and then even to exiting the program, video keeps playing, so have to kill the pids manually.

Steps to reproduce:

  1. Save code pastebin below to test.py
  2. Execute python test.py
# Testing python-omxplayer-wrapper from https://github.com/willprice/python-omxplayer-wrapper

from omxplayer import OMXPlayer
from time import sleep

file_path = '../audio/Baby.mkv'
launchParameters = ['--blank', '-o', 'hdmi', '--no-osd', '--win', '0,0,1279,719']

player = OMXPlayer(file_path, args=launchParameters, pause=False)

player.play()
sleep(5)
player.pause()
sleep(5)

Environment details

Software Version
python-omxplayer-wrapper 0.2.2
python-dbus (dpkg -s python-dbus) 1.2.0-2
python (python --version) 3.4.2
omxplayer (omxplayer --version) dfea8c9

Feature Request

Description

Include either instructions to install python3-dbus or package it in this project itself.

jehutting commented 7 years ago

Hello @jatinkrmalik When you run into this issue, can you post the output of ls -l /tmp/omxplayerdbus*? Also post the output of whoami. Thanks in advance! I think the problem is caused by the BusFinder::find_address_file() picking up the wrong D-Bus bus address. After you have posted the requested info, you can remove the /tmp/omxplayerdbus* files (as these are re-created upon omxplayer startup). Hopefully the error is gone.

willprice commented 7 years ago
  1. How long is your media file?
  2. Agree with @jehutting, this is probably due to picking up the incorrect bus address/stale bus address files. Can you post the requested information
jatinkrmalik commented 7 years ago

Hi @willprice , It weird that it started working on a fresh install of Raspbian. I feel dbus got corrupted or similar.

I think we can close this issue now.

willprice commented 7 years ago

If you do see the problem again, post the output of the omxplayerdbus* files in /tmp then we can figure out whether you've got stale files present or not causing issues; this has been the source of issues for me previously.

Closing for the time being until we can reproduce.