usb sound card and omxplayer


11 posts
by urra901109 » Mon Nov 26, 2012 11:57 am
hey guys :)

just a question, does omxplayer allows you to output its audio through usb sound card. i bought a cheap usb sound card (tenx tech tp6911 chipset) and it works great on MOC player, no more crackling sound during track change.. but omxplayer isn't giving me any sound.
Posts: 34
Joined: Sun Sep 23, 2012 4:48 am
by redhawk » Mon Nov 26, 2012 12:05 pm
User avatar
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1
by dom » Mon Nov 26, 2012 1:37 pm
@urra901109
No, omxplayer doesn't support USB audio (or any form of ALSA).
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5067
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge
by urra901109 » Mon Nov 26, 2012 1:56 pm
dom wrote:@urra901109
No, omxplayer doesn't support USB audio (or any form of ALSA).


aww thats too bad.. :( the only the thing that has been bugging me since i first play video/audio on it. otherwise it is great. thanks for stating it out. :) i guess i need to save up for a monitor with hdmi now.

anyone got any idea to add? i'm up for any hardware mods maybe a little circuit to minimize the crackling effect? it is very loud for my liking.
Posts: 34
Joined: Sun Sep 23, 2012 4:48 am
by ski522 » Mon Nov 26, 2012 6:14 pm
What are you trying to do exactly? If you want to play music or internet radio/music streams, you don't need to use omxplayer, you can install mplayer instead which works fine with ALSA. The only time you need to use omxplayer is for video sources at which point you'll only have to deal with the popping noise at the initial start of the video.
Posts: 394
Joined: Sun Sep 30, 2012 2:22 pm
by urra901109 » Mon Nov 26, 2012 7:16 pm
ski522 wrote:What are you trying to do exactly? If you want to play music or internet radio/music streams, you don't need to use omxplayer, you can install mplayer instead which works fine with ALSA. The only time you need to use omxplayer is for video sources at which point you'll only have to deal with the popping noise at the initial start of the video.


i would like both.. as i said in the 1st post, the usb card works fine with MOC, which i use to play songs. the problem arise when i'm trying to play video(omxplayer). and its not just at the start of the video, but the crackling also happen during fast forward.
Posts: 34
Joined: Sun Sep 23, 2012 4:48 am
by ski522 » Mon Nov 26, 2012 7:31 pm
Yeah, I can see where FF would cause that problem as well...only option at that point is to use an HDMI converter, but they are almost as much as the PI itself...sort of defeats the whole "low cost" solution. Something similar to http://www.meritline.com/mini-hdmi-to-c ... 83103.aspx

Of course I just did a quick search so no promises this is what you would need.

Also, I thought I had saw on the forum somewhere where the GPU was going to be accessible soon by open source apps, so mplayer (and others) might be able to take advantage of the GPU much like omxplayer does today.
Posts: 394
Joined: Sun Sep 30, 2012 2:22 pm
by urra901109 » Mon Nov 26, 2012 7:47 pm
@ski522
i'm really not going to dive into hdmi > component+rca converter. aside from being pricey, it does need another powerplug. currently i'm using some diy powered hub "back powering" the pi. galaxy tab's 10 watts charger is the ceiling for its power consumption, i dont wish to go more

i read it somewhere too about broadcom open sourcing its driver/hardware (not sure which one it is). yeah i hope it is coming soon where all developer can take full advantage af the pi's hardware.

like you said, i just need to deal with the crackling sound till i got enough money to get some decent hdmi tv.. :)
Posts: 34
Joined: Sun Sep 23, 2012 4:48 am
by LordFinland » Wed Apr 19, 2017 3:24 pm
Really guys? All i did was copy the "hw:1,0" which someone mentioned, and write "omxplayer /home/pi/Desktop/Dive.mp3 -o alsa:hw:1,0" and it worked perfectly.
"omxplayer -h" gave me the option -o for audio output and said that the options are either hdmi local both or alsa, so i figured maybe alsa:hw:0,1 might work, and it did.
Posts: 1
Joined: Wed Apr 19, 2017 3:17 pm
by rpdom » Thu Apr 20, 2017 5:48 am
LordFinland wrote:Really guys? All i did was copy the "hw:1,0" which someone mentioned, and write "omxplayer /home/pi/Desktop/Dive.mp3 -o alsa:hw:1,0" and it worked perfectly.
"omxplayer -h" gave me the option -o for audio output and said that the options are either hdmi local both or alsa, so i figured maybe alsa:hw:0,1 might work, and it did.

You are replying to a 5 year old post. At that time there were only two audio options for omxplayer: HDMI or Audio jack (local).
User avatar
Posts: 10671
Joined: Sun May 06, 2012 5:17 am
Location: Essex, UK
by linux_author » Sun May 14, 2017 6:14 pm
rpdom wrote:
LordFinland wrote:Really guys? All i did was copy the "hw:1,0" which someone mentioned, and write "omxplayer /home/pi/Desktop/Dive.mp3 -o alsa:hw:1,0" and it worked perfectly.
"omxplayer -h" gave me the option -o for audio output and said that the options are either hdmi local both or alsa, so i figured maybe alsa:hw:0,1 might work, and it did.

You are replying to a 5 year old post. At that time there were only two audio options for omxplayer: HDMI or Audio jack (local).


well, i would normally agree, but this gentlemen saved me an hour's worth of research on trying to figure out how to route omxplayer's audio through my DAC instead of hdmi - and i *did* read the omxplayer wiki and man page, but there are no illuminating examples of the proper incantation...

in my case, i had to specify:

omxplayer -b -o alsa:hw:0,0 ManBearPig.avi

(RPi3 WDPiDrive running Raspbian Pixel with an Adafruit Stereo Speaker Bonnet and Sony 8 ohm bookshelf speakers)

willie
on the nice-tunage Gulf of Mexico
Posts: 229
Joined: Sat Apr 02, 2016 7:04 pm
Location: Gulf of Mexico