omxplayer audio volume control (Raspberry Pi 4) - raspberry-pi4

I want to control the volume of the omxplayer audio output. I know omxplayer accepts '+' and '-' to change the volume but they are not useful using a slider in a GUI so my idea was to control the general volume of the Raspberry Pi but when I change the volume... nothing changes, the volume is the same as before. Any idea?
To clarify: if I change the master volume the volume bar in the task bar changes but I do not hear any change in the volume of the sound also if I set it to 0%.

Related

DataQ stuck in CDC mode

I have dataQ plugged into a bunch of circuits in the lab that I use to measure Voltage V. Suddenly, I tried to connect to the dataQ in my laptop for the usual testing, but the device did not show up in the "Windaq dashboard" software. The device shows up in the device manager as "COM3". I did some research and I found out that means that the device is in CDC mode and I need it to be in LibUSB mode for it to be detected. to do that the manual says to hold on to the control button after 5s from connecting to the computer until the LED light turns red.
My problem:
I pressed and was holding the button for 1 minute but it never went red. am I misunderstanding the problem ? Any help from experienced people is appreciated.
(Note: I am using DI-4108)
I got the answer from the company itself:
keep pressing the control button as fast as possible and after that press and hold it until the LED is red

Monitor buttons acting totally incorrectly - trying to switch input source instead of showing the OSD

I am a bit new here, English is not my native, so I am sorry for any possible misspelling.
I have a very odd problem - my Xiaomi Mi Surface Display 34" (XMMNTWQ34 model) monitor buttons act really strange - instead of calling the monitor OSD, pressing any of 4 present buttons tries to switch to another possible input source (this is even not their function!), but no luck: just 3 seconds of the black screen and it turns back to the initial image. Let me explain how I got into this.
I have a monitor named before, which has 4 input ports: 2 DP and 2 HDMI. There is a PC always connected to the monitor via the DP interface (DP1 to be exact). Today I tried to connect a second PC via HDMI to the HDMI1 port. It went totally good, I was able to switch between PCs using a monitor OSD. But I thought it was too long and complicated to press a dozen buttons on OSD just to change an input source, so started to google any other programmatical methods of doing such thing.
Some fact: there are no drivers for this monitor on the Internet (it actually works at full 3440x1440#144 Hz resolution/refresh rate via DP interface without any trouble, but Windows sees it as "Generic PnP Monitor", so I see no way to fix it without a relevant driver).
I have found that any VESA-compatible monitor has the 0x60 parameter, which means exactly "input source", so altering the value of this parameter switches the input source without the need to call an OSD. I have found that the possible values of this 0x60 parameter for my monitor provided by several utilities are: 0x0F, 0x10, 0x11, and 0x12. But setting any of these values got me no luck - the screen just flashed black and nothing more. Moreover, those utilities showed that the current value of the 0x60 parameter was 0x07 - described as "S-Video 1" input source, and it did not change at any made tries. But my monitor does not even have such input ports!
But I discovered a total disaster a bit later - when I tried to switch the input source via OSD, I was not able to call it - any of the 4 buttons on the monitor was causing a black flash and nothing more! So OSD is now totally unavailable! This is madness. I can't enter the OSD, I can't change the input source without turning off any one of 2 connected PCs, I can't do anything which is supposed to be made via OSD. Rebooting and reattaching of every possible thing has no effect - even with 2 PCs being connected to monitor and waiting to enter a BIOS password (no OS loaded whatsoever): pressing any button on the monitor causes only black flash and nothing more, no OSD called. I guess this is a strictly monitor firmware issue because the OSD worked well until yesterday.
I have absolutely no idea how to solve this, I googled this all day long, but no luck. System restore did not change anything. Please help. Thank you all very much.
Same issue after using ControlMyMonitor App. At the time being, i didn't found any solution to get the OSD back. And I didn't found any solution to factory reset the monitor, I don't know if it's possible.
I strongly discourage users to use any kind of VESA com application on this Xiaomi 34 monitor !
Now, the best solution in order to switch inputs, is to disconnect or shutdown one of the computer connected, ans it will switch automaticaly to the only one remaining. (Or use a VESA script...)

Version/Time of FingerPrint/Face

We have a few of these units and need to "synchronise" or "replicate" across devices.
We have a program which connects to each of them and collects the data using the functions, GetUserFaceStr and GetUserTmpExStr.
The current flow is to compare the differences between a primary and secondary scanner, and if there's any differences, copy the record on the primary scanner to the secondary scanner. This works to a point.
However we are aware that the scanners are adaptive and the Finger Print templates and Face templates update over time on the scanner, and we have seen this happening.
Is there a way we can get the date or version or the fingerprint or face so that we can always sync the latest versions across?
No, you canĀ“t do that.
I suggest that if you have both Master and Slave devices, just update the slave device with the templates registered on the Master and forget about what is contained on the Slave.
Just force the update every time the Master has any changes.
Best regards.

Automatic Stopwatch with Raspberry PI

I want to build a automatic stopwatch for dog agility.
It's not very accurate to start and stop time with a ordinary one.
I need a sensor on the first jump and another sensor on the last jump.
The first start time and the second stop time.
And then view time on a display or so.
I found this project that is alike what i want.
https://www.hackster.io/falafelsoftware/ir-break-beam-hot-wheels-car-speed-track-361455
The sensor used in this Adafruit Breakbeam Sensor
https://learn.adafruit.com/ir-breakbeam-sensors/overview?view=all
If i understand it correctly the range is only up to 50 cm.
A jumps width is normally 120 cm but it can be up to 140 cm.
So i need at least 120cm range.
I want to use a raspberry Pi and windows C#.
I have experience with c# and visual studio but this will be my first IOT project.
I am very thankful for any help and tips to build this.
Specially tips on a sensor that will work for me.

Time synchronization of views generated by different instances of the game engine

I'm using open source Torque 3d game engine for the avia simulator project.
I need to generate single image from the several IG (image generator) PCs.Each IG displays has its own view camera with certain angle offset and get the info about the current position from the server via LAN.
I've already setup multi IG system.
Network connection is robust (less than <1 ms)
Frame rate is good as well - about 70 FPS on each IG.
However while moving the whole picture looks broken because some IG are updating their views faster than others.
I'm looking for the solution that will make the IG update simultaneously. Maybe some kind of precise time synchronization algorithms that make different PC connected via LAN act as one.
I had a much simpler problem, but my approach might help you.
You've got to run clocks on all your machines with, say, a 15 millisecond tick. Each image needs to be generated correctly for a specific tick and marked with its tick ID time. The display machine can check its own clock, determine the specific tick number (time) for which it should display, grab the images for that specific time, and display them.
(To have the right mindset to think about this, imagine your network is really bad and think about one IG delivering 1000 images ahead of the current display tick while another is 5 ticks behind. Write for this sort of system and the results will look really good on the one you have.)
Ideally you want your display running a bit behind the IGs so you always have a full set of images for the current tick. I had a client-server setup and slowed the display (client) timer down if it came close to missing updates and sped it up if it was getting too far behind. You have to synchronize all your IG machines, so it might be better to have the master clock on the display and have it send messages to speed up any IG machine that's getting behind. (You may not have the variable network delays I had, but it's best to plan for them.)
The key is that each image must be made at a particular time, that the display include only images for the time being displayed, and that the composite images appear right when they should (every 15 milliseconds, on the millisecond). Also, do not depend on your network or even your machines to do anything in a timely manner. Use feedback to keep everything synched.
Addition On Feedback:
Say the last image for the frame at time T arrives 5ms after time T by the display computer's time (real time). If you display the frame for time T at T plus 10 ms, no one will notice the lag and you'll have plenty of time to assemble the images. Using a constant (10 ms) delay might work for you, especially if you make it big enough. It may be the way to go if you always run with the exact same network.
But you are depending on all your IG machines being precisely synchronized for real time, taking no more than a certain amount of time to produce their image, and delivering their image to the display machine all in predictable lengths of time.
What I'd suggest is have your display machine determine the delay based on the time stamps on the images it receives. It would want to increase the delay if it isn't getting the images it needs in time, and decrease it if all the IG's are running several images ahead of what the display needs. (You might want to ignore the occasional really late image. You have to decide which is more annoying: images that are out-of-date, a display that is running noticably behind time, or a display that noticably speeds up and slows down.)
In my original answer I was suggesting some kind of feedback from the display to keep the IG machines running on time, but that may be overkill: your computer's clocks are probably good enough for that.
Very generally, when any two processes have to coordinate over time, it's best if they talk to each other to stay in step (feedback) rather than each stick to a carefully timed schedule.

Resources