PDA

View Full Version : mp4 with 5.1 AAC audio not playing on xbox 360



Koekebeest
11-03-2010, 09:10 AM
Hello,

I'm evaluating mezzmo as my media server, but it doesn't stream my mp4 videos to my xbox 360. This is probably because of the fact that the xbox 360 only supports 2 channel aac audio and my video's are 5.1. I would suspect mezzmo to transcode the audio to 2.0 but that doesn't seem to happen. Can this be added to the xbox 360 profile?

Thank you.

Paul
11-03-2010, 09:57 AM
Hello,

Can you please post FFmpeg information about one of those files (in Mezzmo right-click on the file and use the "Get FFmpeg Information" command) - I can then check it against the profile to see what's happening.

Koekebeest
11-03-2010, 10:51 AM
Thank you for your quick reply.
Here is the ffmpeg information for one of the files that didn't work.

FFmpeg version SVN-r25446, Copyright (c) 2000-2010 the FFmpeg developers
built on Oct 12 2010 10:38:21 with gcc 4.4.2
configuration: --enable-memalign-hack --arch=x86 --target-os=mingw32 --cross-prefix=i686-mingw32- --enable-static --disable-shared --enable-zlib --disable-ffprobe --disable-ffplay --prefix=/media/windows-share/ffmpeg --extra-cflags=-U__STRICT_ANSI__ --enable-libmp3lame --enable-libx264 --enable-gpl --extra-libs='-lx264 -lpthread' --enable-runtime-cpudetect
libavutil 50.32. 3 / 50.32. 3
libavcore 0. 9. 1 / 0. 9. 1
libavcodec 52.92. 0 / 52.92. 0
libavformat 52.81. 0 / 52.81. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.50. 1 / 1.50. 1
libswscale 0.12. 0 / 0.12. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Files\Videos\Big Bang Theory\Season 2\The.Big.Bang.Theory.2x01.The.Bad.Fish.Paradigm.7 20p.HDTV.x264.AC3-DIMENSION_track1.mp4':
Metadata:
major_brand : isom
minor_version : 1
compatible_brands: isomavc1
Duration: 00:21:21.28, start: 0.000000, bitrate: 3426 kb/s
Stream #0.0(und): Video: h264, yuv420p, 1280x720, 3272 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
Stream #0.1(und): Audio: aac, 48000 Hz, 5.1, s16, 149 kb/s
At least one output file must be specified


---> DB Level Info: 41

Paul
11-03-2010, 11:18 AM
Thanks for the file info.

It fails because FFmpeg cannot resample 6 channels to 2 channels - we'll need to find a solution for this. Please send a message to support (at) conceiva (dot) com and once we have a working solution, I'll send you an updated device profile.

RMerlin
11-04-2010, 03:44 PM
Maybe the trick we did with the WDTV profile would work - transcoding from AAC 5.1 to AC3 5.1? If the Xbox 360 can pass AC3 to the receiver, that would do the trick.

Paul
11-05-2010, 08:29 AM
I'll give that a try as well - thanks for the suggestion.

rkneeshaw
01-13-2011, 01:58 PM
Any update on this?

I've been evaluating tversity but they seem to have the same problem. Does Mezzmo have a solution for those of us with H.264/AAC 5.1 mp4 files and want to stream to xbox 360 without converting all our video files?

Paul
01-13-2011, 02:46 PM
I think that the XBox360 does not support AC3 in an MP4 container at this point. Maybe they'll add it in a future firmware update, but for the time being I don't think it's possible, unfortunately.

If anyone was successful in playing MP4 files with h264 video and AC3 audio on the XBox, please let me know.

rkneeshaw
01-14-2011, 12:46 AM
I thought AC3 was different than AAC?

Regardless, the main purpose (IMHO) of using a media server rather than file shares is because it will transcode to the proper format for the device. Mezzmo doesnt seem to be doing that properly at this point?

EDIT: I see where you're coming from, and I agree, I dont think that will work because xbox doesnt support AC3 in a mp4 container. Bottom line we either need mezzmo to resample the 6 channel AAC audio to 2 channel AAC, or transcode the entire stream to something like a WMV or AVI. Can either of those two things be done?

Paul
01-14-2011, 10:14 AM
Yes, currently Mezzmo will transcode to WMV - we tried AVI as well, but it appeared that XBox didn't play some of the AVI files we generated, so WMV is a safer choice (at least for now).

FFmpeg considers AAC an "experimental" format at this point, so we can encode it, but it's not in the released device profiles. I'll be happy to tell you how to modify the XBox profile to transcode to AAC and you can test and see if it works for you or not.

rkneeshaw
01-14-2011, 10:24 AM
I'll be happy to tell you how to modify the XBox profile to transcode to AAC and you can test and see if it works for you or not.

Yes please, I'm happy to test it!

If it doesnt work, can we force Mezzmo to transcode everything to WMV by further editing the profile?

Paul
01-14-2011, 10:31 AM
Yes, we can force Mezzmo to transcode everything to WMV (of course it's the slowest transcoding format, so the experience won't be great, unless you've got a really fast CPU).

To try, edit the MicrosoftXBox360.prf (in Notepad) and change:



<avcontainer id="mov,mp4,m4a,3gp,3g2,mj2" name="mp4_video" encode="0" mimetype="video/mp4" supportschunked="0">
<video>
<format id="mpeg4" encode="0">
</format>
</video>
<video>
<format id="h264" encode="0">
</format>
</video>
<audio>
<format id="aac" encode="0">
<channels>2</channels>
</format>
</audio>
</avcontainer>


to:



<avcontainer id="mov,mp4,m4a,3gp,3g2,mj2" name="h264aac" encode="1" mimetype="video/mp4" format="mp4" supportschunked="0" preferredtranscoded="1">
<video>
<format id="mpeg4" encode="0">
</format>
</video>
<video>
<format id="h264" encode="1" codec="libx264" preferredtranscoded="1">
<maxbitrate>2000000</maxbitrate>
<copyts>0</copyts>
<samequality>0</samequality>
<framerate>30</framerate>
<bitrate>1500000</bitrate>
</format>
</video>
<audio>
<format id="aac" encode="1" codec="aac" preferredtranscoded="1">
<channels>2</channels>
<maxbitrate>160000</maxbitrate>
<bitrate>128000</bitrate>
<maxsamplingrate>44100</maxsamplingrate>
<minsamplingrate>22050</minsamplingrate>
</format>
</audio>
<ffmpegadditional>-threads 4 -coder 0 -flags +loop -cmp +chroma -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 0 -refs 4 -directpred 1 -trellis 0 -flags2 +bpyramid+mixed_refs-wpred+dct8x8+fastpskip -wpredp 2 -strict experimental</ffmpegadditional>
</avcontainer>


Also, change
preferredtranscoded="1" to be
preferredtranscoded="0" in the ASF container.

After that save the file, restart the server and give it a try. I'd recommend enabling logging before that and then checking the transcoding log for any possible errors and such.

rkneeshaw
01-14-2011, 02:53 PM
ok tried that and now instead of just kicking me back to the "file browser" without error on the xbox it actually gives me an error that the format is not supported (69-C00D002F). Maybe that counts for something? :(

Here is the Transcoder log:


1 - Jan 13 22:54:51.890 - ERROR> Transcoder: NO CURRENT CONTAINER! (1569)
2 - Jan 13 22:54:51.890 - ERROR> Transcoder: NO CURRENT CONTAINER! (1569)
3 - Jan 13 22:54:53.234 - TRANS> Input file: D:\Media\Video\Movies\Cars.h264.aac.mp4
4 - Jan 13 22:54:53.234 - > Transcoder: Executing: C:\Program Files\Conceiva\Mezzmo\ffmpeg.exe -i "D:\Media\Video\Movies\CARSH2~1.MP4" -y -vcodec copy -r 30 -vf "scale=640:478" -acodec aac -ac 2 -ab 128000 -ar 48000 -sn -f mp4 -threads 4 -coder 0 -flags +loop -cmp +chroma -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 0 -refs 4 -directpred 1 -trellis 0 -flags2 +bpyramid+mixed_refs-wpred+dct8x8+fastpskip -wpredp 2 -strict experimental "C:\Documents and Settings\Administrator\Local Settings\Application Data\Conceiva\Mezzmo\TranscodingFiles\73DBA4DC-58B6-4754-857D-D35FA5E058D4\Video\308-h264aac-libx264-aac.mzt"
5 - Jan 13 22:54:53.234 - > Ffmpeg --------------------------------------------------------------------
6 - Jan 13 22:54:53.453 - > Looks like transcoding started ok, let's wait for the actual file a bit...
7 - Jan 13 22:54:53.453 - > Transcoded file is ok, size is 48 bytes
8 - Jan 13 22:54:53.468 - FFmpeg version SVN-r26071, Copyright (c) 2000-2010 the FFmpeg developers
built on Dec 22 2010 10:30:32 with gcc 4.4.2
configuration: --enable-memalign-hack --arch=x86 --target-os=mingw32 --cross-prefix=i686-mingw32- --enable-static --disable-shared --enable-zlib --disable-ffprobe --disable-ffplay --prefix=/media/windows-share/ffmpeg --extra-cflags=-U__STRICT_ANSI__ --enable-libmp3lame --enable-libx264 --enable-gpl --extra-libs='-lx264 -lpthread' --enable-runtime-cpudetect
libavutil 50.35. 0 / 50.35. 0
libavcore 0.16. 0 / 0.16. 0
libavcodec 52.100. 0 / 52.100. 0
libavformat 52.88. 0 / 52.88. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.69. 0 / 1.69. 0
libswscale 0.12. 0 / 0.12. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Media\Video\Movies\CARSH2~1.MP4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time :
title : Cars
album : CRZ0NNF1
encoder : Lavf52.78.4
Duration: 01:56:30.77, start: 0.000000, bitrate: 1552 kb/s
Stream #0.0(und): Video: h264, yuv420p, 640x478, 1099 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
Metadata:
creation_time : ˙˙˙
Stream #0.1(und): Audio: aac, 48000 Hz, 5.1, s16, 447 kb/s
Metadata:
creation_time : ˙˙˙
Output #0, mp4, to 'C:\Documents and Settings\Administrator\Local Settings\Application Data\Conceiva\Mezzmo\TranscodingFiles\73DBA4DC-58B6-4754-857D-D35FA5E058D4\Video\308-h264aac-libx264-aac.mzt':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time :
title : Cars
album : CRZ0NNF1
encoder : Lavf52.88.0
Stream #0.0(und): Video: libx264, yuv420p, 640x478, q=2-31, 1099 kb/s, 24k tbn, 23.98 tbc
Metadata:
creation_time : ˙˙˙
Stream #0.1(und): Audio: aac, 48000 Hz, 2 channels, s16, 128 kb/s
Metadata:
creation_time : ˙˙˙
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
Resampling with input channels greater than 2 unsupported.
Can not resample 6 channels @ 48000 Hz to 2 channels @ 48000 Hz
11 - Jan 13 22:54:53.468 -
<MEZZMO>: Child process ended
12 - Jan 13 22:54:53.687 - > Transcoder: GetAudioVideoFileName: C:\Documents and Settings\Administrator\Local Settings\Application Data\Conceiva\Mezzmo\TranscodingFiles\73DBA4DC-58B6-4754-857D-D35FA5E058D4\Video\308-h264aac-libx264-aac.mzt ALREADY EXISTS!
13 - Jan 13 22:54:53.718 - > Transcoder: GetAudioVideoFileName: C:\Documents and Settings\Administrator\Local Settings\Application Data\Conceiva\Mezzmo\TranscodingFiles\73DBA4DC-58B6-4754-857D-D35FA5E058D4\Video\308-h264aac-libx264-aac.mzt ALREADY EXISTS!


Looks like what you stated before, it cant transcode from 6 channels to 2?


Resampling with input channels greater than 2 unsupported.
Can not resample 6 channels @ 48000 Hz to 2 channels @ 48000 Hz

Does this mean we are stuck transcoding to WMV?

Paul
01-14-2011, 02:57 PM
Hmm, what if you change that to:



<avcontainer id="mov,mp4,m4a,3gp,3g2,mj2" name="h264aac" encode="1" mimetype="video/mp4" format="mp4" supportschunked="0" preferredtranscoded="1">
<video>
<format id="mpeg4" encode="1" codec="mpeg4" preferredtranscoded="1">
<maxbitrate>2000000</maxbitrate>
<copyts>0</copyts>
<samequality>0</samequality>
<framerate>30</framerate>
<bitrate>1500000</bitrate>
</format>
</video>
<video>
<format id="h264" encode="0">
</format>
</video>
<audio>
<format id="aac" encode="1" codec="aac" preferredtranscoded="1">
<channels>2</channels>
<maxbitrate>160000</maxbitrate>
<bitrate>128000</bitrate>
<maxsamplingrate>44100</maxsamplingrate>
<minsamplingrate>22050</minsamplingrate>
</format>
</audio>
<ffmpegadditional>-threads 4 -coder 0 -flags +loop -cmp +chroma -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 0 -refs 4 -directpred 1 -trellis 0 -flags2 +bpyramid+mixed_refs-wpred+dct8x8+fastpskip -wpredp 2 -strict experimental</ffmpegadditional>
</avcontainer>

Try that and see if it produces a playable result.

If it still doesn't, I'll give it a try here later as well and see if I can make it work.

rkneeshaw
01-14-2011, 03:03 PM
Ok this time it produced the same result but a new error code on the xbox: 69-807B0194

Error in the transcoder log looks the same though:

1 - Jan 13 23:01:27.890 - TRANS> Input file: D:\Media\Video\Movies\Cars.h264.aac.mp4
2 - Jan 13 23:01:27.890 - > Transcoder: Executing: C:\Program Files\Conceiva\Mezzmo\ffmpeg.exe -i "D:\Media\Video\Movies\CARSH2~1.MP4" -y -vcodec mpeg4 -b 1500000 -maxrate 2000000 -bufsize 1000000 -r 30 -vf "scale=640:478" -acodec aac -ac 2 -ab 128000 -ar 48000 -sn -f mp4 -threads 4 -coder 0 -flags +loop -cmp +chroma -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 0 -refs 4 -directpred 1 -trellis 0 -flags2 +bpyramid+mixed_refs-wpred+dct8x8+fastpskip -wpredp 2 -strict experimental "C:\Documents and Settings\Administrator\Local Settings\Application Data\Conceiva\Mezzmo\TranscodingFiles\73DBA4DC-58B6-4754-857D-D35FA5E058D4\Video\308-h264aac-mpeg4-aac.mzt"
3 - Jan 13 23:01:27.890 - > Ffmpeg --------------------------------------------------------------------
4 - Jan 13 23:01:28.140 - > Looks like transcoding started ok, let's wait for the actual file a bit...
5 - Jan 13 23:01:28.250 - FFmpeg version SVN-r26071, Copyright (c) 2000-2010 the FFmpeg developers
built on Dec 22 2010 10:30:32 with gcc 4.4.2
configuration: --enable-memalign-hack --arch=x86 --target-os=mingw32 --cross-prefix=i686-mingw32- --enable-static --disable-shared --enable-zlib --disable-ffprobe --disable-ffplay --prefix=/media/windows-share/ffmpeg --extra-cflags=-U__STRICT_ANSI__ --enable-libmp3lame --enable-libx264 --enable-gpl --extra-libs='-lx264 -lpthread' --enable-runtime-cpudetect
libavutil 50.35. 0 / 50.35. 0
libavcore 0.16. 0 / 0.16. 0
libavcodec 52.100. 0 / 52.100. 0
libavformat 52.88. 0 / 52.88. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.69. 0 / 1.69. 0
libswscale 0.12. 0 / 0.12. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Media\Video\Movies\CARSH2~1.MP4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time :
title : Cars
album : CRZ0NNF1
encoder : Lavf52.78.4
Duration: 01:56:30.77, start: 0.000000, bitrate: 1552 kb/s
Stream #0.0(und): Video: h264, yuv420p, 640x478, 1099 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
Metadata:
creation_time : ˙˙˙
Stream #0.1(und): Audio: aac, 48000 Hz, 5.1, s16, 447 kb/s
Metadata:
creation_time : ˙˙˙
[buffer @ 026ee110] w:640 h:478 pixfmt:yuv420p
[scale @ 026ee3f0] w:640 h:478 fmt:yuv420p -> w:640 h:478 fmt:yuv420p flags:0x4
Output #0, mp4, to 'C:\Documents and Settings\Administrator\Local Settings\Application Data\Conceiva\Mezzmo\TranscodingFiles\73DBA4DC-58B6-4754-857D-D35FA5E058D4\Video\308-h264aac-mpeg4-aac.mzt':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time :
title : Cars
album : CRZ0NNF1
encoder : Lavf52.88.0
Stream #0.0(und): Video: mpeg4, yuv420p, 640x478, q=10-51, 1500 kb/s, 30 tbn, 30 tbc
Metadata:
creation_time : ˙˙˙
Stream #0.1(und): Audio: aac, 48000 Hz, 2 channels, s16, 128 kb/s
Metadata:
creation_time : ˙˙˙
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
Resampling with input channels greater than 2 unsupported.
Can not resample 6 channels @ 48000 Hz to 2 channels @ 48000 Hz
8 - Jan 13 23:01:28.250 -
<MEZZMO>: Child process ended
9 - Jan 13 23:01:28.343 - > Transcoded file is ok, size is 44 bytes


EDIT: Looks like I got ya with the ninja edit :) You're fast!!

Paul
01-14-2011, 03:09 PM
Try this one:



<format id="aac" encode="1" codec="aac" preferredtranscoded="1">
<channels>2</channels>
<channels>6</channels>
<maxbitrate>160000</maxbitrate>
<bitrate>128000</bitrate>
<maxsamplingrate>44100</maxsamplingrate>
<minsamplingrate>22050</minsamplingrate>
</format>


(added 6 channels to AAC encoding basically)

rkneeshaw
01-14-2011, 03:19 PM
Check out this guy who had a similar problem:

http://www.activeobjects.no/subsonic/forum/viewtopic.php?p=19555#19555

Is it possible to somehow remove the "-ac 2" switch and see what happens?

Paul
01-14-2011, 03:20 PM
You can try running it manually by pasting the command line from the log into a DOS command prompt.

Or adjust the profile as per my last post and that'll actually add "-ac 6" in case of 5.1 sound.

rkneeshaw
01-14-2011, 03:21 PM
Try this one:



<format id="aac" encode="1" codec="aac" preferredtranscoded="1">
<channels>2</channels>
<channels>6</channels>
<maxbitrate>160000</maxbitrate>
<bitrate>128000</bitrate>
<maxsamplingrate>44100</maxsamplingrate>
<minsamplingrate>22050</minsamplingrate>
</format>


(added 6 channels to AAC encoding basically)

No change, same error :(

Paul
01-14-2011, 03:22 PM
What do you get if you run this in your command prompt (from Mezzmo's installation folder):



ffmpeg.exe -i "D:\Media\Video\Movies\CARSH2~1.MP4" -y -vcodec mpeg4 -b 1500000 -maxrate 2000000 -bufsize 1000000 -r 30 -vf "scale=640:478" -acodec aac -ac 6 -ab 128000 -ar 48000 -sn -f mp4 -threads 4 -coder 0 -flags +loop -cmp +chroma -me_method hex -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 0 -refs 4 -directpred 1 -trellis 0 -flags2 +bpyramid+mixed_refs-wpred+dct8x8+fastpskip -wpredp 2 -strict experimental "C:\Documents and Settings\Administrator\Local Settings\Application Data\Conceiva\Mezzmo\TranscodingFiles\73DBA4DC-58B6-4754-857D-D35FA5E058D4\Video\308-h264aac-mpeg4-aac.mzt"


Is it the same error?

rkneeshaw
01-14-2011, 03:32 PM
Looks like it is trying to output AAC in 5.1. Here is the message that stands out in RED when I ran that command from the command prompt:

[mpeg4 @ 017cf010] me_method is only allowed to be set to zero and epzs; for hex
,umh,full and others see dia_size

video transcoding failed

Paul
01-14-2011, 03:34 PM
In the command change "-me_method hex" to "-me_method epzs" - see if that helps.

rkneeshaw
01-14-2011, 03:37 PM
ok that works, I pressed q to stop it.

Paul
01-14-2011, 03:41 PM
Ok, good :) Try this one:



<avcontainer id="mov,mp4,m4a,3gp,3g2,mj2" name="h264aac" encode="1" mimetype="video/mp4" format="mp4" supportschunked="0" preferredtranscoded="1">
<video>
<format id="mpeg4" encode="1" format="mpeg4" preferredtranscoded="1">
<maxbitrate>2000000</maxbitrate>
<copyts>0</copyts>
<samequality>0</samequality>
<framerate>30</framerate>
<bitrate>1500000</bitrate>
</format>
</video>
<video>
<format id="h264" encode="0">
</format>
</video>
<audio>
<format id="aac" encode="1" codec="aac" preferredtranscoded="1">
<channels>2</channels>
<channels>6</channels>
<maxbitrate>160000</maxbitrate>
<bitrate>128000</bitrate>
<maxsamplingrate>44100</maxsamplingrate>
<minsamplingrate>22050</minsamplingrate>
</format>
</audio>
<ffmpegadditional>-threads 4 -coder 0 -flags +loop -cmp +chroma -me_method epzs -subq 6 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 0 -refs 4 -directpred 1 -trellis 0 -flags2 +bpyramid+mixed_refs-wpred+dct8x8+fastpskip -wpredp 2 -strict experimental</ffmpegadditional>
</avcontainer>

rkneeshaw
01-14-2011, 03:47 PM
Same "unsupported format" error on the xbox, transcoder log is empty (did it not even run?)

Paul
01-14-2011, 03:49 PM
Ok, I guess that proves that the XBox360 cannot play AAC with 5.1 sound *and* FFmpeg cannot transcode AAC 5.1 sound to AAC 2-channel sound (at least not at the moment, maybe they'll implement it later).

I would say that the original (default) device profile should then work - it'll pass through files with 2-channel AAC and will transcode 5.1 AAC to 2-channel WMA.

rkneeshaw
01-14-2011, 03:56 PM
Yep, it seems nobody has a solution for this using ffmpeg. I only found someone who makes patches that might get it to work (http://muzso.hu/2009/02/25/downsampling-multichannel-audio-5.1-into-stereo-2-channels-with-ffmpeg), but hopefullly the ffmpeg guys get it together and support it at some point.

I've reverted back to the default xbox device profile but it doesnt transcode the 5.1 AAC to WMA; I get the "unsupported format" error on the xbox and it doesnt look like the transcoder is used at all. Do we need to tweak the profile to "force" mezzmo to transcode 5.1 AAC (but maybe not transcode it if the file is 2.0 AAC)?

rkneeshaw
01-14-2011, 04:00 PM
Wait, I take that back, the transcoder IS starting with the default profile, but look, its still complaining about resampling 6 channel audio to 2 channel:


1 - Jan 13 23:58:52.328 - TRANS> Input file: D:\Media\Video\Movies\Cars.h264.aac.mp4
2 - Jan 13 23:58:52.328 - > Transcoder: Executing: C:\Program Files\Conceiva\Mezzmo\ffmpeg.exe -i "D:\Media\Video\Movies\CARSH2~1.MP4" -y -vcodec wmv2 -b 15000000 -sameq -copyts -vf "scale=640:478" -acodec wmav2 -ac 2 -ar 48000 -sn -f asf -copyinkf -fflags +genpts+ignidx+igndts -cmp 1 -subcmp 1 -mbd bits -trellis 0 -intra -aspect 16:9 -pix_fmt yuv420p -s 720x576 "C:\Documents and Settings\Administrator\Local Settings\Application Data\Conceiva\Mezzmo\TranscodingFiles\73DBA4DC-58B6-4754-857D-D35FA5E058D4\Video\308-asf-wmv2-wmav2.mzt"
3 - Jan 13 23:58:52.328 - > Ffmpeg --------------------------------------------------------------------
4 - Jan 13 23:58:52.546 - > Looks like transcoding started ok, let's wait for the actual file a bit...
5 - Jan 13 23:58:52.546 - > Waiting for transcoding to appear on disk...
6 - Jan 13 23:58:52.703 - FFmpeg version SVN-r26071, Copyright (c) 2000-2010 the FFmpeg developers
built on Dec 22 2010 10:30:32 with gcc 4.4.2
configuration: --enable-memalign-hack --arch=x86 --target-os=mingw32 --cross-prefix=i686-mingw32- --enable-static --disable-shared --enable-zlib --disable-ffprobe --disable-ffplay --prefix=/media/windows-share/ffmpeg --extra-cflags=-U__STRICT_ANSI__ --enable-libmp3lame --enable-libx264 --enable-gpl --extra-libs='-lx264 -lpthread' --enable-runtime-cpudetect
libavutil 50.35. 0 / 50.35. 0
libavcore 0.16. 0 / 0.16. 0
libavcodec 52.100. 0 / 52.100. 0
libavformat 52.88. 0 / 52.88. 0
libavdevice 52. 2. 2 / 52. 2. 2
libavfilter 1.69. 0 / 1.69. 0
libswscale 0.12. 0 / 0.12. 0
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'D:\Media\Video\Movies\CARSH2~1.MP4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time :
title : Cars
album : CRZ0NNF1
encoder : Lavf52.78.4
Duration: 01:56:30.77, start: 0.000000, bitrate: 1552 kb/s
Stream #0.0(und): Video: h264, yuv420p, 640x478, 1099 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc
Metadata:
creation_time : ˙˙˙
Stream #0.1(und): Audio: aac, 48000 Hz, 5.1, s16, 447 kb/s
Metadata:
creation_time : ˙˙˙
[buffer @ 01526d80] w:640 h:478 pixfmt:yuv420p
[scale @ 0174b7c0] w:640 h:478 fmt:yuv420p -> w:720 h:576 fmt:yuv420p flags:0x4
[scale @ 0154f0d0] w:720 h:576 fmt:yuv420p -> w:640 h:478 fmt:yuv420p flags:0x4
Output #0, asf, to 'C:\Documents and Settings\Administrator\Local Settings\Application Data\Conceiva\Mezzmo\TranscodingFiles\73DBA4DC-58B6-4754-857D-D35FA5E058D4\Video\308-asf-wmv2-wmav2.mzt':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time :
title : Cars
WM/AlbumTitle : CRZ0NNF1
WM/EncodingSettings: Lavf52.88.0
Stream #0.0(und): Video: wmv2 (hq), yuv420p, 640x478 [PAR 64:45 DAR 4096:2151], q=2-31, 15000 kb/s, 1k tbn, 23.98 tbc
Metadata:
creation_time : ˙˙˙
Stream #0.1(und): Audio: wmav2, 48000 Hz, 2 channels, s16, 64 kb/s
Metadata:
creation_time : ˙˙˙
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
Resampling with input channels greater than 2 unsupported.
Can not resample 6 channels @ 48000 Hz to 2 channels @ 48000 Hz
9 - Jan 13 23:58:52.703 -
<MEZZMO>: Child process ended
10 - Jan 13 23:58:52.750 - > Transcoded file is ok, size is 1013 bytes

Paul
01-14-2011, 04:03 PM
That's what I thought :) Yes, we can't do much about this problem, unfortunately, since we just proved that we cannot transcode to MP4 with 6-channel AAC and WMA does not support 6-channel sound, so needs to be resampled to stereo, but FFmpeg cannot do that. So, either we need to try a different format (e.g. AVI) or those files need to be manually converted outside of Mezzmo for the time being.

rkneeshaw
01-14-2011, 04:10 PM
Can we force ffmpeg to transcode to an ASF container with WMV3 for video and wmapro for audio? I think wmapro is 5.1 channel, and xbox supports it



The Xbox 360 console supports the following for WMV:

* File extensions: .wmv
* Containers: ASF
* Video profiles: WMV7 (WMV1), WMV8 (WMV2), WMV9 (WMV3), VC-1 (WVC1 or WMVA) in simple, main, and advanced up to level 3
* Video bit rate: 15 Mbps with resolutions of 1920 × 1080 at 30 fps.
* Audio profiles: WMA7/8, WMA9 Pro (stereo and 5.1), WMA Lossless
* Audio max bit rate: No restrictions.

Paul
01-14-2011, 04:12 PM
No, FFmpeg does not support encoding WMA Pro, unfortunately.

rkneeshaw
01-14-2011, 04:14 PM
Last one, how about an AVI container with MPEG part 2 (is this divx?) and dolby digital audio?


The Xbox 360 console supports the following for AVI:

* File extensions: .avi, .divx
* Containers: AVI
* Video profiles: MPEG-4 Part 2 (Simple Profile and Advanced Simple Profile)
* Video bit rate: 5 Mbps with resolutions of 1280 × 720 at 30 fps
* Audio profiles: Dolby® Digital (2 channel and 5.1 channel), MP3
* Audio max bit rate: No restrictions

Paul
01-14-2011, 04:19 PM
I'll need to experiment with this - probably I'll have time on Monday and then I'll know for sure. As long as the XBox doesn't expect to find DivX tags in the AVI (which can only be put in after a file finishes transcoding), it may work.

rkneeshaw
01-14-2011, 04:23 PM
It might be the last resort :) I hope it works out, I really really don't want to have to re-encode all of my movies..... wish ffmpeg would address the downsampling issue :(

Thanks for all your efforts!!!!

rkneeshaw
01-15-2011, 03:03 AM
Looks like ffmpeg can do it, check this out:

http://ubuntuforums.org/showthread.php?t=1403042

rkneeshaw
01-17-2011, 02:18 AM
I've given in and decided I'm going to re-encode all my video files. I had hoped that MP4 with h.264 video and AAC audio would be a good neutral format to store my movies/videos without compromising quality, but this isn't working so well for the big reason that both xbox and iPhones/iPads/etc do not support 5.1 channel AAC audio. So why bother re-encoding the audio anyway since almost EVERY device supports downmixing/decoding AC3 audio and its fairly efficient anyway. And the space savings is so negligible compared to AC3 that it doesnt really make sense to encode to 5.1 AAC... might as well leave it as 5.1 channel AC3 straight from the DVDs... the ultimate preservation of audio quality.

Also, since I'll likely have to transode everything on the fly anyway, I figure I might as well use the most flexible container and best formats possible: .MKV with h.264 video and AC3 audio.

I've used the device profile you provided earlier to force mezzmo to transocde to mp4/h264/aac and it works great. I took a MKV file with H.264 video and AC3 audio. Since xbox supports h264 in an mp4 container, Mezzmo is only converting the container and audio stream down to 2 channel AAC and leaving the video alone. This, IMO, is perfect and most efficient.

Now I just need to similarly check to make sure my iphone/ipod profiles are tweaked so the transcode output is mp4/h264/aac as well and I should be in a good spot.

Paul
01-17-2011, 11:40 AM
Good, so now the XBox works properly?

The iPhone/iPod will not be able to play movies transcoded in real-time, but after they are transcoded they should work.

rkneeshaw
01-17-2011, 12:49 PM
With a .mkv/h264/ac3 source file the xbox plays properly, and especially well using the updated device profile config you first posted that forces Mezzmo to transcode to mp4/h264/2-channel-aac. For the first time my encoded copy of "Cars" played on my xbox :) Apparently ffmpeg has no issue downmixing 5.1 channel ac3 to 2 channel AAC.

Thank you for the clarification on the iPhone/iPod transcoding; thats a bit of a bummer, hopefully Apple will update their software so real-time transcoded streams are possible, but thats probably a long shot.

Paul
01-17-2011, 12:57 PM
The only way for Apple to fix this is to support something else, other than an MP4, because most other formats don't require special bits in the file to play. I agree, it's very unlikely to happen, unfortunately :(

rkneeshaw
01-17-2011, 02:17 PM
So the limitation is with mp4?

Here's why I thought it was working on the xbox: I fired up Mezzmo on my underpowered pentium 4 1.8ghz server. I selected the mkv/h264/ac3 file from the xbox and the xbox paused, said "Opening" and sat there for about 20 to 30 seconds before I cancelled it. I walked away for about 10 minutes, came back, thought I'd try it again for good measure and it fired right up and played the movie. It only played about 5 minutes of the movie though. What I figure is that my server is way too underpowered to handle transcoding fast enough to keep up with real-time so it only transcoded 5 minutes of the movie so far and thats what I got. But maybe hte xbox would not have played it anyway, being that I have mezzmo configured to transcode to mp4, until the entire file was transcoded?

If thats the case then I'd rather upgrade my hardware and have it transcode to wmv.

I think I noticed that the xbox won't skip ahead when playing a wmv file, but it will when playing a mp4 file, is that a limitation of wmv or just the file I was playing?

Paul
01-17-2011, 02:30 PM
The MP4 limitation applies mostly to mobile phones, not the XBox - it's different. Your assumption about slow transcoding is most probably right - that CPU is not enough to transcode high-def in real time. WMV encoding is one of the slowest one due to the fact that it's single-threaded (because of an FFmpeg limitation), so it will benefit from pure Ghz more than from the number of core (but a dual-core CPU is the recommended minimum for any transcoding).

To skip through a file, it has to be fully transcoded - was the file still being transcoded when you tried to FF?

rkneeshaw
01-18-2011, 12:52 AM
When I realized it was tryign to transcode that big movie I knew it would be too much for the server, so I used the xbox to navigate to a small video in a format the xbox natively supports and played that (I thought i read somewhere that if you play another video while the mezzmo is transcoding, mezzmo will stop transcoding and respond to the new request).

I think the transcoding was no longer happening on the server when I tried to play the movie because I noticed the CPU wasnt pegged at 100% any longer. Also the videos that woudl allow me to skip forward were mp4/h264/2-channel AAC so they were not being transcoded.

Paul
01-18-2011, 09:38 AM
Mezzmo will transcode in the background (if it's turned on), but the CPU priority of that transcoding if low (by default - you can change that), so it'll take a lot less of your CPU during that, but it will be much slower than "normal", real-time transcoding. If you start playing another video and it needs transcoding, that will take precedence, so ideally you'd want to start playing a long movie, then stop it and wait (without playing anything else). That'll make sure that this movie is being transcoded and not anything else.

Jiirce
02-10-2011, 05:11 PM
I am getting the exact same issue as stated in these posts... 6 channel not switching to 2 channel. I have tried all the methods listed here but to no avail. I am currently wanting to purchase this software as it works 10x better than Playon which I use now. However this bug is a bit of a deal breaker. I should also note that the exact movies I am attempting to play with Mezzmo (getting the above listed errors) work perfectly with Playon's software... but Playon doesn't fast forward / Rewind / Chapter Skip like Mezzmo does. Mezzmo seems to be a much slicker app and I would prefer to use it if this matter can be resolved.

Paul
02-11-2011, 09:02 AM
The problem with downsampling lies within the domain of FFmpeg's developers, we are not related to them in any way, so unfortunately I don't know when this will be implemented. We're testing new versions of FFmpeg on a weekly basis to check what bugs have been fixed and what new features implemented, so as soon as they've done it, we'll have it as well.