Closed vanDemonian closed 7 years ago
Try do change the following code
def Position(self):
try:
return self.properties.Get(
'org.mpris.MediaPlayer2.Player',
'Position')
except Exception as e:
return False
to
def Position(self):
try:
return self.properties.Get(
'org.mpris.MediaPlayer2.Player',
'Position')
except Exception as e:
print(e)
return False
What's the error if you run it again with this patch?
I get strange behaviour. I added print(e), and the first time I ran "omxplayer-sync -mu /home/pi/Videos/DTLA.mp4" the video appeared on screen momentarily (for less than one second) then exited with the same "WARNING: omxplayer did not start. Try to test with omxplayer -s OPTIONS".
No exception was printed to terminal out.
Try to run omxplayer with exactly those switches:
omxplayer -s -o both --no-keys /home/pi/Videos/DTLA.mp4
omxplayer -s -o both --no-keys --loop /home/pi/Videos/DTLA.mp4
Both sets of switches result in normal play of the mp4
when I run the commands without the --no-keys switch everything runs well and I get the following output: pi@raspberrypi:~ $ omxplayer -s -o both /home/pi/Videos/DTLA.mp4
Video codec omx-h264 width 1920 height 1080 profile 77 fps 25.000000
Audio codec aac channels 2 samplerate 44100 bitspersample 16
Subtitle count: 0, state: off, index: 1, delay: 0
M: 0 V: 0.00s 0k/ 4800k A: 0.00 0.00s/ 6.34s Cv: 0k Ca: V:PortSettingsChanged: 1920x1080@25.00 interlace:0 deinterlace:0 anaglyph:0 par:1.00 display:0 layer:0 alpha:255 aspectMode:0
M: -45574 V: 0.97s 2480k/ 4800k A: 0.84 0.05s/ 6.34s Cv: 0k Ca:
M: 146843 V: 1.13s 4640k/ 4800k A: 1.43 -0.15s/ 6.34s Cv: 2575k Ca:
M: 345081 V: 1.09s 4640k/ 4800k A: 2.05 -0.35s/ 6.34s Cv: 5784k Ca:
M: 580108 V: 1.18s 4640k/ 4800k A: 2.21 -0.58s/ 6.34s Cv: 8370k Ca:
M: 776173 V: 1.22s 4480k/ 4800k A: 2.82 -0.78s/ 6.34s Cv: 9547k Ca:
M: 988818 V: 1.33s 4400k/ 4800k A: 2.61 -0.99s/ 6.34s Cv: 9986k Ca:
M: 1191469 V: 1.17s 4800k/ 4800k A: 2.80 -1.19s/ 6.34s Cv: 9822k Ca:
M: 1358419 V: 1.28s 4800k/ 4800k A: 2.64 -1.36s/ 6.34s Cv: 9415k Ca:
M: 1535633 V: 1.18s 4480k/ 4800k A: 2.46 -1.54s/ 6.34s Cv: 9954k Ca:
M: 1712774 V: 1.13s 4640k/ 4800k A: 2.68 -1.71s/ 6.34s Cv: 9941k Ca:
M: 1888524 V: 1.23s 4720k/ 4800k A: 2.57 -1.89s/ 6.34s Cv: 10206k Ca:
M: 2062524 V: 1.18s 4720k/ 4800k A: 2.72 -2.06s/ 6.34s Cv: 10172k Ca:
M: 2249682 V: 1.15s 4720k/ 4800k A: 2.53 -2.25s/ 6.34s Cv: 10191k Ca:
M: 2430326 V: 1.17s 4720k/ 4800k A: 2.75 -2.43s/ 6.34s Cv: 9685k Ca:
M: 2622363 V: 1.14s 4720k/ 4800k A: 2.56 -2.62s/ 6.34s Cv: 10089k Ca:
M: 2821118 V: 1.18s 4480k/ 4800k A: 2.77 -2.82s/ 6.34s Cv: 10165k Ca:
M: 3012149 V: 1.19s 4800k/ 4800k A: 2.58 -3.01s/ 6.34s Cv: 9834k Ca:
M: 3190519 V: 1.09s 4400k/ 4800k A: 2.41 -3.19s/ 6.34s Cv: 10225k Ca:
M: 3390377 V: 1.25s 4800k/ 4800k A: 2.60 -3.39s/ 6.34s Cv: 9889k Ca:
M: 3583200 V: 1.18s 4720k/ 4800k A: 2.41 -3.58s/ 6.34s Cv: 9745k Ca:
M: 3775583 V: 1.14s 4640k/ 4800k A: 2.61 -3.78s/ 6.34s Cv: 9733k Ca:
M: 3968969 V: 1.15s 4720k/ 4800k A: 2.81 -3.97s/ 6.34s Cv: 10193k Ca:
M: 4147387 V: 1.13s 4800k/ 4800k A: 2.63 -4.15s/ 6.34s Cv: 10137k Ca:
M: 4334793 V: 1.11s 4720k/ 4800k A: 2.45 -4.33s/ 6.34s Cv: 10194k Ca:
M: 4542899 V: 1.18s 4800k/ 4800k A: 2.66 -4.54s/ 6.34s Cv: 10207k Ca:
M: 4747149 V: 1.09s 4400k/ 4800k A: 2.45 -4.75s/ 6.34s Cv: 10045k Ca:
M: 4955067 V: 1.16s 4720k/ 4800k A: 2.64 -4.96s/ 6.34s Cv: 10087k Ca:
M: 5127881 V: 1.15s 4800k/ 4800k A: 2.47 -5.13s/ 6.34s Cv: 10158k Ca:
M: 5313736 V: 1.13s 4720k/ 4800k A: 2.67 -5.31s/ 6.34s Cv: 10222k Ca:
M: 5489413 V: 1.11s 4720k/ 4800k A: 2.50 -5.49s/ 6.34s Cv: 10066k Ca:
M: 5665140 V: 1.09s 4720k/ 4800k A: 2.72 -5.67s/ 6.34s Cv: 10057k Ca:
M: 5885846 V: 1.19s 4720k/ 4800k A: 2.50 -5.89s/ 6.34s Cv: 9895k Ca:
M: 6075089 V: 1.16s 4640k/ 4800k A: 2.70 -6.08s/ 6.34s Cv: 10139k Ca:
M: 6274005 V: 1.17s 4640k/ 4800k A: 2.50 -6.27s/ 6.34s Cv: 10202k Ca:
0k
Stopped at: 00:00:06
have a nice day ;)
pi@raspberrypi:~ $ omxplayer -s -o both --loop /home/pi/Videos/DTLA.mp4
Video codec omx-h264 width 1920 height 1080 profile 77 fps 25.000000
Audio codec aac channels 2 samplerate 44100 bitspersample 16
Subtitle count: 0, state: off, index: 1, delay: 0
M: 0 V: 0.00s 0k/ 4800k A: 0.00 0.00s/ 6.34s Cv: 0k Ca: 0k V:PortSettingsChanged: 1920x1080@25.00 interlace:0 deinterlace:0 anaglyph:0 par:1.00 display:0 layer:0 alpha:255 aspectMode:0
M: -57465 V: 1.06s 3120k/ 4800k A: 0.85 0.05s/ 6.34s Cv: 0k Ca: 0k
M: 136996 V: 1.14s 4640k/ 4800k A: 1.44 -0.14s/ 6.34s Cv: 2575k Ca: 0k
M: 339207 V: 1.10s 4240k/ 4800k A: 2.05 -0.34s/ 6.34s Cv: 5784k Ca: 0k
M: 576292 V: 1.14s 4640k/ 4800k A: 2.60 -0.58s/ 6.34s Cv: 9141k Ca: 0k
M: 779433 V: 1.14s 4480k/ 4800k A: 2.82 -0.78s/ 6.34s Cv: 10112k Ca: 0k
M: 979412 V: 1.34s 4800k/ 4800k A: 2.62 -0.98s/ 6.34s Cv: 9986k Ca: 0k
M: 1183616 V: 1.30s 4800k/ 4800k A: 2.81 -1.18s/ 6.34s Cv: 10019k Ca: 0k
M: 1372762 V: 1.15s 4560k/ 4800k A: 2.62 -1.37s/ 6.34s Cv: 10236k Ca: 0k
M: 1561448 V: 1.20s 4720k/ 4800k A: 2.83 -1.56s/ 6.34s Cv: 10094k Ca: 0k
M: 1752865 V: 1.25s 4800k/ 4800k A: 2.64 -1.75s/ 6.34s Cv: 9498k Ca: 0k
M: 1963662 V: 1.16s 4720k/ 4800k A: 2.82 -1.96s/ 6.34s Cv: 10206k Ca: 0k
M: 2143500 V: 1.14s 4720k/ 4800k A: 2.64 -2.14s/ 6.34s Cv: 10194k Ca: 0k
M: 2313882 V: 1.13s 4720k/ 4800k A: 2.47 -2.31s/ 6.34s Cv: 9992k Ca: 0k
M: 2495566 V: 1.10s 4720k/ 4800k A: 2.68 -2.50s/ 6.34s Cv: 10085k Ca: 0k
M: 2665958 V: 1.09s 4720k/ 4800k A: 2.51 -2.67s/ 6.34s Cv: 10089k Ca: 0k
M: 2882345 V: 1.24s 4720k/ 4800k A: 2.71 -2.88s/ 6.34s Cv: 9929k Ca: 0k
M: 3062573 V: 1.18s 4800k/ 4800k A: 2.53 -3.06s/ 6.34s Cv: 10198k Ca: 0k
M: 3238977 V: 1.16s 4800k/ 4800k A: 2.75 -3.24s/ 6.34s Cv: 9666k Ca: 0k
M: 3425172 V: 1.17s 4800k/ 4800k A: 2.57 -3.43s/ 6.34s Cv: 9810k Ca: 0k
M: 3608615 V: 1.15s 4720k/ 4800k A: 2.78 -3.61s/ 6.34s Cv: 10116k Ca: 0k
M: 3789182 V: 1.21s 4640k/ 4800k A: 2.60 -3.79s/ 6.34s Cv: 9521k Ca: 0k
M: 3982382 V: 1.14s 4720k/ 4800k A: 2.80 -3.98s/ 6.34s Cv: 10193k Ca: 0k
M: 4156493 V: 1.12s 4800k/ 4800k A: 2.62 -4.16s/ 6.34s Cv: 10137k Ca: 0k
M: 4349494 V: 1.29s 4560k/ 4800k A: 2.43 -4.35s/ 6.34s Cv: 9803k Ca: 0k
M: 4551146 V: 1.17s 4800k/ 4800k A: 2.65 -4.55s/ 6.34s Cv: 10207k Ca: 0k
M: 4745145 V: 1.13s 4400k/ 4800k A: 2.45 -4.75s/ 6.34s Cv: 10203k Ca: 0k
M: 4954872 V: 1.17s 4720k/ 4800k A: 2.64 -4.95s/ 6.34s Cv: 10087k Ca: 0k
M: 5135517 V: 1.14s 4800k/ 4800k A: 2.46 -5.14s/ 6.34s Cv: 10158k Ca: 0k
M: 5322956 V: 1.12s 4720k/ 4800k A: 2.66 -5.32s/ 6.34s Cv: 10222k Ca: 0k
M: 5503597 V: 1.10s 4720k/ 4800k A: 2.48 -5.50s/ 6.34s Cv: 10066k Ca: 0k
M: 5678971 V: 1.08s 4720k/ 4800k A: 2.70 -5.68s/ 6.34s Cv: 10057k Ca: 0k
Stopped at: 00:00:05
have a nice day ;)
What version of omxplayer are you using? Do you use a build from http://omxplayer.sconde.net?
when I run the commands without the --no-keys switch everything runs well
Does that imply that it doesn't run well with the --no-keys
options present?
it runs well with --no-keys and without however with --no-keys I cant capture the terminal output
yes I'm running a build from http://omxplayer.sconde.net as per wget http://omxplayer.sconde.net/builds/omxplayer_0.3.7~git20160713~66f9076_armhf.deb
Some extra information and context.
I have no problem playing your test files - synctest.mp4 and small_testfile.mp4. Omxplayer-sync also plays the smaller mp4's I'm working with, but seems to fail when files size gets to around 4GB and/or data rate hit 35Mbps. My aim is to be able to run 36GB files with 50Mbps data rates - I have tested these with omxplayer and they run well. All files were encoded in the same format on the same machine.
Try to change the following code:
@`` if not self.read_position_local(): print("WARNING: omxplayer did not start. Try to test with
omxplayer -s OPTIONS`")
to
print self.read_position_local()
if self.read_position_local() == False:
print("WARNING: omxplayer did not start. Try to test with `omxplayer -s OPTIONS`")
And run again.
i had to change the first line to:
print (self.read_position_local())
otherwise it would not run, then the output was:
False
WARNING: omxplayer did not start. Try to test with omxplayer -s OPTIONS
try this
def Position(self):
return self.properties.Get(
'org.mpris.MediaPlayer2.Player',
'Position')
instead of
def Position(self):
try:
return self.properties.Get(
'org.mpris.MediaPlayer2.Player',
'Position')
except Exception as e:
return False
It must fail and the error in this case would be of interest.
After that reverse the last change and try this:
def initialize(self):
sleep(10) # wait for omxplayer to appear on dbus
return self._get_dbus_interface()
After the first change I get the same output as before:
False WARNING: omxplayer did not start. Try to test with omxplayer -s OPTIONS
after the second change it works !!!!
many thanks Simon, your patience and attention are greatly appreciated.
I will test it further with my largest files over the next couple of days.
Can one of you guys give me a short review of what have to be done? I have the exact same problem. Some video files it accepts, others it does not. All possible to play in omxplayer.
Nevermind guys. For anyone having same problem, do the following:
sudo nano /usr/bin/omxplayer-sync
In that file on line 84. Find the line saying sleep(2) # wait for omxplayer to appear on dbus
. Change the number to 10 instead of 2. It seems to be the waiting time for omxplayer to start.
Have tested with 36GB files at 35 Mbps and all is good. Clearly it takes a bit longer for the larger files to load and the 10 second sleep fixes that.
Hi guys,
am having an issue where omxplayer-sync fails to load and play a movie despite that movie playing in omxplayer via terminal command.
omxplayer-sync -mu /home/pi/Videos/DTLA.mp4
WARNING: omxplayer did not start. Try to test with
omxplayer -s OPTIONS
omxplayer --loop /home/pi/Videos/DTLA.mp4
Video codec omx-h264 width 1920 height 1080 profile 77 fps 25.000000 Audio codec aac channels 2 samplerate 44100 bitspersample 16 Subtitle count: 0, state: off, index: 1, delay: 0 V:PortSettingsChanged: 1920x1080@25.00 interlace:0 deinterlace:0 anaglyph:0 par:1.00 display:0 layer:0 alpha:255 aspectMode:0 Stopped at: 00:00:01 have a nice day ;)
are there any limits/parameters that I need to be aware of here? i.e. is there a data rate or file size limit ?
cheers
Martin