Transcode ALAC to AAC

Discuss Twonky and XBOX here
Post Reply
kuhnboy
Posts:10
Joined:Sun Nov 23, 2014 6:32 pm
AV Hardware:Buffalo LinkStation 421e, v7.2.8
Xbox 360, Xbox One.
Transcode ALAC to AAC

Post by kuhnboy » Sun Nov 23, 2014 7:00 pm

Is there a way for me to transcode ALAC to AAC? Currently my Xbox one doesn't seem to support ALAC.

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: Transcode ALAC to AAC

Post by phibertron » Wed Dec 03, 2014 5:08 am

what version of twonky server and where is it installed?
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

kuhnboy
Posts:10
Joined:Sun Nov 23, 2014 6:32 pm
AV Hardware:Buffalo LinkStation 421e, v7.2.8
Xbox 360, Xbox One.

Re: Transcode ALAC to AAC

Post by kuhnboy » Wed Dec 03, 2014 8:16 am

7.2.8 Kirkwood

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: Transcode ALAC to AAC

Post by phibertron » Wed Dec 03, 2014 5:45 pm

Is ffmpeg installed 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

kuhnboy
Posts:10
Joined:Sun Nov 23, 2014 6:32 pm
AV Hardware:Buffalo LinkStation 421e, v7.2.8
Xbox 360, Xbox One.

Re: Transcode ALAC to AAC

Post by kuhnboy » Wed Dec 03, 2014 6:04 pm

Probably not... I'll check into that and report back my results.

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: Transcode ALAC to AAC

Post by phibertron » Wed Dec 03, 2014 7:42 pm

In a nutshell, we need ffmpeg or other to do the transcoding
here are the steps that would be needed to make it work once you have ffmpeg installed

1. a transcoder is needed, usually ffmpeg

2. a ffmpeg.location file for the transcoder location in the twonky cgi-bin folder
- this is just a text file that contains the path to ffmpeg, for example

Code: Select all

/opt/bin
3. a ffmpeg-all-wav.desc file for the transcoder description in the twonky cgi-bin folder
- this is just a text file with the following, for example

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

4. a MimeTypeMapping in the XBOX_360.xml for on the fly transcoding audio m4a
- keeps aac audio native and does on the fly transcode of alac files
note: the files must have the .m4a extention

Code: Select all

<MimeTypeMapping>
   <In>audio/mp4</In>
   <Out>audio/m4a-latm</Out>
</MimeTypeMapping>
Note:
The above is what was done to make what you want done, work for the ps3, and it does work there
I know that it will/should/does work on the xbox 360
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

kuhnboy
Posts:10
Joined:Sun Nov 23, 2014 6:32 pm
AV Hardware:Buffalo LinkStation 421e, v7.2.8
Xbox 360, Xbox One.

Re: Transcode ALAC to AAC

Post by kuhnboy » Thu Dec 04, 2014 3:16 am

Thanks for all of the info. I was able to install ipkg and then ffmpeg (svn20080409-3) which has the following info:

FFmpeg version UNKNOWN, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --enable-cross-compile --cross-prefix=/home/slug/optware/cs05q3armel/toolchain/arm-none-linux-gnueabi/gcc-2005q3-glibc-2.3.6/bin/arm-none-linux-gnueabi- --arch=arm --disable-encoder=snow --disable-decoder=snow --enable-shared --disable-static --enable-gpl --enable-postproc --prefix=/opt
libavutil version: 49.6.0
libavcodec version: 51.54.0
libavformat version: 52.13.0
libavdevice version: 52.0.0
built on Feb 12 2012 21:31:03, gcc: 3.4.4 (release) (CodeSourcery ARM 2005q3-2)

- I added a file into /usr/local/twonky/cgi-bin called ffmpeg.location which just has the text '/opt/bin'
- I added the ffmpeg-all-wav.desc into the same cgi-bin folder
- I added the MimeTypeMapping after all the other MimeTypeMappings in the XBOX_360.xml
- I restarted twonky (restarted the box actually)

Thusfar, I have not seen any difference trying to play music. All of my files (ALAC and AAC) have the m4a extension. AAC files play fine.

kuhnboy
Posts:10
Joined:Sun Nov 23, 2014 6:32 pm
AV Hardware:Buffalo LinkStation 421e, v7.2.8
Xbox 360, Xbox One.

Re: Transcode ALAC to AAC

Post by kuhnboy » Thu Dec 04, 2014 3:52 am

Also, I tried the mime type mapping of 'audio/mp4a-latm' instead of 'audio/m4a-latm' since I thought that may have been a typo. I also tested ffmpeg from the command line to convert a ALAC .m4a file to .wav

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: Transcode ALAC to AAC

Post by phibertron » Thu Dec 04, 2014 4:31 am

I used '/opt/bin' as a reference, as I am not actually sure where optware installs ffmpeg
as it might also be '/opt/sbin' or elswhere

you might have to also modify the path to include /opt/bin and /opt/sbin
take a look at this thread on the path stuff

http://mybookworld.wikidot.com/optware
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

Post Reply