Your Digital Media Has Never Looked So Good

  • 1
  • 2
  • 3
  • 4
  • 5
  • 7
 
soiaf
Topic Author
Posts: 785
Joined: Fri Jan 14, 2005 5:19 am

FLAC codec for fw 2.0.36

Sat Apr 23, 2005 4:25 am

Heres my 'release' version of the FLAC codec for the 2.0.36 firmware. The FLAC codec now supports ReplayGain. The default option is that this is disabled and the codec will run in its normal lossless mode. If you wish to enable ReplayGain then run the script enableReplayGain.roku included in this package. ReplayGain will only be applied to FLAC files that have the necessary tags within the files.
While the PhotoBridge does not support 24 bit sample sizes, the codec does support files using 24 bit samples. These files are 'dithered' to 16bit during playback. While this process is not lossless, it does mean that the codec does play the files.

Please run the sonata application at least once before making these changes (the sonata application makes a number of files the first time it is ever run).

Two possible ways of installing this, the easy way (just click on an icon to install) or the techie way (using telnet etc.).

Easy Method

Download the following package

http://members.upc.ie/p.mc.quillan/FLACinstall_V1.1_fw36.zip

Unzip the contents on your computer (keep the directory structure).

Create a directory (lets say codecs) on a compact flash card or network share and copy the contents of the zip file into this directory.

You should be then ready to install - an icon should be on the desktop (in the share or compact flash card where you installed the files) - the application will be called installFLACcodec

Click on this.

You should now be able to play your FLAC files!

Important Note This install script does not copy the codec into the internal memory of the PhotoBridge - the codec is stored in the directory you created on the compact flash card (or network share).. If the PhotoBridge cannot see the codec (say you've removed the compact flash card that you stored the codec on) then you can't play FLAC files.

More details in the readme file enclosed in the zip file.


Techie Method

Download the above zip file

+++++++
Step 1
======


Add the following line

flac:String:FLAC

to the end of the file

/etc/rokucascade/settings/com.roku.deschutes.sonata.extensions

Step 2
======

After extracting from the codec library zip file, copy the file

libCascadeAudioCodecFLAC.so

to the directory

/etc/rokucascade/codecs

I would suggest however that you store the FLAC codec (as well as any other third party codecs) in a shared folder or on a compact flash card and put a symbolic link in the /etc/rokucascade/codecs directory linking to that particular codec file - this will keep space free in the internal storage area.

+++++++

This codec should be complete, please let me know if you've any problems.

Edit V0.3.2 is a slightly updated version relative to the version originally uploaded. V0.3.2 has full 8 bps support (as well as the usual 16 bps support).
Edit 29 April V0.4 available. This has slightly neater internal error handling and has had the code generally tidied. Library file is now less than 100KB in size.
Edit 30 April V0.5 available. This fixes a bug where some FLAC files produced extra 'sound' (static or perhaps beeping sound) for a fraction of a second at the end of some songs.
Edit 4 May V0.6 available. This is the release version of the codec. Now using integer-only code, also 13KB smaller in size.
Edit 14 May Added new easy installation method
Edit 21 May Recompiled for 2.0.24
Edit 10 July Version 0.7 available. This version has better overall memory management.
Edit 19 September Version 0.7a available. Added support for 'streamed' FLAC music from SlimRoku.
Edit 20 November Version 0.7b available. Fixed bug when reading metadata from a corrupt FLAC file
Edit 12 January Version 0.8 available. Added optional ReplayGain support
Edit 26 May Version 0.9 available. Added 24 bit playback support.
Edit 2 June 2007 Version 1.0 available. Now based on libFLAC 1.1.4
Edit 10 August 2007 Version 1.1 available. Now based on libFLAC 1.2.0
Last edited by soiaf on Fri Aug 10, 2007 10:26 am, edited 15 times in total.
 
SimonO
Posts: 394
Joined: Sat Sep 04, 2004 11:21 am
Location: UK
Contact:

Mon Apr 25, 2005 11:31 pm

I'm struggling with this..?
Toshiba 36ZP48, Pace Sky+ v1 (120GB), Sonos ZP80, Denon DVD-2900, Denon AVR-3805, Blue Sky SAT 6.5/B&W DM600 S3/ASW675 w/Behringer DSP1124P, Philips Pronto NG RU950/RU951
 
soiaf
Topic Author
Posts: 785
Joined: Fri Jan 14, 2005 5:19 am

Tue Apr 26, 2005 12:07 am

Ok, with what exactly, installing it or using it?

If installing, first thing is to make sure you've used sonata/Listen for the first time since installing 2.0.16, so find an MP3 (or something like that) and listen to it (exactly like you've ever used Listen in the past). That will setup a bunch of internal files used by sonata/Listen and make everything setup to use this codec correctly.

Second, download the addFLACext.zip file. Unzip it. Put the contents of it (addFLACext.roku) on a compact flash card.

Third, download the actual libCascade zip file (first link), unzip it, and put its contents on the compact flash card (its libCascadeAudioCodecFLAC.so ).

So, on the compact flash card there will be two files:
libCascadeAudioCodecFLAC.so
addFLACext.roku

Put the compact flash card in the PhotoBridge.

Telnet into the PhotoBridge, and type the following command:

cd /mnt/flash1


This will bring you to the main compact flash directory.

If you type the following

ls


You should see the two files above.

Now, type the following two commands:
cp libCascadeAudioCodecFLAC.so /etc/rokucascade/codecs/
./addFLACext.roku


You should now be setup. Please let me know if you've any problems, and I'll give more detail.
 
SimonO
Posts: 394
Joined: Sat Sep 04, 2004 11:21 am
Location: UK
Contact:

Tue Apr 26, 2005 5:33 am

Sorry, I should have been more specific... I've copied the files with Barry Gordon's File Handler app and I've double checked that they're where they should be... I can see the FLAC files in sonata, but they won't play..? [They play fine through WinAmp BTW]
Toshiba 36ZP48, Pace Sky+ v1 (120GB), Sonos ZP80, Denon DVD-2900, Denon AVR-3805, Blue Sky SAT 6.5/B&W DM600 S3/ASW675 w/Behringer DSP1124P, Philips Pronto NG RU950/RU951
 
soiaf
Topic Author
Posts: 785
Joined: Fri Jan 14, 2005 5:19 am

Tue Apr 26, 2005 6:18 am

Ok, if sonata can see the FLAC files then that means that the file extension has been successfully 'registered'.

So, either theres something strange about your FLAC files (which I'll be honest would really surprise me) or sonata is not seeing the library file.

So, first thing I'd suggest doing is a complete reboot of the PhotoBridge (unplug machine, or hold power button till light goes off).

Then try again.

If that doesn't work, then we'll try some more steps.
 
SimonO
Posts: 394
Joined: Sat Sep 04, 2004 11:21 am
Location: UK
Contact:

Tue Apr 26, 2005 6:36 am

I've rebooted a few times... If I'm playing an .mp3 and select the .flac file the player stops if that helps... One thing I did notice was that the other three files in 'codecs' were links..?
Toshiba 36ZP48, Pace Sky+ v1 (120GB), Sonos ZP80, Denon DVD-2900, Denon AVR-3805, Blue Sky SAT 6.5/B&W DM600 S3/ASW675 w/Behringer DSP1124P, Philips Pronto NG RU950/RU951
 
soiaf
Topic Author
Posts: 785
Joined: Fri Jan 14, 2005 5:19 am

Tue Apr 26, 2005 6:52 am

Yup, they're links alright.

Basically this means that codecs can be stored in other places than the internal flash card/storage - handy for keeping space free on the internal flash card - so you could keep all your codecs on your own flash card (or share) and just put links to them there.

But that shouldn't have any relevance here. I'll PM you with a few ideas.
I won't try 'interrupting' a song to try a different one at the moment for example - that seems to causes issues.
 
SimonO
Posts: 394
Joined: Sat Sep 04, 2004 11:21 am
Location: UK
Contact:

Tue Apr 26, 2005 10:56 am

Did you get my PM with the FTP link..?
Toshiba 36ZP48, Pace Sky+ v1 (120GB), Sonos ZP80, Denon DVD-2900, Denon AVR-3805, Blue Sky SAT 6.5/B&W DM600 S3/ASW675 w/Behringer DSP1124P, Philips Pronto NG RU950/RU951
 
soiaf
Topic Author
Posts: 785
Joined: Fri Jan 14, 2005 5:19 am

Tue Apr 26, 2005 12:31 pm

Hi,

Yes, got the link ok, thanks for that. And the file plays perfectly for me.
Which as you can imagine is kind of a relief for me :wink: but unfortunately doesn't solve your problem (though obviously its one less thing to consider).
Are to able to telnet into the PhotoBridge by any chance? Theres two commands I'd like to see the output of

ls -al /etc/rokucascade/codecs/libCascadeAudioCodecFLAC.so


that will show ownership, file permissions etc.

and second command

cksum /etc/rokucascade/codecs/libCascadeAudioCodecFLAC.so


Which will check/show the integrity of the file.

Thanks a lot.
 
SimonO
Posts: 394
Joined: Sat Sep 04, 2004 11:21 am
Location: UK
Contact:

Tue Apr 26, 2005 12:51 pm

(none) login: root
# ls -al /etc/rokucascade/codecs/libCascadeAudioCodecFLAC.so
-rwxr-xr-x 1 root root 102316 Apr 25 23:09 /etc/rokucascade/codecs/
libCascadeAudioCodecFLAC.so
# cksum /etc/rokucascade/codecs/libCascadeAudioCodecFLAC.so
856094340 102316 /etc/rokucascade/codecs/libCascadeAudioCodecFLAC.so
#
Toshiba 36ZP48, Pace Sky+ v1 (120GB), Sonos ZP80, Denon DVD-2900, Denon AVR-3805, Blue Sky SAT 6.5/B&W DM600 S3/ASW675 w/Behringer DSP1124P, Philips Pronto NG RU950/RU951
 
soiaf
Topic Author
Posts: 785
Joined: Fri Jan 14, 2005 5:19 am

Tue Apr 26, 2005 1:10 pm

They're fine.
Hmm, so I know the codec can play your files.
We know the codec is in the right location, right permissions etc.
sonata can see the flac files, so that should mean its setup ok.

Only one thing I can think of now, to start sonata via telnet so we can see its output messages (sorry).

So, quit sonata/Listen entirely.
Telnet into your PhotoBridge.
Type the following command
/usr/local/bin/listen


Now, on the PhotoBridge display 'Listen' should have started. It'll probably have started in the 'builtin' directory, but just get to the share with your music on it as normal.

On the telnet display it will give various messages, especially as you select a file. This is what you'll need to grab the output from (just try one file).
Sorry about this, I know this is a lot of hassle - I'm just quite confused what the issue could be at this stage
 
SimonO
Posts: 394
Joined: Sat Sep 04, 2004 11:21 am
Location: UK
Contact:

Tue Apr 26, 2005 1:22 pm

(none) login: root
# /usr/local/bin/listen

ATI Xilleon X225-A13 (Device ID: 4855 Revision: 3)

Aper PhysBase Size VirtBase AperBase Access
00 18000000 00010000 334cd000 334cd000 MM
01 08000000 08000000 2b4cd000 2b4cd000 MM
02 1c000000 04000000 334dd000 334dd000 MM
03 10010000 00001000 374e5000 374e5000 MM
07 10011000 00000100 374e6000 374e6000 MM
08 10011100 00000100 374e7000 374e7100 MM
10 00002200 00000008 00002200 00002200 IO
11 00002208 00000004 00002208 00002208 IO
12 00002220 00000010 00002220 00002220 IO
14 00000000 00008000 00000000 174dd000 MM
15 00000000 00008000 00000000 174dd000 MM
16 00000000 00008000 00000000 174dd000 MM
17 00000000 00008000 00000000 174dd000 MM
18 00000000 00008000 00000000 174dd000 MM
19 00000000 00008000 00000000 174dd000 MM
20 00000000 00008000 00000000 174dd000 MM
22 10008000 00008000 374dd000 374dd000 MM


XCLK = 165 MHz
MCLK = 99 MHz
MIPS = 299 MHz

Memory Configuration: 32-bit 2-Channel DDR.
Channel 0 Size: 02000000 (32 MB)
Channel 1 Size: 02000000 (32 MB)
Total mem Size: 04000000 (64 MB)

Detecting theater...
Error: Rage theater/theater2 not found on VIP bus.

Core Version: 14.0.0.0
LLD Version: 14.0.0.0
HKD Version: 14.0.0.0

Core initialization completed.

Loaded MP3 codec
Loaded WAV codec
Loaded AIFF codec
Notify - startIndex(0), nNumElements(2)
Notify - startIndex(0), nNumElements(0)
Notify - startIndex(0), nNumElements(5)
Notify - startIndex(0), nNumElements(0)
Notify - startIndex(0), nNumElements(5)
Notify - startIndex(0), nNumElements(0)
Notify - startIndex(0), nNumElements(123)
Notify - startIndex(0), nNumElements(0)
Notify - startIndex(0), nNumElements(2)
Notify - startIndex(0), nNumElements(0)
Notify - startIndex(0), nNumElements(14)
Notify - startIndex(2), nNumElements(2)
Notify - startIndex(4), nNumElements(2)
Notify - startIndex(6), nNumElements(2)
Notify - startIndex(8), nNumElements(2)
Notify - startIndex(10), nNumElements(2)
Notify - startIndex(12), nNumElements(2)
OnPlaybackResume()
OnAudioDecodeBegin(1)
Mad error!
OnAudioBuffering(1) 0/4
OnAudioBuffering(1) 1/4
OnAudioBuffering(1) 2/4
OnAudioBuffering(1) 3/4
OnAudioBuffering(1) 4/4
OnAudioPlaybackBegin(1)

Dig the shades and the 'Mad error!'!!! :lol:
Toshiba 36ZP48, Pace Sky+ v1 (120GB), Sonos ZP80, Denon DVD-2900, Denon AVR-3805, Blue Sky SAT 6.5/B&W DM600 S3/ASW675 w/Behringer DSP1124P, Philips Pronto NG RU950/RU951
 
soiaf
Topic Author
Posts: 785
Joined: Fri Jan 14, 2005 5:19 am

Tue Apr 26, 2005 1:29 pm

Mad error! :shock:

That sounds promising :wink:
I'm pretty sure thats not one of my error messages :D

Let me have a dig round, see if I can find anything that might report that type of thing.
 
SimonO
Posts: 394
Joined: Sat Sep 04, 2004 11:21 am
Location: UK
Contact:

Tue Apr 26, 2005 1:32 pm

Thanks, MP3 file BTW...
Toshiba 36ZP48, Pace Sky+ v1 (120GB), Sonos ZP80, Denon DVD-2900, Denon AVR-3805, Blue Sky SAT 6.5/B&W DM600 S3/ASW675 w/Behringer DSP1124P, Philips Pronto NG RU950/RU951
 
soiaf
Topic Author
Posts: 785
Joined: Fri Jan 14, 2005 5:19 am

Tue Apr 26, 2005 1:41 pm

Yup, just spotted that.

So, it seems to think it is an MP3 file. Thats nice :D
Ok, so try the following

cat /etc/rokucascade/settings/com.roku.deschutes.sonata.extensions
  • 1
  • 2
  • 3
  • 4
  • 5
  • 7

Who is online

Users browsing this forum: No registered users and 2 guests