I have no experience with omxplayer and really need some help.
I'm using Pi4 4G running Raspbian GNU/Linux 10 (buster)
my project is using the omxplayer to play very short mp3 files (1 second long), everything was working well until I've updated the project to play the same files to a Blue Tooth receiver instead of the 3.5 jack wired speakers followed by this tutorial, I route the playing to the BT by calling omxplayer with the additional -o alsa:
i then realized that although it seems the file is being played there's no sound coming out of the wireless speaker, after some investigations I played the same file but added two seconds silence to it at the beginning and that "fixed" it so I've learned that very short mp3 files (less than 1.5 second) played with the -o alsa are not being heard but they do heard with 3.5 wired connection.
Code: Select all
subprocess.call(['omxplayer', '-o', 'alsa', fullPath])
the second problem I've encountered using Blue Tooth receiver is the additional delay in time difference between playing the same file with -o alsa to the BT receiver and without to the wired speaker, it takes more than a full second via the BT to start the playing, and since those files are played in direct response to the user's joystick movements it feels like a lot of lag time and this translate to a horrible user experience.
1. how can I make the player to play the file instantly just like when using wired speakers?
2. is there any way to have the player play 1 second mp3 files?
the following are two sample mp3 files, 1.5 second and a 3 seconds file.
this will be heard
this will not be heard
many thanks in advance for any shared thought or advice!