Trying to do audio from CGI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm working on this nifty (heh-heh) MP3 jukebox with a CGI front end.
Part of it scans a directory tree of artists, albums, songs, puts
together a set of web pages someplace else that point to them.  I
intend to use MPG123 as the actual player called by the CGI program.
I call it like
cmd: '/usr/bin/mpg123 "/data/mp3/Queen/-- Studio Albums --/(1975) A
Night at the Opera/11 Queen - Bohemian Rhapsody.mp3" '
Which I have echoing to the browser, I just copied it off the screen.

I can use mpg123 to play MP3 files (as root) and that works normally.
But when I try call it from a CGI program it seems to flail around
trying to find suitable devices and drivers, when the default is fine
at a command line;

igh Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
	version 1.26.3; written and copyright by Michael Hipp and others
	free software (LGPL) without any warranty but with best wishes
Decoder: NEON64
Trying output module: alsa, device: <nil>

Playing MPEG stream 1 of 1: test.mp3 ...

MPEG 1.0 L III cbr320 44100 j-s

	Title:   Bohemian Rhapsody
	Artist:  Queen
	Album:   A Night at the Opera
	Year:    1975
	Genre:   Rock,
	Comment:


> 00000+13590  00:00.00+05:54.95 --- 100=100 320 kb/s 1044 B acc    0 clip p+0.000
> 00008+13582  00:00.18+05:54.76 --- 100=100 320 kb/s 1045 B acc    0 clip p+0.000

I did add the www-data user to the audio group and verify by running
id.  But the web server error log shows:

Directory: /data/mp3/Queen/-- Studio Albums --/(1975) A Night at the Opera/
Playing MPEG stream 1 of 1: 11 Queen - Bohemian Rhapsody.mp3 ...
[src/libout123/modules/portaudio.c:120] error: Failed to open
PortAudio default stream: Device unavailable
main: [src/mpg123.c:323] error: out123 error 7: failed to open device

Why is it now trying PortAudio?  And failing - Audacity works with it.
Could it be something not in www-data's path?

-- 
-------------
Education is contagious.


_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user



[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux