Page 1 of 2
need command line mp3/ogg player
Posted: 02 Oct 2007, 09:14
by BigHead
I'm working on a dynamic music lua widget. Lua doesn't support mp3/ogg playback at the moment. However lua can launch external applications so command line player would make the widget possible (actually it's possible right now with my wav hack but the quality is awful).
I need the player to behave like this:
Code: Select all
>player playlist1
(plays random song from playlist1)
>player playlist2
(stops playing playlist1 and plays random song from playlist2)
>player -quit
(stops playback and quits the player)
*The syntax doesn't need to be so simple - it's just an example
Also being cross-platform and GPL compatibile would be a nice bonus.
I tried mplayer but it starts a second instance so I have two songs playing at one time.
Thanks for your suggestions!
Posted: 02 Oct 2007, 16:51
by Forboding Angel
Have you tried
http://www.videolan.org/ ?
Videolan is pretty much made of total win. Also it's OS.
Posted: 02 Oct 2007, 17:13
by jK
videolan and mplayer aren't usefull in this case, cause they are heavy in size and slow in startup, as well (iirc) they don't support single instancing (they don't send messages to a running instance).
So it has to be a very small (only some kB in size) commandline player without any video support.
perhaps
mpg123?
Posted: 02 Oct 2007, 20:38
by BigHead
mpg123 doesn't support song switching (single instance) so it can't be used

btw vlan does but it's way too slooow ...
Posted: 02 Oct 2007, 20:41
by Forboding Angel
Posted: 02 Oct 2007, 20:42
by Forboding Angel
An additional 5 seconds
http://herrie.info/
Posted: 02 Oct 2007, 20:43
by Forboding Angel
Posted: 02 Oct 2007, 20:50
by BigHead
linux only
linux only
download page no longer avaliable and propably linux only as well
2 hours on google
Posted: 02 Oct 2007, 21:00
by Neddie
Plait isn't Linux only, I'm pretty sure.
Posted: 02 Oct 2007, 21:06
by BrainDamage
they are both not linux-only, but since only the source is released, you'll have to build yourself a windows version
i might take a look @ cross-compiling one using mingw if there won't be and alternative
btw mpg123 SUPPORTS song switching
mpg123 -R
@R MPG123 (ThOr) v2
help
@HELP/H: command listing (LONG/SHORT forms), command case insensitve
@LOAD/L <trackname>: load and start playing resource <trackname>
@LOADPAUSED/LP <trackname>: load and start playing resource <trackname>
@PAUSE/P: pause playback
@STOP/S: stop playback (closes file)
@JUMP/J <frame>|<+offset>|<-offset>: jump to mpeg frame <frame> or change position by offset
@EQ/E <channel> <band> <value>: set equalizer value for frequency band on channel
@SEQ <bass> <mid> <treble>: simple eq setting...
@SILENCE: be silent during playback (meaning silence in text form)
@meaning of the @S stream info:
@S <mpeg-version> <layer> <sampling freq> <mode(stereo/mono/...)> <mode_ext> <framesize> <stereo> <copyright> <error_protected> <emphasis> <bitrate> <extension> <vbr(0/1=yes/no)>
@LOAD/L <trackname>: load and start playing resource <trackname>
maybe your version is too old? mine is 0.60
Posted: 02 Oct 2007, 21:18
by jK
oh remote access is new in v0.6*
The only windows binary I found is v0.59:
here
So if someone could compile/find a newer version for windows
PS: plait needs cygwin -> too much work for a luaUI music player ...
Posted: 03 Oct 2007, 00:01
by SwiftSpear
Spring can play MP3 last time I checked... I'm not sure about OGG...
Posted: 03 Oct 2007, 01:20
by lurker
SwiftSpear wrote:Spring can play MP3 last time I checked... I'm not sure about OGG...
seriously? as in it can play them in certain situations or as in mp3s can be used for all sound effects?
Posted: 03 Oct 2007, 05:27
by SwiftSpear
lurker wrote:SwiftSpear wrote:Spring can play MP3 last time I checked... I'm not sure about OGG...
seriously? as in it can play them in certain situations or as in mp3s can be used for all sound effects?
As I understand it there is a playsound command modders currently bind into unit scripts and what not... Maby I was assuming wrong but I figured it should be possible to just use a lua based list of files and feed data to the playsound command which would then play the songs in spring. All the controls would be issued via lua but functionality spring already has would do the work.
Posted: 03 Oct 2007, 06:46
by SinbadEV
I would use video lan and one of the alternative interfaces.
Posted: 03 Oct 2007, 07:21
by knorke
Posted: 03 Oct 2007, 09:49
by BigHead
I thought I'd try foobar but discovered that spring implementation of lua doesn't support os.execute() command. This means that you can't run external apps from luaUI.
Thanks for your help anyway!
SwiftSpear: Are you sure about that playsound command? Anyway it would only be useful if there was stopsound command as well. Can anyone clear this for me (us)?
Posted: 03 Oct 2007, 11:08
by SwiftSpear
BigHead wrote:
I thought I'd try foobar but discovered that spring implementation of lua doesn't support os.execute() command. This means that you can't run external apps from luaUI.
Thanks for your help anyway!
SwiftSpear: Are you sure about that playsound command? Anyway it would only be useful if there was stopsound command as well. Can anyone clear this for me (us)?
From what I understand everything needed for MP3s is there. Playsound, stopsound, and volume control. I don't think there are controls to execute sounds part way through a track, but I can only think of very very few soundtrack implementations that need it...
Sorry I can't be more clear, I could be totally wrong, this is just stuff I was garnishing out of random development forum threads...
http://spring.clan-sy.com/phpbb/viewtopic.php?t=11643
Browse through that thread and see if you can find something helpful... It has some lua playsound scripts...
Posted: 03 Oct 2007, 11:28
by BigHead
Nope, the thread is about Spring.PlaySoundFile() which plasy .wav files and can't stop the sound once it started. It's also the method I use in my hack.
Dynamic music widget I think we're loosing you ...
*edited spelling*
Posted: 03 Oct 2007, 11:30
by SwiftSpear
mmm, I misunderstood then...
So likely we need an engine patcher on board to add the necessary MP3 and ogg stuff to spring then
