Page 1 of 1

PS3 + FLAC solution

Posted: Sun Dec 13, 2009 5:07 pm
by xadhoom
Hi,

since I did not found any "complete" solution in making flac working with ps3,
I played with my setup and now I've a working solution.

I just want to share it for other users, maybe will be useful.
This works with tms 5.0.68 and 5.1.1 (tested both).

system setup:
ubuntu 9.10 on x86_64
TMS 5.1.1 (ok also with 5.0.68)

* install TMS as usual, I assume that "standard" streaming works with ps3 already.

* install flac : sudo apt-get install flac

* in /usr/local/twonkymedia/cgi-bin create file flac-wav.desc ( or edit it, if already in place) and make it in this way :

Code: Select all

# transcode audio
#(c) 2008 by PacketVideo
exec: flac2wav $infile $outfile
# capabilities
from=audio/x-flac
to=audio/x-wav
synchronous
priority=idle
note that I made it "sync" and not "async", otherwise when you first select the flac, if not in cache, you must
exit from ps3 browser and select same flac again.
On the other hand is better to have a speedy pc :)

* in /usr/local/twonkymedia/cgi-bin create file flac2wav

Code: Select all

#!/bin/bash
/usr/bin/flac --silent --decode "$1" -o "$2"
* make flac2wav executable
sudo chmod +x /usr/local/twonkymedia/cgi-bin/flac2wav

* restart tms

Now it should work on the fly :)

Basically the change here is : use a "wrapper" to better handle filenames with spaces, and make it sync so you don't have to select twice same file...

hope this can be of some help, since I lost an entire morning figuring this out :D

Re: PS3 + FLAC solution

Posted: Sat Jan 09, 2010 12:21 pm
by mgillespie
Many thanks, finally got around to trying this out on my system today, and it works great. A practical solution to having lossless streaming on PS3 (saving 10,000 tracks in WAV is not practical!)

Even on low-power systems, this works really well. I used it on my Marvell Kirkwood ARM based sheevaplug, and there is a small (2-3 second) delay between tracks while it transcodes, but that is' perfectly acceptible IMHO, and it does cache it seems, so any previous transcoded jobs won't need it next time.

Going to sticky this, it's so good...

Re: PS3 + FLAC solution

Posted: Sun Jan 10, 2010 5:51 pm
by titbb
i use

flac.location

c:\flac

(ofc this goes where you installed your flac)


flac-wav.desc

# transcode audio
#(c) 2008 by PacketVideo
exec: flac --silent --decode $infile -o $outfile
# capabilities
from=audio/x-flac
to=audio/x-wav
synchronous
priority=idle


for the windows flac.exe version
works like a charm, can even forward to next songs, hardly any wait needed (flac pops up for like a second)

Re: PS3 + FLAC solution

Posted: Sun Jan 17, 2010 8:33 pm
by redspear
Hi,

Have you change the config files in the resources dir?

Regards,
Luis

Re: PS3 + FLAC solution

Posted: Mon Jan 18, 2010 8:02 pm
by titbb
redspear wrote:Hi,

Have you change the config files in the resources dir?

Regards,
Luis
Only from the cgi-bin folder

Re: PS3 + FLAC solution

Posted: Mon Jan 18, 2010 11:59 pm
by redspear
titbb wrote: Only from the cgi-bin folder
Hi,

Can you post your files?

I can't put it to work.

Thanks

Re: PS3 + FLAC solution

Posted: Thu Jan 21, 2010 12:20 am
by redspear
Anyone?

Re: PS3 + FLAC solution

Posted: Sun Mar 14, 2010 6:49 pm
by Superhelmi
Hello,

Twonky works with flac transcodeing for my Roku Soundbridge.
But when browsing in albums I see every flac titel twice !?
What can I do to see evrery song only once ??

Thank you

Helmi

Re: PS3 + FLAC solution

Posted: Thu Mar 18, 2010 6:09 pm
by roberto82
I'm trying to do transcoding from FLAC to MP3 on the fly. Could you please provide the configuration parameters for that?

I tried:

# transcode audio
#(c) 2008 by PacketVideo
exec: ffmpeg -b 192k -i $infile $outfile
# capabilities
from=audio/x-flac
to=audio/mp3
synchronous
priority=idle

But it does not work.

Thanks.

Re: PS3 + FLAC solution

Posted: Mon Apr 19, 2010 1:03 pm
by bradj
Worked ok for me, not sure what your problem is. Thanks for the help! :mrgreen:

Re: PS3 + FLAC solution

Posted: Wed May 19, 2010 12:43 am
by Sackboy
You seem to know alot about Playstation 3 media servers can you tell me what the difference is with twonky and the other free media servers?

Re: PS3 + FLAC solution

Posted: Thu Jun 03, 2010 4:45 pm
by Music for Life
Hi there. Just purchased a WD my book world edition 2tb NAS with TMS 5.1 and am wondering if this could be done on that device?

Thanks

Re: PS3 + FLAC solution

Posted: Wed Aug 18, 2010 11:11 pm
by mgillespie
Anyone using this with V6.x TMS?

I'm trying under Linux (ARM) and can't get it working. It works just fine on V5.x Wondering if I am alone in my problems, or others seeing the same?

Re: PS3 + FLAC solution

Posted: Thu Aug 26, 2010 9:22 am
by NateDawg1169
I have got a Mybook World edition as well, but the old blue ring model in raid configuration. I have managed to install twonky 6.1 on it and enable the transcoding features. I am currently testing out MKV's and AVI's being transcoded to MP4's with live on the fly transcoding with ffmpeg. Seems to be working so far, but I am concerned with the lack of power my unit has. 30mb of memory and a 200mhz processor. I fear the live transcoding will get glitchy. I am 5 minutes in no glitches into a Soprano's episode as we speak. Fingers crossed.

Re: PS3 + FLAC solution

Posted: Thu Aug 26, 2010 11:25 am
by NateDawg1169
Well I made it through streaming two episodes of Soprano's to my PS3 last night. It started a little rough the first 15 minutes of the first episode was a bit glitchy, every five minutes the audio would mute then the video would freeze shortly there after, I would have to pause for 10 seconds and play and it would pick up where it left off. This was happening because the twonky server hadn't finished rebuilding the database of all my media and my resource starved nas couldn't keep up.
After the first 15 minutes of glitches it smoothed out and not a single glitch after that.

I have tested AVI's and MP4s and they work just fine. Cant get my MKV's to stream as of yet, just hangs my PS3 for about 1 minute and then disconnects the media server. I will do some reading around and see if I can find a solution or not. So far not a bad result I would say for a POS used nas.

Re: PS3 + FLAC solution

Posted: Mon Sep 20, 2010 11:39 pm
by mgillespie
Just to report. I had huge problems getting this to work on Twonkymedia 6.x on Linux (it worked great on v5). The latest RC of 6.0.2 fixes a bug.

I can report lossless FLAC-WAV audio streaming on PS3 is now working again :-)

I'm just doing some more testing, and trying to confirm if you still need to remove the -D from the Linux startup script, so it does not demonize the server process (there are reports that transcoding on Linux does not work if the server is demonized, which occurs by default in the startup script). Will update this post once I know.

EDIT: YES, you need to remove the -D from the Linux startup script for transcoding to work it seems....

Re: PS3 + FLAC solution

Posted: Sat Jan 29, 2011 5:27 pm
by chileboy
Newbie here - I have successfully installed TMS on my Maxtor Shared Storage II NAS and can stream MP3 to my PS3. I want to try and enable transcoding flac to wav as outlined here. I believe I understand everything except how to locate the flac2wav application itself. I looked around quite a bit on this site, ran some Google searches, etc. Do I need to use a wget or something from a specific feed?

Sorry for the basic nature of this question...I have some experience with this sort of thing, but not enough apparently...

Thanks.

Re: PS3 + FLAC solution

Posted: Sun Jan 30, 2011 4:49 pm
by PeeBee
Read the first post again - flac2wav is a script you create directly yourself.

PB

Re: PS3 + FLAC solution

Posted: Tue Feb 01, 2011 7:10 pm
by chileboy
[quote="PeeBee"]Read the first post again - flac2wav is a script you create directly yourself.

PB[/quote]

Thanks PB, yes, I realized that after posting... :oops:

============
Completely OT, but there appears to be no appropriate forum for this - I have BBCode "Enabled" in my Control Panel, yet when in the Compose / Edit Post dialog, it always says "BBCode is Off"...

Re: PS3 + FLAC solution

Posted: Wed Feb 02, 2011 8:26 pm
by chileboy
Is it possible for someone to help me?

I have tried every transcoding profile in this thread, and about half-a-dozen others from other documents and threads I have found here. I have tried transcoding to .wav, .MP3, etc.I have been meticulous about my syntax, file placement and rights, etc., restarted the server between every change, and I still cannot get this to work - my PS3 always shows "Unsupported data".

I can successfully stream MP3s and I can also stream flac to other clients (that understand flac natively).

I am running 6.0.30 on a Maxtor Shared Storage II using the build specifically for that target, and I have also installed both ffmpeg and flac.

I am wondering if I should go back to an earlier build?

I also saw the post about removing the daemon command -D from the startup script - I thought this would be in /etc/init.d/rc.twonky, but I don't see that option there. Am I looking at the wrong file? I also examined the .html and .ini files in the TS home directory.


Thanks very much for any and all suggestions.

Re: PS3 + FLAC solution

Posted: Tue Feb 08, 2011 12:36 pm
by moviegeek
Sackboy wrote:You seem to know alot about Playstation 3 media servers can you tell me what the difference is with twonky and the other free media servers?
One thing the PS3 media server will do, that the other ones I tried won't, is serve DVD movies (both .iso images and VIDEO_TS folders). And you can select both audio and subtitles. Works like a charm.

Re: PS3 + FLAC solution

Posted: Thu Mar 10, 2011 5:58 pm
by dennis_k85
I am trying this on the arm release of twonky, and it does not seem to work. I have followed the directions above. I am not trying this to a PS3, but to a PSAudio bridge. Any ideas?

Re: PS3 + FLAC solution

Posted: Sun Aug 05, 2012 7:03 am
by mediumsam
I am trying to do something similar with ALAC - WAV. My music collection is apple lossless. ALAC files are in M4A extension. However I am stuck and I can't get it to work. I have upgraded my WD Worldbook I (whitelight) with Twonky 7.0.9 Special NAS using this guide
http://mybookworld.wikidot.com/forum/t- ... book-world
This is what I have done so far.

Used putty to SSH WD mybook world's IP

ipkg install alac-decoder (downloaded and installed alac-decoder 0.1.0-2)
alac decoder installed to /opt/bin/alac

I have created alac-wav.desc in /usr/local/twonky/cgi-bin/

#transcode audio
exec: alac $infile -f output.wav $outfile
#capabilities
from=audio/mp4a
to=audio/x-wav
synchronous
priority=idle

I have also created alac.location in /usr/local/twonky/cgi-bin/

/opt/bin/alac

I made both files executable
chmod +x /usr/local/twonky/cgi-bin/alac-wav.desc
chmod +x /usr/local/twonky/cgi-bin/alac.location

in /usr/local/twonky/resources/transcoding.db I have added this under #Additional audio res

M4A,m4a,mp4a,audio/mp4a

I have cleared the cache and restarted twonky server. I am very new to putty coding and don't know where I have gone wrong or how to fix. Can anyone help?

Re: PS3 + FLAC solution

Posted: Wed Aug 08, 2012 12:42 am
by Twonky_Rick
Unfortunately I don't have a solution for you, but you may want to post in the main server section if you don't get a response here. There are several transcoding experts that spend a lot of time there.

- Rick

Re: PS3 + FLAC solution

Posted: Wed Aug 08, 2012 2:02 am
by chileboy
@mediumsam:

Check out this thread in the new forum that I had started, should be a great help:

http://community.twonky.com/twonky/topi ... utm_medium

- Mark

Re: PS3 + FLAC solution

Posted: Sat Aug 11, 2012 10:04 am
by mediumsam
Thanks Rick and Mark.
I have posted the same question in a couple of topic threads and I have been directed to Mark's topic on Community.twonky

As of yet I have not got a working solution on my NAS (WD MB World WL) but others have on WD MB Live which gives me hope.
I tried to start fresh a couple of times by restoring current firmware and in the meantime the Twonky 7.x upgrade guide has been broken. So I have been trying to get it to work on the default twonky 5.1.9.
FFMPEG command works converting while in an SSH connection. It is just whether twonky 5.x can transcode on the fly.
I read somewhere that twonky can't transcode while daemonised is that true for the built-in twonky server 5.1.9?

Re: PS3 + FLAC solution

Posted: Wed Jan 22, 2020 10:48 am
by Tanya Sri