OTF Transcoding - ALAC to WAV

General discussion about the media server. Feature requests. Hints, tips and tricks.
Locked
iantivey
Posts:1
Joined:Thu Jan 05, 2012 5:53 pm
AV Hardware:Buffalo Linkstation
OTF Transcoding - ALAC to WAV

Post by iantivey » Thu Jan 05, 2012 6:11 pm

Hi All,

first post, so hello to you all.

A bit of background: I've used TwonkyServer running on my Buffalo Linkstation to stream to my iPhone docked to my stereo for a few months now. Due to Apple's somewhat closed nature, in order to get high quality lossless audio I've spent hours ripping all of my CDs to ALAC/M4A/Apple Lossless. I've since bought a Western Digital WDTV which I can control with my iPhone Twonky app. Very cool. Except WDTV won't play ALAC files.

So I've spent a few hours trying to get TwonkyServer to transcode M4A files to WAV on the fly. The following thread has been helpful:
http://www.twonkyforum.com/viewtopic.ph ... t=priority

...but I still can't get it to work. Here's what I've done so far

- installed the latest version of ffmpeg. I've converted an M4A file to WAV using the command line and it works fine.
- updated the ffmpeg.location file to point to the location of ffmpeg binary

- created a file ffmpeg-mp4-wav.desc containing the following:

exec: ffmpeg -i $infile $outfile
# capabilities
from=audio/mp4
to=audio/x-wav
synchronous
priority=idle

- added the following lines into transcoding.db

ALAC,m4a,audio/mp4
(...)
# background-transcoding-group:WAV=WAV

Now "WAV" shows up on the transcoding page but I don't want it to start transcoding in the background, I want it to do it on the fly/demand.

- Next I tried editing the WD TV entry in the clients.db file, so the TR line under the entry now reads:

TR:JPEG160x160,JPEG1920x1080,WAV

I also tried messing about with the MT option, but nothing seems to hit the spot.

I'm a bit stuck for ideas now. I've been messing around with various configurations but to no avail.

mediumsam
Posts:10
Joined:Sun Aug 05, 2012 6:13 am
AV Hardware:WD mybook world I whitelight
Twonky 5.1.9
Optware Twonky 7.0.9 special mss2
PS3 firmware 4.21
Sony Bravia KDL 32EX600

Re: OTF Transcoding - ALAC to WAV

Post by mediumsam » Sun Aug 05, 2012 9:33 am

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?

EDIT:
alac decoder usage is
alac [option] [--] file

options
-f output.wav (outputs the decompressed data to the specified file, in WAV format. Default is stdout)
-r (write output as raw PCM data. Default is WAV format)
-v (verbose output)

so in the alac-wav.desc should I have

#transcode audio
exec: alac $infile -r $outfile
#capabilities
from=audio/m4a
to=audio/lpcm
synchronous
priority=idle

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: OTF Transcoding - ALAC to WAV

Post by phibertron » Mon Aug 06, 2012 6:19 pm

@iantivey

On my WDMBL, my ffmpeg.location path is /usr/bin
It comes pre-installed, but is NOT a full featured version
But does do video thumbs and audio, havnt tested audio a whole lot though


The following line is not needed in the transocde.db
it would used if you were trying to transcode to alac
you want to go to wav
For Ex: with a TR in clients.db and appropriate .desc file

ALAC,m4a,audio/mp4


Your trying to transcode to wav, so the following
should exist in the transcode.db

WAV,wav,audio/x-wav


Also, since you are not doing background transocde
there is not need for this, leave the # there

# background-transcoding-group:WAV=WAV


This looks correct in the clients.db
Note: the WAV here is used as a reference to the WAV in transcode,db

TR:JPEG160x160,JPEG1920x1080,WAV


The possible issue here is the from line
The question is, do alac mp4/m4a files show up as audio/mp4?
Not sure myself

exec: ffmpeg -i $infile $outfile
# capabilities
from=audio/mp4
to=audio/x-wav
synchronous
priority=idle

So one way to deal with it,
Is since you going to wav, use it for all types to wav
Either one of the below should do the job

exec: ffmpeg -i $infile $outfile
# capabilities
from=audio/all
to=audio/x-wav
asynchronous
priority=normal

exec: ffmpeg -i $infile $outfile
# capabilities
from=*
to=audio/x-wav
asynchronous
priority=normal

The two other things that could go wrong are
either ffmpeg and or twonky does not have enough rights to execute
or there needs to be an additional option added to the clients.db
to exclude alac codec, so that it gets forced to use the TR WAV entry
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: OTF Transcoding - ALAC to WAV

Post by phibertron » Mon Aug 06, 2012 6:27 pm

@mediumsam

I would use -f
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: OTF Transcoding - ALAC to WAV

Post by phibertron » Mon Aug 06, 2012 11:31 pm

I playhed around with a bit more, and got it to work =)

I posted the results here, in the last entry from today

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

I'll try and convert that to use with 6.x lingo
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: OTF Transcoding - ALAC to WAV

Post by phibertron » Tue Aug 07, 2012 3:54 am

Ok here is what I did to get it to work for 6.0.39
I did this on windows, still have to test it on the nas

Note: the audio files need to have .m4a extention and not .mp4

This is the .desc file I used

Code: Select all

# transcode mp4 to wav
#(c) 2011 by PacketVideo
exec: ffmpeg -i $infile $outfile
# capabilities
from=audio/mp4
to=audio/x-wav
asynchronous
priority=idle
There were three WD client profiles in the clients.db
Wasnt sure which one your client is using
Thes two lines need to exist in whatever one you are using

Code: Select all

TR:JPEG160x160,JPEG1920x1080,WAV
MT:m4a not-supported
The above should be all that is need
As long as ffmpeg is in place and the ffmpeg.location file is correct

For reference, this is what my ps3 client profle looks like
to test on

Code: Select all

>>
NA:PS3
HH:PLAYSTATION
DB:FIX
XM:DLNA10
XM:DATETIME
XM:NOEMBEDDEDALBUMART
XM:NOBYTES_IN_TIMESEEK_RESPONSE
DL:MP4DLNA
HP:chunked
HP:1.0PROXYRESPONSE
TR:MPEG,JPEGORG,MP4,WAV
MT:mpeg,mpeg2,vdr,spts,tp,ts,mpg,mpg-tts video/mpeg
MT:avi,divx video/avi
TP:MP4,-suppress_amr -add_isom -update_stss
MT:3gp,m4a not-supported
I had to remove this line, MT:m4a audio/mp4
and had to add m4a to this line, MT:3gp not-supported
after doing that
and using the .desc file above, it worked perfectly

Outside of the preinstalled ffmpeg not being able to handle alac to wav
it should work the same on the nas
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

mediumsam
Posts:10
Joined:Sun Aug 05, 2012 6:13 am
AV Hardware:WD mybook world I whitelight
Twonky 5.1.9
Optware Twonky 7.0.9 special mss2
PS3 firmware 4.21
Sony Bravia KDL 32EX600

Re: OTF Transcoding - ALAC to WAV

Post by mediumsam » Tue Aug 07, 2012 1:51 pm

:( Caution. ALAC-Decoder 0.1.0-2 arm.ipk on WD MybookWorld I White light :(

I got Transcoding working on Twonkyserver 7.0.9 special nas. However it was one song and now the original file is now empty, 0KB, as well as about ten other files I tried to play. Not sure if the server did it when it translated the file to display on the PS3 or the alac-decoder itself when it tried to play them. Version 0.1.0 is still the first release. It is now up to 0.2.0.

I got a mix of error messages on the PS3
Server error HTTP (503)
This data type is not supported
This music cannot be played (80029b91)
PS3 disconnected from server.

I will try ffmpeg.

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: OTF Transcoding - ALAC to WAV

Post by phibertron » Tue Aug 07, 2012 6:26 pm

I have further refined the process on the ps3, which is also applicable to other clients in 7.0.9
Only two things are needed to get it to work

The ffmped-all-wav.desc

Code: Select all

# transcode any to wav
#(c) 2011 by PacketVideo
exec: ffmpeg -i $infile $outfile
# capabilities
from=audio/*
to=audio/x-wav
asynchronous
priority=idle
This one addition to a default ps3.xml

Code: Select all

<MimeTypeMapping>
	<In>audio/mp4</In>
	<Out>audio/m4a-latm</Out>
</MimeTypeMapping>
Th benefits of this new way, keeps aac audio native
and does on the fly transcode of alac files
note: the files must have the .m4a extention

Will apply test this new tactic on version 6.x
and report back
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: OTF Transcoding - ALAC to WAV

Post by phibertron » Tue Aug 07, 2012 6:29 pm

@mediumsam

will attempt it on the wd nas some time today
I use ffmpeg on the wd nas, as there should be no need to install anything else
I have previoulsy also got the wd nas to transcode ogg and other formats without issue
so the ffmpeg pre-installed on the wd nas should be up to the job for alac
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: OTF Transcoding - ALAC to WAV

Post by phibertron » Tue Aug 07, 2012 7:25 pm

As promised
I have further refined the process on the ps3, which is also applicable to other clients in 6.0.39
Only two things are needed to get it to work

The ffmped-all-wav.desc

Code: Select all

# transcode any to wav
#(c) 2011 by PacketVideo
exec: ffmpeg -i $infile $outfile
# capabilities
from=audio/*
to=audio/x-wav
asynchronous
priority=idle
This one modification a default ps3.xml
change MT:m4a audio/mp4
to this

Code: Select all

MT:m4a audio/m4a-latm
Th benefits of this new way, keeps aac audio native
and does on the fly transcode of alac files
note: the files must have the .m4a extention
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

mediumsam
Posts:10
Joined:Sun Aug 05, 2012 6:13 am
AV Hardware:WD mybook world I whitelight
Twonky 5.1.9
Optware Twonky 7.0.9 special mss2
PS3 firmware 4.21
Sony Bravia KDL 32EX600

Re: OTF Transcoding - ALAC to WAV

Post by mediumsam » Sat Aug 11, 2012 1:20 pm

I have WD NAS mybook World I (white light) with Twonky 5.1.9 built-in. So far I have been able to block the PS3 from seeing m4a (alac) with the line in

Code: Select all

MT:m4a audio/m4a-latm
I also added but, as phibertron said, not needed.

Code: Select all

TR:JPEG_HD,MPEG,WAV
(twonky 5.1.9 entry)

I have installed optware so that i can install ffmpeg (not included in firmware). I have successfully decoded an alac m4a to wave with the following commands
~# ffmpeg -i /shares/Public/Shared\ Music/Battles/Mirrored/04\ Tonto.m4a /shares/Public/Shared\ Music/Battles/Mirrored/04\ Tonto.wav (so I know ffmpeg works.)
( \ used to define spaces)

In my .desc file I have

Code: Select all

# transcode any to wav
#(c) 2011 by PacketVideo
exec: ffmpeg -i $infile $outfile
# capabilities
from=audio/*
to=audio/x-wav
asynchronous
priority=idle
May be twonky doesn't have access rights. How would I change that?
or I read on another site Twonky transcoding doesn't work is it is daemonised (daemonized US) ?

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: OTF Transcoding - ALAC to WAV

Post by phibertron » Sat Aug 11, 2012 11:26 pm

did not know the world editions didnt have ffmpeg pre-installed =(
Did you create a ffmpeg.location file with the path to ffmpeg in the cgi-bin folder?

For example on the wdmbl

ffmpeg.location

Code: Select all

/usr/bin
I'd assume thats where it also gets installed with the optware version
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

mediumsam
Posts:10
Joined:Sun Aug 05, 2012 6:13 am
AV Hardware:WD mybook world I whitelight
Twonky 5.1.9
Optware Twonky 7.0.9 special mss2
PS3 firmware 4.21
Sony Bravia KDL 32EX600

Re: OTF Transcoding - ALAC to WAV

Post by mediumsam » Sun Aug 12, 2012 1:57 am

Optware gets installed in /opt/bin

I have just changed the entry to /opt/bin
I had the full entry /opt/bin/ffmpeg
Does that matter?
Testing today.

The m4a files show up on the ps3 as LPCM :D but when I try to play them the ps3 says 'This data type is not supported' :(

ffmpeg.location is in /twonky/cgi-bin/ with the ffmpeg-all-wav.desc file. Both are executable ie. chmod +x /twonky/cgi-bin/ffmpeg.location

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: OTF Transcoding - ALAC to WAV

Post by phibertron » Sun Aug 12, 2012 6:28 pm

If the ffmpeg binary is in the folder /opt/bin/ffmpeg
then that would be the path
If it is is /opt/bin then use this one

The m4a files showing up on the ps3 as LPCM is good
that means the ps3.xml and ffmpeg-all-wav.desc are being seen
and adhered to

The problem might be a rights issue
First do a test of ffmpeg from the command line
to see if ffmpeg is working

For example
ffmpeg -i /somepath/analacfile.m4a /somepath/output.wav

If that works check to see that ffmpeg is executable
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

mediumsam
Posts:10
Joined:Sun Aug 05, 2012 6:13 am
AV Hardware:WD mybook world I whitelight
Twonky 5.1.9
Optware Twonky 7.0.9 special mss2
PS3 firmware 4.21
Sony Bravia KDL 32EX600

Re: OTF Transcoding - ALAC to WAV

Post by mediumsam » Tue Aug 14, 2012 9:39 am

I think the same thing is why I'm having trouble.
Mark C. Walton 15 hours ago
In an nutshell, the behavior I am seeing is, assuming I have cleared the cache and restarted Twonky and the PS3:

All tracks show "Unsupported data"
If I select a track anyway, it gets transcoded into the cache, but PS3 will refuse to see it.
If I select additional tracks from same album, they are NOT transcoded.
If I selet a track from a different album, it will get transcoded but, again, not seen, and I can't transcode any additional tracks from THAT album.
If I restart the PS3, I can see and play any tracks already transcoded, and Twonky will properly transcode the next track, but PS3 won't see it, and we're back to the start.

I see the exact same behavior whether I use m4a and ffmpeg, or flacs and flac.
Maybe the WD mybook world Whitelight isn't powerful enough or quick enough for the PS3. It might be the ARM processor or the network speed on its ethernet port. The Twonky 7.0.9 NAS built I'm using is for the Maxtor Shared Storage II. Which is what Mark C is using. The latest WD mybook Live has a PowerPC processor I think.

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: OTF Transcoding - ALAC to WAV

Post by phibertron » Tue Aug 14, 2012 5:34 pm

You know, it might just be the cpu, but...

I'll try and takes some measurements, to see what the wd does do
I wonder how long it takes for the transcode to initiate
before handing it off to the ps3

I was under the understanding, that the use of asynchronous
was to allow for the start of playback before the file is finished encodeing

from=audio/*
to=audio/x-wav
asynchronous
priority=idle

In the case of synchronous
I guess the question is, does twonky wait until its done before the handoff of the wav
need to test this out, on something really big to find out
and lots of logging

from=audio/*
to=audio/x-wav
synchronous
priority=idle
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

chileboy
Posts:9
Joined:Sat Jan 29, 2011 5:05 pm
AV Hardware:Maxtor Shared Storage II
PS/3

Re: OTF Transcoding - ALAC to WAV

Post by chileboy » Tue Aug 14, 2012 6:07 pm

When I timed a transcoding of a 5-minute track on my Maxtor SS II, it happened in 25 seconds or thereabouts, which a Twonky rep told me was plenty fast enough - so it shouldn't be the CPU speed that's causing our problem.

Going to try that "synchronous" setting though.

I will say, when I select a track to play, the PS3 seems to time out very quickly with the "Unsupported data type" error, in just a second or two. That's why I no longer think it's a transcoding issue per se, as the files ARE getting transcoded - it's something to do with the way Twonky and the PS3 are talking to each other.

Very interesting that mediumsam and myself are seeing exactly the same results on different NAS, but with the same Twonky build. There's something quirky in there apparently.

@phibertron, do you know, is there another NAS build we could try that would run on our platforms?

- Mark

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: OTF Transcoding - ALAC to WAV

Post by phibertron » Tue Aug 14, 2012 7:17 pm

@chileboy

Thanks for checking on that speed test

These are the nas builds that I know have been released

http://www.twonkyforum.com/downloads/7.0.5-Special/
http://www.twonkyforum.com/downloads/7.0.8-Special/
http://www.twonkyforum.com/downloads/7.0.9-Special/

To clarify what version and build are you guys using?

When it comes to which builds one could use,
I have never narrowed all the specifics of the what why and when
But I do know that other builds will work on other devices

Hopefully others on this forum could chime in what they know can/could work
on yours or other devices

I might be worth a shot at trying one of the previous versions
to see if the problem creeped in, or was always there in 7.0.5 or 7.0.8
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: OTF Transcoding - ALAC to WAV

Post by phibertron » Tue Aug 14, 2012 7:36 pm

Just poured a fresh cup of coffee =)

After a coupld of sips, and a little deep thought
The current symptoms being seen remind me of something
Not that it is going to help solve it directly,
hopefully it helps us hone in on what the root cause is

A while back, I was playing around with the idea what I call transmuxing
the cpu on nas's can do audio transcoding
but video transcoding is pointless
but remuxing, is whole new option, if possible, in certain scenarios
but twonky does not look at codecs, it looks at containers or mimetypes of the container
why, who knows....

basically imagine you had .mov file that was recorded with an iphone
where the video was avc and the audio was aac
the ps3 can play both those codecs, just wont do it in the mov container
a mime type mapping or translation wont work either

So to put the original media in a new container with ffmpeg
and keep the audio and video untouched, no transcoding is done at all
I used the following command

test.mov to test.mp4

ffmpeg -i $infile -vcodec copy -acodec copy $outfile

Now, without all of the things I did to get it working
I was able to get twonky to do it
The funny part for me now, as I think back to it
what you guys are seeing, is exactly what I saw in the above attempts

1. would browse to the meida on the ps3
2. would see the waiting symbol for twonky backend to kick off
3. watching on the twonky server to see the file get created, which it did
4. but the ps3 did as you guys describe, unsupported format and would not play
5, the ps3 likes to cache the navtree that is viewed
so, what I do is go to another container in the tree
that I have not viewed yet, that has the file
if the transmuxing was done, it works
Or after rebooting the pc or the server
the ps3 would see the already transcoded file and it would play fine

So back to the present
Stateing the obvious, I would agree its something to do with the handoff to the ps3
once the transcoding process is initiated

the answer is either the build of twonky and or the build of ffmpeg
I would say its the build of twonky, as other transcoders produce the same effect

Need more coffee =)
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: OTF Transcoding - ALAC to WAV

Post by phibertron » Tue Aug 14, 2012 9:12 pm

Did some searching on the cpu in the WD WBE

http://en.wikipedia.org/wiki/Western_Digital_My_Book

Older "blue rings" models (200 MHz ARM CPU and 32 MByte RAM)
Newer "white lights" models (oxnas810,[5] 380 MHz ARM CPU and 128 MByte RAM)

If I had to choose which other build to attempt to install on the wd mbe
I would attempt to use the ones based on arm
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

mediumsam
Posts:10
Joined:Sun Aug 05, 2012 6:13 am
AV Hardware:WD mybook world I whitelight
Twonky 5.1.9
Optware Twonky 7.0.9 special mss2
PS3 firmware 4.21
Sony Bravia KDL 32EX600

Re: OTF Transcoding - ALAC to WAV

Post by mediumsam » Wed Aug 15, 2012 12:58 pm

Success :D well still buggy on some tracks. :?

I used WinSCP. Much easier then putty command line.
I think the trick is to set owner to root for all the music folders and files. All my files had Nobody (99) as the owner and I changed them to root (0). Not sure whether the file permissions need tweaking. Will report back when I can.

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: OTF Transcoding - ALAC to WAV

Post by phibertron » Wed Aug 15, 2012 6:09 pm

Nice, glad to see you looking at from all angles

In this thread and the other one, I was going to suggest looking at it from a rights perspective
as the next course of action
My approach to installing twonky on the wd mbl was one out of not reinventing the wheel
and I guess in doing so, it saved me from having to check or apply permissions to to certina folders
as it seems they are inheriting the parent for the most part

Im gonna go fire up the nas, and report back what perms I see in different places for reference
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

User avatar
phibertron
Posts:1566
Joined:Sun Jan 30, 2011 5:52 pm
AV Hardware:Hardware
========
WHS - HP Ex495
PS3
XBOX 360
iTouch - Gen 2 and Gen 3
PSP - 3000

Encoders
========
Handbrake
x264
ffmpeg
mencoder

Tagging
======
mp3tag

Re: OTF Transcoding - ALAC to WAV

Post by phibertron » Wed Aug 15, 2012 7:16 pm

before going crazy with this =)

you got me thinking, I suspect that it might be a cache rights issue

This is what I see on the wd mbl
cache chmod.jpg
cache chmod.jpg (109.12KiB)Viewed 20347 times
viewtopic.php?f=2&t=10627
viewtopic.php?f=2&t=9353
viewtopic.php?f=2&t=9408
viewtopic.php?f=2&t=9416
viewtopic.php?f=2&t=9424
viewtopic.php?f=2&t=9364
viewtopic.php?f=2&t=9497

chileboy
Posts:9
Joined:Sat Jan 29, 2011 5:05 pm
AV Hardware:Maxtor Shared Storage II
PS/3

Re: OTF Transcoding - ALAC to WAV

Post by chileboy » Wed Aug 15, 2012 8:03 pm

Right now, Group and Owner for the cache directory are both root, and rights are shown as yours are.

Weeks ago I played with rights ad nauseum. If they were not as above, at least for root, all kinds of problems did indeed occur.

mediumsam
Posts:10
Joined:Sun Aug 05, 2012 6:13 am
AV Hardware:WD mybook world I whitelight
Twonky 5.1.9
Optware Twonky 7.0.9 special mss2
PS3 firmware 4.21
Sony Bravia KDL 32EX600

Re: OTF Transcoding - ALAC to WAV

Post by mediumsam » Thu Aug 16, 2012 11:02 am

I have it working on the built in twonky server 5.1.9. However I have to browse the folder a couple of times first to get the file names into the cache, then I can play the song. I think the iTunes importer plugin is blocking something here or whether the 'asynchronous' or 'synchronous' plays a part here. My collection was generated by iTunes.

Locked