Go to advanced search

by DEXTER_STARK
Fri Jan 17, 2020 1:02 pm
Forum: Networking and servers
Topic: Change the text of a file remotely
Replies: 12
Views: 523

Re: Change the text of a file remotely

Can you please explain a little more . i think the ssh way can only work if you're and the raspebrry pi connected to the same network. I'm not an expert but I would expect ssh (and scp) to work to any host that you can address (can ping) that has ssh enabled. There must not be a firewall blocking p...
by DEXTER_STARK
Fri Jan 17, 2020 1:01 pm
Forum: Networking and servers
Topic: Change the text of a file remotely
Replies: 12
Views: 523

Re: Change the text of a file remotely

If you are up for a bit of programming/scripting you could also just put the movie-name on the internet somewhere and create a service on the Pi that checks that place every 5 minutes and updates the file if it changes. I think this is the best idea presented so far. It does not require tearing dow...
by DEXTER_STARK
Fri Jan 17, 2020 9:55 am
Forum: Networking and servers
Topic: Change the text of a file remotely
Replies: 12
Views: 523

Re: Change the text of a file remotely

You can execute remote commands with ssh. ssh [email protected] 'command list' The commands may be anything, including in your case "sed", or a home written program to change the text. As usual separate multiple commands with ';'. ssh will ask for Pi's password, however that can be avoided simply enough (ssh...
by DEXTER_STARK
Fri Jan 17, 2020 9:53 am
Forum: Networking and servers
Topic: Change the text of a file remotely
Replies: 12
Views: 523

Re: Change the text of a file remotely

You should proably put the name of the file you want to watch in a separate file and read that file from "/etc/profile". example: movie=$(cat /home/pi/movie.txt) omxplayer $movie Now you only have to overwrite the whole file movie.txt instead of editing a more critical system file like "/etc/profil...
by DEXTER_STARK
Thu Jan 16, 2020 5:26 pm
Forum: Networking and servers
Topic: Change the text of a file remotely
Replies: 12
Views: 523

Re: Change the text of a file remotely

Haha
Actually i'm sorry for that

that what happens when you're on a project and you got stuck .. you are desprate.
by DEXTER_STARK
Thu Jan 16, 2020 4:26 pm
Forum: Français
Topic: Pi 0 crash
Replies: 8
Views: 370

Re: Pi 0 crash

Bonjour , Quand j'ai vu ton probleme j'ai voulu vraiment t'aider mais je pense que la seul chose qui crash ton raspberry pi c'est le model :| peut etre il faut investir mieux et prendre le raspberry pi 3 model b+ ou pluton RPI 4 . PS : je ne suis pas dans l'equipe de raspberry donc ce reply n'est pa...
by DEXTER_STARK
Thu Jan 16, 2020 4:16 pm
Forum: Networking and servers
Topic: Change the text of a file remotely
Replies: 12
Views: 523

Change the text of a file remotely

Hello , I'm new to programming , i want to know if there is anyway if i could change a text in a file remotley in a distance , the file format is shell and the file it is /etc/profile what have inside it is : omxplayer rtmp://www.example/live:13587.com and i need to change this source everytime i wa...
by DEXTER_STARK
Thu Jan 16, 2020 3:46 pm
Forum: Python
Topic: OMXPLAYER VIDEO STATUS
Replies: 19
Views: 836

Re: OMXPLAYER VIDEO STATUS

Can you monitor the connection somehow, and if the data rate drops down you know that something is awry? You would need to google for how to monitor a network interface for current speed. you mean like a cacti thing ? i don't need that because i need these result for another thing ( display on a mi...
by DEXTER_STARK
Thu Jan 16, 2020 1:48 pm
Forum: Français
Topic: OMXPlayer : flux video
Replies: 1
Views: 178

OMXPlayer : flux video

Bonjour, je fait un streaming en rtmp avec omxplayer voir cette commande : omxplayer rtmp www.example/live:1358.com . Je veux un script ( python , shell , .... n'importe quelle langue ) qui renvoie une valeur et la stocker dans une variable : True si il y'as de flux est tout marche bien, False si il...
by DEXTER_STARK
Thu Jan 16, 2020 1:25 pm
Forum: Python
Topic: OMXPLAYER VIDEO STATUS
Replies: 19
Views: 836

Re: OMXPLAYER VIDEO STATUS

I could not get that command to do anything useful - not that I tried very hard. It seems to want an arg, so I tried both 2 and 7 (the only numbers I know), but all it did Thanks for trying. :D whatevercommand 2>&1 | grep whatever > /dev/null && echo "It worked!" That should get on the path to wher...
by DEXTER_STARK
Thu Jan 16, 2020 11:55 am
Forum: Python
Topic: OMXPLAYER VIDEO STATUS
Replies: 19
Views: 836

Re: OMXPLAYER VIDEO STATUS

Note that they were not quite duplicates. This thread (the one I am posting to now) is Python-centric. The other one was language agnostic (It specifically said "any language"). I gave a shell-based solution in the other thread. Of course, who knows what OP really wants or needs... Agree 100% with ...
by DEXTER_STARK
Thu Jan 16, 2020 11:04 am
Forum: Python
Topic: OMXPLAYER VIDEO STATUS
Replies: 19
Views: 836

Re: OMXPLAYER VIDEO STATUS

rpiMike wrote:
Thu Jan 16, 2020 10:54 am
So what does 'pip3 install omxplayer-wrapper' output?
it worked actually, it had to add the '3 :roll:
by DEXTER_STARK
Thu Jan 16, 2020 10:50 am
Forum: Python
Topic: OMXPLAYER VIDEO STATUS
Replies: 19
Views: 836

Re: OMXPLAYER VIDEO STATUS

I don't think this code will do what you are after. However the code should work, it runs fine for me. Are you using the latest fully updated Raspbian Buster with Desktop? Should just need: pip3 install omxplayer-wrapper I totaly agree with you and yes i'v got all update. if you have any idea that ...
by DEXTER_STARK
Thu Jan 16, 2020 10:32 am
Forum: Python
Topic: OMXPLAYER VIDEO STATUS
Replies: 19
Views: 836

Re: OMXPLAYER VIDEO STATUS

You could use the Python omxplayer wrapper. https://python-omxplayer-wrapper.readthedocs.io/en/latest/ from omxplayer.player import OMXPlayer import time,signal,sys def signalHandler(sig,frame): print('Ctrl+C pressed') player.quit() sys.exit(0) def playerPause(): print('pause') def playerExit(code)...
by DEXTER_STARK
Thu Jan 16, 2020 10:12 am
Forum: Python
Topic: OMXPLAYER VIDEO STATUS
Replies: 19
Views: 836

Re: OMXPLAYER VIDEO STATUS

Hmm, that's a bit more difficult. ALthough still a bit confused. If OMXplayer is running it will always be outputting something. Do you mean outputting a black screen? And of course, the HDMI will always be outputting something (desktop, console etc) even when OMXPlayer is not running. So specifica...
by DEXTER_STARK
Thu Jan 16, 2020 9:54 am
Forum: Python
Topic: OMXPLAYER VIDEO STATUS
Replies: 19
Views: 836

Re: OMXPLAYER VIDEO STATUS

Hello Thanks jamesh for replying to my topic Actually that wasn't my question .... my bad i didn't explain well. :roll: my question was i want a script that return true if there is a video signal ( OMXPLAYER can be running but showing nothinhg in this case i want the return value to be false ) and f...
by DEXTER_STARK
Wed Jan 15, 2020 4:27 pm
Forum: Python
Topic: OMXPLAYER VIDEO STATUS
Replies: 19
Views: 836

OMXPLAYER VIDEO STATUS

Hi , Everyone

I want a python script / shell script that returns a value while exiting but not any value the value should be the video status of omxplayer ( True / False )

sorry if this is a reapeted question ... i don't think so isearched everywhere.

Thanks.

Go to advanced search