Showing posts with label mplayer. Show all posts
Showing posts with label mplayer. Show all posts

Friday, October 18, 2013

5.3 amd64 X200: MP3 file not detected in ncmpcpp / mpd / mpc.

Hi,

I have collections of mp3 audio in my lappy. Nowadays, instead of mplayer which I use specifically for videos, I use mpd. For the frontend, I use ncmpcpp which is a curse-based console, uh, GUI(?). I has many great features which you can refer to from the link I've given.

Ok, there's a collection of mp3s I'm currently listening to. Around 114 files. Then I realised that a few files is not listed in ncmpcpp even when I tried (U)pdating the file browser. When I do ls in the directory, the file is there. I can play the file using mplayer.

I tried using mpc, command line for mpd but I still cannot list the file.

Fearing that I may have a corrupted mp3 file, I was prepared to download that hundred Mbs worth of files when I saw this:

$ ls -lh
-rw-r--r-- Audio_that_is_ok.mp3
-rw-r--r-- Audio_that_is_ok_2.mp3
-rw------- Audio_that_is_not_detected.mp3
-rw-r--r-- Audio_that_is_ok_3.mp3

*ting!*. Ohhhh. That's the reason. Ahah! That files is set to (r)ead/(w)rite for me only. So I chmod 644 the affected files and after (u)pdating my ncmpcpp, all is well.

Sometime we overlooked the simplest thing. Oh ok maybe just me. Later.

Wednesday, February 09, 2011

OpenBSD NC4200: Using Plantronics USB Headset.

It's been a while since I last post anything. My OpenBSD box is still running great. Yesterday I got a Plantronics USB Headset and I wanted to see if I can get it to work in my 4.8. When I plugged the headset, here's the dmeg:

uaudio0 at uhub1 port 1 configuration 1 interface 0 "Plantronics Plantronics USB Headset" rev 2.00/1.20 addr 3
uaudio0: audio rev 1.00, 10 mixer controls
audio1 at uaudio0
uhidev1 at uhub1 port 1 configuration 1 interface 3 "Plantronics Plantronics USB Headset" rev 2.00/1.20 addr 3
uhidev1: iclass 3/0
uhid0 at uhidev1: input=1, output=0, feature=0


Seems to be ok. Now to test the headset. For I change the symlinks for these files:

/dev/audio = from /dev/audio0 to /dev/audio1
/dev/sound = from /dev/sound0 to /dev/sound1
/dev/audioctl = from /dev/audioctl0 to /dev/audioctl1
/dev/mixer = from /dev/mixer0 to /dev/mixer1

Normally it can be done manually by using:

$ ln -sf /dev/audio1 /dev/audio

and using the same method for the other 3 devices. I read someone's post on the net and he provided with this simple script which I named chaudio.sh file.

====== chaudio.sh script starts ======
#!/bin/sh

p=$1

ln -sf /dev/audio$p /dev/audio
ln -sf /dev/sound$p /dev/sound
ln -sf /dev/audioctl$p /dev/audioctl
ln -sf /dev/mixer$p /dev/mixer

exit 0

====== chaudio.sh script ends ======

After I created the script, chmod it to executable and then just type:

$ sudo ./chaudio.sh 1

and all 4 symlinks got changed. Doing ./chaudio 0 will change the symlinks back to default sound.

I tried testing the USB headset using:

$ cat /dev/urandon > /dev/audio1

and I can hear sounds on the headset. But, here comes the unsolved (yet) part, using mplayer or mp3blaster will output the sound to the laptop's speaker. Drats. I'm currently trying to figure this out. Got something to do with sndio stuff I guess. Will update on this if I find anything interesting. If you know any tips for this, please share.

Update: I found out that my Plantronics USB Headset is faulty. It's wacko even in XP. Damn. Later then.

6.5 amd64: Modify existing certbot certificates.

Hi, It's been quite some time eh. As you can see, I still upgrade my OpenBSD system regularly but currently I do not have the time to ...