Go to advanced search

by jehutting
Sat Nov 10, 2018 9:29 am
Forum: Python
Topic: Convert arduino code to python
Replies: 8
Views: 653

Re: Convert arduino code to python

I might be interested to help you out. Please contact me at jehutting AT gmail DOT com.
by jehutting
Tue Sep 11, 2018 5:16 pm
Forum: Graphics, sound and multimedia
Topic: Raspbian Stretch Pixel: Omxplayer: NO WAY to show subtitles !!! Help please.
Replies: 1
Views: 500

Re: Raspbian Stretch Pixel: Omxplayer: NO WAY to show subtitles !!! Help please.

Your timestamp format in the .srt file is not correct.

OMXPlayer uses hours:minutes:seconds,milliseconds.

So

Code: Select all

1
00:00:05,000 --> 00:00:15,000
aaa aaaaaa aaa

2
00:00:35,000 --> 00:00:45,000
bbb bb b bbbbbbbbb
by jehutting
Sat Mar 10, 2018 11:06 am
Forum: Graphics, sound and multimedia
Topic: omxplayer plays a little fast.
Replies: 15
Views: 3237

Re: omxplayer plays a little fast.

@di512
If you still have problems with omxplayer playing the files too fast, could you run omxplayer with the -g option, and post the omxplayer.log?
Looking at E3V3A issue, I found a small problem with omxplayer. With your log I want to verify if that is also causing your issue.
Thanks in advance.
by jehutting
Sun Nov 12, 2017 6:17 am
Forum: Graphics, sound and multimedia
Topic: omxplayer plays a little fast.
Replies: 15
Views: 3237

Re: omxplayer plays a little fast.

Tried several mp3 (and video) files and omxplayer -with output to an USB audio dongle- plays them all on time . Have you tried a file with audio rate 48000? (I couldn't find an MP3 file in my collection with such a rate, but found a movie with an audio stream with rate 48000, and that one played fin...
by jehutting
Sat Nov 11, 2017 12:49 am
Forum: Other projects
Topic: Axis RTSP - OMXPlayer
Replies: 2
Views: 1326

Re: Axis RTSP - OMXPlayer

Have a look at omxplayer github issue # 441

The OP of that issue has also an Axis camera and without the '--live' option omxplayer plays his stream well.
by jehutting
Thu Nov 09, 2017 5:22 am
Forum: Python
Topic: Work project: OMXPLAYER Wrapper / Error Module
Replies: 1
Views: 923

Re: Work project: OMXPLAYER Wrapper / Error Module

You need to use pip3 instead of pip when installing the wrapper.

See Will Price github issue #103.
by jehutting
Wed Nov 08, 2017 4:19 am
Forum: Graphics, sound and multimedia
Topic: omxplayer plays a little fast.
Replies: 15
Views: 3237

Re: omxplayer plays a little fast.

Have you tried it with the rate (in .asoundrc) set to 44100? What are the time values with this rate?
by jehutting
Wed Nov 08, 2017 3:59 am
Forum: Python
Topic: Controlling omxplayer with a tkinter app
Replies: 1
Views: 380

Re: Controlling omxplayer with a tkinter app

Omxplayer has a '--layer' option which you can use to change the dispmanx layer to 'show' the video on. For omxplayer the default layer is layer 0. The dispmanx layer -127 is used as the X11 desktop. So with '--layer -128' omxplayer should play the video behind the desktop. Question is how to create...
by jehutting
Wed Nov 08, 2017 2:46 am
Forum: Troubleshooting
Topic: PHP and OMXplayer help
Replies: 3
Views: 457

Re: PHP and OMXplayer help

Just to be sure :) , you have a monitor connected to your raspberry pi HDMI port?
If so, what is the command that you run on the (raspberry pi) command line, and what does OMXPlayer output?
by jehutting
Wed Nov 08, 2017 2:31 am
Forum: Graphics, sound and multimedia
Topic: how to hide omxplayer details.
Replies: 6
Views: 3018

Re: how to hide omxplayer details.

Add '--no-osd' to your Popen call to hide the On-Screen-Display message.
by jehutting
Sun Oct 22, 2017 6:04 am
Forum: Python
Topic: Python 2 and Python 3 Missing Module Issue
Replies: 8
Views: 1671

Re: Python 2 and Python 3 Missing Module Issue

AFAIK the wrapper works with python2 and python3.

I thought that Python2 raw_input() always returns a str type...so surprised you needed the casting.
by jehutting
Wed Oct 18, 2017 6:32 am
Forum: Python
Topic: Python 2 and Python 3 Missing Module Issue
Replies: 8
Views: 1671

Re: Python 2 and Python 3 Missing Module Issue

It's all to you how you contact me: through this forum PM, Github PM or direct using my gmail account :D For issues with Will Price's python-omxplayer-wrapper better use its Github Issues facility which forms a better archive and search for issues with the wrapper. I will be glad to help you (and of...
by jehutting
Tue Oct 17, 2017 7:07 am
Forum: Python
Topic: Python 2 and Python 3 Missing Module Issue
Replies: 8
Views: 1671

Re: Python 2 and Python 3 Missing Module Issue

Good to see that you found the missing module. I added the keyb module to your project as a replacement/simulation of your PIR sensor :-)

Notice the remark at the top of the keyb module that it doesn't work in Idle.

Yes keep us/me posted about your project.

Just have fun with Mr. Hammerstein!!!
by jehutting
Wed Aug 16, 2017 6:27 am
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 6226

Re: Play mp3 file dependant on python output

True...but I want to try pygame anyway.

If I'm correct, Jarett runs the program with the GUI and has a good reading without any miss selection I assume?
I don't know why the GUI/OS doesn't interfere the selection reading, and an additional thread does interfere.
by jehutting
Tue Aug 15, 2017 10:31 pm
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 6226

Re: Play mp3 file dependant on python output

There was a post of someone who had a quote of his friend Leonardo... have to look it back who it was :D Sorry... But the good thing of your code is that it shows the way to go... using pygame ! It is capable of playing the MP3 file in the background, and that is the only thing we needed in the firs...
by jehutting
Tue Aug 15, 2017 6:16 pm
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 6226

Re: Play mp3 file dependant on python output

The idea is to get Geof's interrupt/callback code -as OutoftheBOTS kindly picked out- and let it handle the pulses in the same way as Jarett's polling code does. So a change of Jarett polling code into a interrupt driven one. Jarett is the only one with the right hardware. And once the selection cod...
by jehutting
Tue Aug 15, 2017 7:21 am
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 6226

Re: Play mp3 file dependant on python output

Awesome... googling around and reading some projects with a wallbox.... amazing stuff. I am always surprised to see what people do with the raspberry pi!!! A wallbox for $50... no way here in the Netherlands :(. I saw some almost brand new wallboxes but they are all beyond my budget (again :( ) The ...
by jehutting
Tue Aug 15, 2017 5:38 am
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 6226

Re: Play mp3 file dependant on python output

Feel free to show me the Leonardo solution. I'm always open to learn new things :lol: OK, so adding the threading broke the selection code. Indeed thread switching in combination with the polling mechanism of the wallbox signal is no good. The polling 'times' the length of the gap, and when the thre...
by jehutting
Mon Aug 14, 2017 11:11 pm
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 6226

Re: Play mp3 file dependant on python output

Still don't understand how you get those multiple playings... although.. I see a lot of errors as A0.mp3 not found, Alsa errors... These will not be handled correct in my thread/Player function. If these are causing an exception you should see that in your /var/log/jukeboxcontroller.log file. In the...
by jehutting
Mon Aug 14, 2017 10:06 pm
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 6226

Re: Play mp3 file dependant on python output

Yes that's what I did. track_list = [] # the global tracklist def player(): while True: # if the track_list has a track to play... if len(track_list): # ...get it and remove it from the tracklist print("BEFORE track_list={0}".format(track_list)) track = track_list.pop(0) print('track popped = %s' % ...
by jehutting
Mon Aug 14, 2017 9:33 pm
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 6226

Re: Play mp3 file dependant on python output

Oeps...yes, you changed the music folder to /home/pi/Desktop. Sorry, missed that when I was modifying your last posted code. Strange that it isn't waiting for the completion (process.wait() should do the trick.) Do you see multiple instances of mpg321 when executing 'top' or 'htop'? I'm already in t...
by jehutting
Mon Aug 14, 2017 7:32 pm
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 6226

Re: Play mp3 file dependant on python output

Something like attached?
It is a quick and dirty proof of concept.
by jehutting
Mon Aug 14, 2017 3:45 pm
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 6226

Re: Play mp3 file dependant on python output

Yes.. use python's basic type list . Use the list function append to add the selected track to this list. A thread could then -in a while loop- use the list function pop(0) to get the first track from the list and play it (with the Popen function). After the Popen function, you can with the subproce...
by jehutting
Mon Aug 14, 2017 3:00 pm
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 6226

Re: Play mp3 file dependant on python output

OK...took some time to figure out why the Popen throwed an exception :D The problem is the missing of the following line:

Code: Select all

import subprocess
Put it at the top of the file (below "import logging").
by jehutting
Mon Aug 14, 2017 1:30 pm
Forum: General discussion
Topic: Play mp3 file dependant on python output
Replies: 58
Views: 6226

Re: Play mp3 file dependant on python output

OK... but what exactly doesn't work? When you execute on the command line cat /var/log/jukeboxcontroller.log what do you get? Expect to see some "+++ TRACK FOUND +++... " lines for every button you pressed on your wallbox. Do you get the print-statement of the play_song function? Expect to see the l...

Go to advanced search