Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex

Notices

Reply
 
Thread Tools Search this Thread
Old 12-19-2008, 04:57 AM   #1
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
mpg123 v1.6.2 for iLiad

This is a console mode mp3 player. Because of its console mode user interface, it's fast and lightweighted, and easy to be controlled from contentlister.

There are two ways to control mpg123, one is from shell, and the other is from its "Generic Control Interface". The former is what I used in the package for illustration. The later is used to provide an interface to all frontends.
Ideally, using "Generic Control Interface" is a better way to control mpg123 from contentlister, but I don't know how. I still don't know how to do it, so I can only point this out and leave it for people to study.

How to install:
1. Download and unpack the attachment to dir "programs" of your SD/MMC, and then a dir "mpg123" will emerge.
2. put a mp3 in "mpg123" dir, rename it as "test.mp3".
3. The path is not mandatory, unpack it to anywhere should be working.

How to operate:
1. Tap "play music" from contentlister, wait for music play and then you can open your favorite book.
2. In the attachment, I provide an expample to play one mp3 file, and you can't stop, pause, control volume... more control commands can be added to shell script. But I would suggest people study how to control mpg123 via "Generic Control Interface".
3. After music played, it seems that mpg123 is still in idle process, so I can't play it once more, unless after reboot. It should be fixable by using proper command.

This man doc is well formated. See it here.

There are two attachments. Just download v1.6.3pre. It works fine for remote control interface. Thanx for Thomas' help.

Added:
I mistakenly removed some static lib from 1.6.3pre package. It's re-uploaded now.
Attached Files
File Type: zip mpg123.1.6.iliad.bin.zip (300.7 KB, 211 views)
File Type: zip mpg123.1.6.3pre.iliad.bin.zip (1.05 MB, 185 views)

Last edited by ericshliao; 12-19-2008 at 05:13 PM.
ericshliao is offline   Reply With Quote
Old 12-19-2008, 05:41 AM   #2
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Below is command option of mpg123. FYI.

Quote:
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.6.2; written and copyright by Michael Hipp and others
free software (LGPL/GPL) without any warranty but with best wishes

usage: .. [option(s)] [file(s) | URL(s) | -]

input options

-k <n> --skip <n> skip n frames at beginning
-n --frames <n> play only <n> frames of every stream
--fuzzy Enable fuzzy seeks (guessing byte offsets or using approximate seek points from Xing TOC)
-y --no-resync DISABLES resync on error (--resync is deprecated)
-p <f> --proxy <f> set WWW proxy
-u --auth set auth values for HTTP access
--ignore-mime ignore HTTP MIME types (content-type)
-@ <f> --list <f> play songs in playlist <f> (plain list, m3u, pls (shoutcast))
-l <n> --listentry <n> play nth title in playlist; show whole playlist for n < 0
--loop <n> loop track(s) <n> times, < 0 means infinite loop (not with --random!)
--keep-open (--remote mode only) keep loaded file open after reaching end
--timeout <n> Timeout in seconds before declaring a stream dead (if <= 0, wait forever)
-z --shuffle shuffle song-list before playing
-Z --random full random play
--no-icy-meta Do not accept ICY meta data
-i --index index / scan through the track before playback
--index-size change size of frame index
--resync-limit <n> Set number of bytes to search for valid MPEG data; <0 means search whole stream.

output/processing options

-o <o> --output <o> select audio output module
--list-modules list the available modules
-a <d> --audiodevice <d> select audio device
-s --stdout write raw audio to stdout (host native format)
-S --STDOUT play AND output stream (not implemented yet)
-w <f> --wav <f> write samples as WAV file in <f> (- is stdout)
--au <f> write samples as Sun AU file in <f> (- is stdout)
--cdr <f> write samples as raw CD audio file in <f> (- is stdout)
--reopen force close/open on audiodevice
-g --gain set audio hardware output gain
-f <n> --scale <n> scale output samples (soft gain, default=32768)
--rva-mix,
--rva-radio use RVA2/ReplayGain values for mix/radio mode
--rva-album,
--rva-audiophile use RVA2/ReplayGain values for album/audiophile mode
-0 --left --single0 play only left channel
-1 --right --single1 play only right channel
-m --mono --mix mix stereo to mono
--stereo duplicate mono channel
-r --rate force a specific audio output rate
-2 --2to1 2:1 downsampling
-4 --4to1 4:1 downsampling
--pitch <value> set hardware pitch (speedup/down, 0 is neutral; 0.05 is 5%)
--8bit force 8 bit output
-d n --doublespeed n play only every nth frame
-h n --halfspeed n play every frame n times
--equalizer exp.: scales freq. bands acrd. to 'equalizer.dat'
--gapless remove padding/junk on mp3s (best with Lame tag)
This is on by default when libmpg123 supports it.
--no-gapless disable gapless mode, not remove padding/junk
-D n --delay n insert a delay of n seconds before each track
-o h --headphones (aix/hp/sun) output on headphones
-o s --speaker (aix/hp/sun) output on speaker
-o l --lineout (aix/hp/sun) output to lineout
-b <n> --buffer <n> set play buffer ("output cache")
--smooth keep buffer over track boundaries

misc options

-t --test only decode, no output (benchmark)
-c --check count and display clipped samples
-v[*] --verbose increase verboselevel
-q --quiet quiet mode
-C --control enable terminal control keys
--title set xterm/rxvt title to filename
--long-tag spacy id3 display with every item on a separate line
--utf8 Regardless of environment, print metadata in UTF-8.
-R --remote generic remote interface
--remote-err force use of stderr for generic remote interface
--aggressive tries to get higher priority (nice)
-T --realtime tries to get realtime priority
-? --help give compact help
--longhelp give this long help listing
--version give name / version string

See the manpage ..(1) for more information.
As to the "Generic Control Interface", here is some hint:
use "mpg123 -R" to start, and tranfer command through pipe.
ericshliao is offline   Reply With Quote
 
Advertisement
Old 12-19-2008, 08:41 AM   #3
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
use this command to scan a directory for mp3 recursively and play randomly:
Quote:
find your_mp3_dir ./ -name "*.mp3" | mpg123 -Z -@ -
I learned from here
ericshliao is offline   Reply With Quote
Old 12-19-2008, 12:55 PM   #4
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
I tried to execute the following command in console:
Code:
mkfifo /tmp/pipe
mpg123 -R < /tmp/pipe &
echo "load test.mp3" < /tmp/pipe &
From the output on screen, it seems that the command "load test.mp3" was actually sent to mpg123. mpg123 did load the mp3 file and print ID3 tag contained in the mp3 file. Then, mpg123 stopped. What's the problem?
ericshliao is offline   Reply With Quote
Old 12-19-2008, 04:06 PM   #5
-Thomas-
Addict
-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.
 
-Thomas-'s Avatar
 
Posts: 325
Karma: 1725
Join Date: Dec 2007
Location: Münster, Germany
Device: iRex iLiad v2
The FIFO control doesn't work on my PC either, but if you compile it with --enable-fifo=yes, then you can do the following:
Code:
mpg123 -R --fifo /tmp/fifo &
echo "load file.mp3" > /tmp/fifo

Last edited by -Thomas-; 12-19-2008 at 07:18 PM.
-Thomas- is offline   Reply With Quote
Old 12-19-2008, 04:12 PM   #6
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Ah! thanx for this info. But it's strange. According to help info, fifo should be auto enabled on Linux. Anyway, I'll give it another try.
ericshliao is offline   Reply With Quote
Old 12-19-2008, 04:26 PM   #7
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
I have checked it. Compile option "fifo" is auto enabled.
Which mpg123 version are you using on your PC? It seems that command option "--fifo" is not available for v1.62.

Added:
I was wrong. I should use "mpg123 -R --fifo /tmp/fifo &" instead of "mpg123 -R --fifo=/tmp/fifo &". It works now.
Thanx again.

Last edited by ericshliao; 12-19-2008 at 04:29 PM.
ericshliao is offline   Reply With Quote
Old 12-19-2008, 07:20 PM   #8
-Thomas-
Addict
-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.-Thomas- once ate a cherry pie in a record 7 seconds.
 
-Thomas-'s Avatar
 
Posts: 325
Karma: 1725
Join Date: Dec 2007
Location: Münster, Germany
Device: iRex iLiad v2
I'm using version 1.4.3. The syntax you posted is right, I just corrected the little typo in my post.

Finally, was fifo support really auto-enabled or did you set the option manually? And why didn't --fifo show up in the command options?
-Thomas- is offline   Reply With Quote
Old 12-20-2008, 03:09 AM   #9
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 974
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by -Thomas- View Post
Finally, was fifo support really auto-enabled or did you set the option manually? And why didn't --fifo show up in the command options?
I guess it's a bug in mpg123's configure script. In the final report produced by configure, it showed that fifo was enabled even though I didn't manyally enable it. But it's not actually enabled until manually enabled. That's why "--fifo" command option not shown.
ericshliao is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
iliad-regutils: Easy editing of the iLiad registry Martijn iRex 7 09-04-2010 07:12 AM
POLL to Iliad owners: Should people buy an Iliad or not? ali iRex 20 01-20-2010 07:11 AM
iLiad How to make iliad into a SSH server and connect with iLiad tudou331100 iRex Developer's Corner 21 02-06-2009 06:35 AM
Ended Iliad iRex + Iliad cover for sale in London acorral Flea Market 0 01-16-2009 07:09 AM
iLiad Book Edition slower than iLiad v2: different sw version? SecondoMe iRex 17 05-14-2008 02:42 PM


All times are GMT -4. The time now is 01:11 AM.


MobileRead.com is a privately owned, operated and funded community.