Page 1 of 2

Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Sun Jan 09, 2011 8:12 pm
by Windows04
Hi everybody,

I just discovered this software, so excuse me for being a noob at this. So I'm on a mac and I have a bunch of TV shows, all nicely encoded in mp4 to go into an iTunes library. I added the iTunes library to serviio and I discovered that all the older TV shows (mostly in 4:3 format, but more importantly with 2.0 audio) just streams fine, but when I tried to open some of the newer ones (H.264, 1280 x 720, Millions, AAC, 6 channels, 48000 Hz), the XBOX would give me this error: 69-C00D119A. This error means that the XBOX can't play the file because the audio stream is AAC with 6 channels and the XBOX only supports H.264 with 2 channels of audio. So, how can I modify the profiles page so that serviio will transcode the audio of these files into 2 channels?

(Srry for being a noob at this, did already locate the profiles.xml file but it's a little overwhelming for me :s..)
Really thx because it works great with all my other files, just would be great if it also works for the newer ones ;).

Notes:
- These files were originally mkv files, but I encoded them to mp4 files to add to my iTunes library.
- Have selected Xbox 360 as renderer profile
- Have enabled transcoding with 8 cores and with the option downmix to stereo (but I think serviio doesn't see this mp4 as a conflicting file, because it's officially supported by the xbox, but only with 2 channels. Maybe there is an option to force serviio to transcode such files?)

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Sun Jan 09, 2011 8:52 pm
by zip
yes, mpeg4 is not part of the transcoding profile, as it should play natively. Another thing is that I recently discovered that FFmpeg doesn't support downmixing of AAC, so you have to keep the same number of channels (getting error: Resampling with input channels greater than 2 unsupported.).

Not sure if anyone else made it working.

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Sun Jan 09, 2011 8:56 pm
by Windows04
Mmmm... so we're stuck here I think ;). Thx for your help... I could ofcourse redownload the mkv's and encode them to mp4 with 2 channels... but that's going to take long and well, I kinda want to have 5.1 when available... no other solutions then :s?

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Sun Jan 09, 2011 8:59 pm
by zip
If you really want to play them on the 360, you could reencode it into ASF / WMV/ WMA Pro (5.1) ... obviously will take long. Idon't think Ffmpeg supports WMAPro encoding at the moment.

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Sun Jan 09, 2011 9:02 pm
by Windows04
And I can encode the audio into asf now by just modifying profiles.xml? If I specify to only transcode the audio, maybe it's usable, always worth a shot ;). But I do gonna need some instructions for this, tried reading the instructions on your main page, but little complicated for me...

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Sun Jan 09, 2011 9:13 pm
by zip
No, you'd have to use an external program. FFmpeg doesnt have WMAPro encoder.

Here is a similar discussion: http://ps3mediaserver.org/forum/viewtop ... =11&t=5732

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Sun Jan 09, 2011 9:16 pm
by Windows04
And encoding to asf?

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Sun Jan 09, 2011 9:21 pm
by zip
It works, but only for stereo WMA2. But FFmpeg cannot change number of channels of AAC from 6 to 2 -> you'd have to use WMAPro to keep 6 channels (if FFmpeg supported WMAPro encoding)

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Sun Jan 09, 2011 11:09 pm
by Windows04
Allright, so I went to check and saw that ffmpeg does actually support WMA PRO audio with their newest version: 6.1. I've compiled this version using the exact same flags you used to compile yours. So, don't know if this is going to work but if I would replace your version of ffmpeg with mine in your program and then specify that mp4 files need to be transcoded to WMA PRO audio, it would work right? Or is that too simple XD?

Just trying to help here, would be so cool if it would work :D.

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Sun Jan 09, 2011 11:34 pm
by zip
Where did you see it supports encoding WmaPro? It only supports decoding AFAIK, i.e. it could transcode wmapro into something else, not AAC into WmaPro.

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Sat Feb 12, 2011 11:11 pm
by Encrypted
I have a similar issue with PS3. PS3 supports AAC but my reciever doesn't. So, the profile for PS3 sends AAC straight through because it thinks my PS3 takes it but I get only 2 Ch audio because the PS3 downmixes it to make it compatible with my receiver.

What I did was add this line to my PS3 profile:

<Matches container="mp4" aCodec="aac" />

Now AAC 5.1 gets trancoded to AC3 5.1. If I understand your problem correctly this should work for you as well.

Actually, I just re-read your post. This probably won't work. Are you sayiong Xbox 360 doesn't support multi channel audio at all? That sucks.

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Sun Feb 13, 2011 12:41 pm
by zip
Encrypted wrote:Actually, I just re-read your post. This probably won't work. Are you sayiong Xbox 360 doesn't support multi channel audio at all? That sucks.

I think it does but only with Wma Pro (which we cannot encode AFAIK).

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Fri Feb 18, 2011 7:18 pm
by dougri
Realized same thing this morning playing m4v (mp4, ac3 5.1) over atv2, ps3 and xbox360... trying to settle on an encode that works with all three devices... the xbox 360 will not play the ac3/5.1, but will play stereo. As the TV I have the xbox connected to is only stereo, that is fine with me... should this be a simple audio transcode in the xbox360 profile? is there a way to force all 5.1 content to the xbox 360 to stereo as long as it is not WMAPro? If so, maybe this should be included in the standard xbox360 profile since it does not support 5.1 any other way?

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Fri Feb 18, 2011 11:05 pm
by zip
maybe. there could be a forceStereo="true" on the profile I guess that will overwrite whatever is in the console. Create a bitbucket ticket if you'd like that feature

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Fri Feb 18, 2011 11:20 pm
by dougri
I think you might have misunderstood??? I WANT it to play stereo when feeding the xbox 360, but it will not play it at all unless I encode a stereo file in the library. I'll try force stereo tonight in the Xbox profile. thanks.

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Sat Feb 19, 2011 12:49 am
by zip
it wont work, you can only force it in the console now for all profiles. I was suggesting turning it on per profile

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Sat Feb 19, 2011 1:22 am
by dougri
any chance you could post what that would look like in the profile? here is the log when I try to play the ac3 encoded file (AVC_MP4_MP_SD_AC3), and the one when it successfully plays the same movie with a stereo encode selected in handbrake (shows up as AVC_MP4_MP_SD_AAC_MULT5):


2011-02-18 17:07:28,040 DEBUG [LocalContentCacheDecorator] Found entry in the cache (local_default), returning it
2011-02-18 17:07:28,119 DEBUG [ServiceControlRequestHandler] Returning OK SOAP message
2011-02-18 17:07:36,636 DEBUG [WebServer] Incoming connection from ...
2011-02-18 17:07:36,637 DEBUG [ResourceTransportRequestHandler] GET /resource/242/MEDIA_ITEM/AVC_MP4_MP_SD_AC3 HTTP/1.1, headers = [User-Agent: Xenon,Connection: Keep-alive,Host: ...]]
2011-02-18 17:07:36,637 DEBUG [RendererDAOImpl] Reading a Renderer with ip address ...
2011-02-18 17:07:36,638 DEBUG [ResourceTransportRequestHandler] Resource request accepted. Using client 'IPAddress=/..., Profile=XBox 360'
2011-02-18 17:07:36,639 DEBUG [ResourceTransportRequestHandler] Request for resource 242 and type 'MEDIA_ITEM' received
2011-02-18 17:07:36,639 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 242)
2011-02-18 17:07:36,641 DEBUG [VideoDAOImpl] Reading a Video (id = 242)
2011-02-18 17:07:36,643 DEBUG [VideoDeliveryEngine] Delivering item '242' for client 'IPAddress=/..., Profile=XBox 360'
2011-02-18 17:07:36,643 DEBUG [VideoDeliveryEngine] Delivering file 'SWIV1.m4v' in native format
2011-02-18 17:07:36,643 DEBUG [MediaItemDAOImpl] Getting file of media item 242
2011-02-18 17:07:36,647 DEBUG [MediaItemDAOImpl] Marking MediaItem (id = 242) as read
2011-02-18 17:07:36,664 DEBUG [LocalContentCacheDecorator] Cleared cache (local_resetafterplay)
2011-02-18 17:07:36,665 DEBUG [ResourceTransportRequestHandler] Creating stream entity with length: 2100119571
2011-02-18 17:07:36,665 DEBUG [ResourceTransportRequestHandler] Sending file back
2011-02-18 17:07:36,665 DEBUG [ResourceTransportRequestHandler] HTTP/1.1 200 OK, headers = [[Content-Type: video/mp4,Content-Length: 2100119571,Date: Sat, 19 Feb 2011 01:07:36 GMT,Server: Linux, UPnP/1.0 DLNADOC/1.50, Serviio/0.5,Cache-control: no-cache,transferMode.dlna.org: Streaming]]
2011-02-18 17:07:37,486 DEBUG [WebServer] I/O error: Connection reset


and the successful one:

2011-02-18 17:19:00,545 DEBUG [WebServer] Incoming connection from /...
2011-02-18 17:19:00,545 DEBUG [ResourceTransportRequestHandler] GET /resource/241/MEDIA_ITEM/AVC_MP4_MP_SD_AAC_MULT5 HTTP/1.1, headers = [User-Agent: Xenon,Connection: Keep-alive,Host:...,RANGE: bytes=6784666-]]
2011-02-18 17:19:00,546 DEBUG [RendererDAOImpl] Reading a Renderer with ip address ...
2011-02-18 17:19:00,547 DEBUG [ResourceTransportRequestHandler] Resource request accepted. Using client 'IPAddress=/..., Profile=XBox 360'
2011-02-18 17:19:00,548 DEBUG [ResourceTransportRequestHandler] Request for resource 241 and type 'MEDIA_ITEM' received
2011-02-18 17:19:00,548 DEBUG [MediaItemDAOImpl] Reading a MediaItem (id = 241)
2011-02-18 17:19:00,550 DEBUG [VideoDAOImpl] Reading a Video (id = 241)
2011-02-18 17:19:00,552 DEBUG [VideoDeliveryEngine] Delivering item '241' for client 'IPAddress=/..., Profile=XBox 360'
2011-02-18 17:19:00,552 DEBUG [VideoDeliveryEngine] Delivering file 'StarWarsEpisodeIV.m4v' in native format
2011-02-18 17:19:00,552 DEBUG [MediaItemDAOImpl] Getting file of media item 241
2011-02-18 17:19:00,556 DEBUG [ResourceTransportRequestHandler] Creating stream entity with length: 998054736
2011-02-18 17:19:00,556 DEBUG [ResourceTransportRequestHandler] Sending file back
2011-02-18 17:19:00,557 DEBUG [ResourceTransportRequestHandler] HTTP/1.1 206 Partial Content, headers = [[Content-Type: video/mp4,Content-Range: bytes 6784666-1004839401/1004839402,Content-Length: 998054736,Date: Sat, 19 Feb 2011 01:19:00 GMT,Server: Linux, UPnP/1.0 DLNADOC/1.50, Serviio/0.5,Cache-control: no-cache,transferMode.dlna.org: Streaming]]

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Sat Feb 19, 2011 2:15 pm
by Cerberus
this feature is NOT availible yet, what zip is saying is make a feature request on BITbucket and he will see if it can be added to serviio for a later release. i can add that request for u if u want ?

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Sat Feb 19, 2011 5:00 pm
by dougri
gotcha... I'd appreciate it.

Re: Transcode 5.1 to 2.0 for XBOX 360 (mp4 file)

PostPosted: Sat Feb 19, 2011 5:17 pm
by Cerberus