View Full Version : H264 and XBOX
Calabuig
3rd January 2006, 15:34
Hello! Happy New Year!
I'd like to know if there's any chanche to play in XBMC a 720x576 resolution file without dropping frames.
Otherwise, which resolution max I can choose to encode a video to play in my XBOX and which encode settings to get the best from H264?
Thanks in advance!
Marco
fogbav
3rd January 2006, 16:12
Look at the Profiles delivered from Sharktooth - there are special settings for Xbox implemented ...
Even more interesting would be: will there be a implementation from
CoreCodec/TCPMP AVC available for the XBoX ... this will solve many Problems with the slow CPU Available in the Xbox ...
FooFighter007
3rd January 2006, 16:30
I use MeGUI mith the PD-XBOX_HiRes Video Profile for the latest official CVS XBMC. For the audio part I use Nero AAC Stereo Streaming Quality. I mostly use a resolution close to 640 depending on the aspect error. It seems that the mp4 container currently cause massiv problems on my XBMC while the same souce in mkv (matroska) works great.
Calabuig
3rd January 2006, 16:33
And for the resolution? 720x576 is possible to play in XBOX's XBMC?
@ fogbav
What's the implementation from CoreCodec/TCPMP AVC you're talking about?
Sirber
3rd January 2006, 16:39
CoreAVC, many times faster than libavcodec :)
FooFighter007
3rd January 2006, 17:38
And for the resolution? 720x576 is possible to play in XBOX's XBMC?
I just did a 720 x 576 (704x288) test with an average bitrate ~1600 and my setup. I prefer star wars EP III startsequence as there is lots of action/explosions. It seems to play without any errors on the current official CVS XBMC
Calabuig
3rd January 2006, 17:42
Is there any chanche to see this test?
FooFighter007
3rd January 2006, 18:30
check your PM file will be online the next two hours
brucevangeorge
4th April 2007, 17:07
Do you guys still have these profiles (h264)?
I was wanting to Recode some media with Nero and put it on my Box. Like a media center.
Seems like a much better alternative to Xvid.
Terranigma
4th April 2007, 23:43
I just did a 720 x 576 (704x288) test with an average bitrate ~1600 and my setup. I prefer star wars EP III startsequence as there is lots of action/explosions. It seems to play without any errors on the current official CVS XBMC
A couple of questions:
1. Are you using the stock ram, or did you upgrade?
2. Have you tried seeking forward/backwards or use a created bookmark, and if so, does xbmc crash?
3. What container/audio was used? .mp4, .mkv, .aac, .ac3, .mp3, etc...?
4. What's the clip's duration?
5. Lastly, what settings, profile, encoder did you use?
I've tried just about everything (cabac is a cpu killer). Other things that can cause problems, is using more than 1 reference frames, deblocking, and B-Pyramid. Until you show proof, I refuse to believe it.
:script:
Bigmango
5th April 2007, 02:16
Do you guys still have these profiles (h264)?
I was wanting to Recode some media with Nero and put it on my Box. Like a media center.
Seems like a much better alternative to Xvid.
The problem with the xbox mediacenter, is that the movies ca only be 2Gb max (you can't fill a dvd, and cutting a movie is not seamless).
So you can forget it if you want high quality movies with 5.1 DD/DTS.
brucevangeorge
5th April 2007, 06:31
The problem with the xbox mediacenter, is that the movies ca only be 2Gb max (you can't fill a dvd, and cutting a movie is not seamless).
I'm not sure what you mean by seamless... but I don't see the other issue.
2GB is plenty for a movie. It plays in SD resolution. Even 1Gb is still plenty for SD resolution encoded in MPEG4 AVC. And can't fill a DVD? So what? Just put two movies on instead or copy it to the hard drive. Its meant to store media. Pop in a 250GB drive (256 is max supported) and let it hoard your collection.
If you want better playback with huge files in 1080p, just wait for Xbox Media Center 360. I hear there are more developments in getting [360] to run unsigned code, like modchips do. Once that can of worms opens... you have a 3.2GHz HD player with XBMC. :eek:
Nero AVC HD Insane Quality and presets huraah! :p
brucevangeorge
5th April 2007, 06:33
I've tried just about everything (cabac is a cpu killer). Other things that can cause problems, is using more than 1 reference frames, deblocking, and B-Pyramid. Until you show proof, I refuse to believe it.
:script:
So if you disable all the advanced stuff... why bother with AVC? Won't a basic profile get the same quality as an Xvid at max settings?
gronne
5th April 2007, 16:16
Actually, there's a guy that made h264 playback faster on xbmc by using coreavc, and I may be wrong, but it certainly seemed like Betaboy wasn't keen on letting him release the code for it.
I really hope Betaboy is an arguable fellow, but we probably shouldn't get our hopes up for this awesome achievement.
Terranigma
5th April 2007, 16:20
So if you disable all the advanced stuff... why bother with AVC? Won't a basic profile get the same quality as an Xvid at max settings?
Nope. x264 would still achieve better compression than xvid, but what's the point if we can't use cabac, deblocking, b pyramid, or 11 reference frames?
Actually, there's a guy that made h264 playback faster on xbmc by using coreavc, and I may be wrong, but it certainly seemed like Betaboy wasn't keen on letting him release the code for it.
I really hope Betaboy is an arguable fellow, but we probably shouldn't get our hopes up for this awesome achievement.
aww, that sucks. :mad:
Edit:
You know, gronne, you gave me an idea. I could try editing the codecs.conf file to use the coreavc codec to do the decoding. ;)
Bigmango
5th April 2007, 18:25
Edit:
You know, gronne, you gave me an idea. I could try editing the codecs.conf file to use the coreavc codec to do the decoding. ;)
Waiting on your update on this :)
You know, gronne, you gave me an idea. I could try editing the codecs.conf file to use the coreavc codec to do the decoding. ;)
You'll probably want to take a look at this thread on mplayer-dev-eng: http://lists-archives.org/mplayer-dev-eng/15920-patch-coreavc-support-take-3.html
I'm not sure if all the patches are already in SVN, but at least they are available.
Terranigma
5th April 2007, 18:58
Well, gronne was right. I found a thread about this with a reply by the xbmc mplayer developer elupus Here (http://forum.doom9.org/showthread.php?p=955921#post955921)
Terranigma
5th April 2007, 20:49
Guys, we can all put in a helping hand with the development, progress of x264 playback via xbmc. Check out This (http://www.xboxmediacenter.com/forum/showpost.php?p=120167&postcount=1) page, download the latest .dll. and report issues you may experience with it. :devil:
I've tested it, and I have to say that i'm very pleased with the results. No dropped frames with cabac, support for seeking forward/backwards and using created bookmarks.
The settings i've tested were as follows (via x264):
.mkv container
.aac audio (vbr 160 average)
Res total = 1200 (720X480 & 768X432)
Bitrate = 1750
--High Profile
--Unrestricted
--Chroma M.E.
--M.E Range = 16
--Scene Change Sensitivity = 40
--M.E. Algorithm = Exhaustive
--Subpixel refinement = 7 RDO Level 2 (Slower)
--Trellis = 2 - Always
--Number Of Reference Frames = 5
--Cabac = Yes
--No Fast P-Skip
Quantization Matrix = none
--Macroblock Options = All checked
--Number Of B-frames = 3
--Adaptive B-Frames = Yes
--B-Pyramid = No
--RDO for B-Frames = Yes
--Weighted B-Predicition = Yes
--Bidirectional M.E. = Yes
--B-frame mode = Auto
--B-frame bias = 0
I'll do some more extensive tests for best quality possible. That means trying in-loop filtering, B-Pyramid, adding adaptive quantization, and increasing the number of reference frames. ;)
Edit: The forum seems backward like a Japanese Anime magazine (Newtype), so page 19 would be the first page and vice versa.
Terranigma
5th April 2007, 23:44
OK, after doing some extensive testing with the latest beta mplayer.dll, I came up with a hq-insane profile in the same vein as the hq-insane profile for megui. The latest beta .dll seems to be able to handle all megui options except In-Loop deblocking (Which is such a shame since this helps with quality a lot).
The profile basically uses the exact same settings as hq-insane , except with the exception of using Multi-hex search in favor of "Exhaustive" search, "Aq strength of 0.4", and an increased default bitrate of 1200 (as opposed to 1000). This's to hopefully make up for not being able to use in-loop deblocking. :rolleyes: If you wanna use in-loop deblocking, prepare for some dropped frames :D
The following was tested on a stocked modded xbox with 64k ram.
A 1200 res (720X480 or 768X432).
ABR AAC (125q equaled to a 192kbps cbr audio)
Matroska Container.
Grab the latest beta .dll Here (http://www.xboxmediacenter.com/forum/showpost.php?p=128198&postcount=158).
In the near future, i'm pretty sure we can expect to use in-loop deblocking though, just not at the present moment. :mad:
Bigmango
6th April 2007, 00:49
Awesome. :thanks:
With this new dll my --crf 18 encodes (720x400, 16:9, bitrate 1670) with AC3 now play smooth !!
I have also tried with stereo AAC, but then I get some dropped frames. But that's not important for me as I always keep AC3/DTS anyway.
Terranigma
6th April 2007, 00:59
Awesome. :thanks:
With this new dll my --crf 18 encodes (720x400, 16:9, bitrate 1670) with AC3 now play smooth !!
I have also tried with stereo AAC, but then I get some dropped frames. But that's not important for me as I always keep AC3/DTS anyway.
Well AC-3 requires less cpu than aac. I've tested the in-loop deblocking without any audio as well, and still experienced some dropped frames. Hopefully the attachment will get approved :)
Bigmango
6th April 2007, 01:15
Did some more testing.
Same HD 1080p source with 640k AC3.
Using the automkv HighQuality-Slow profile, I set avg bitrate to 1750 (x264 shows max bitrate is about 3900), 720x400 (due to 16:9); keeping original AC3 audio.
It plays smooth, I didn't notice any dropped frames !! :eek:
Of course the AC3 is passed through to my high end 6.1 receiver, so the xbox is not processing any sound (this is confirmed as I get no sound output on my TV).
Bigmango
6th April 2007, 02:05
Again:
Same HD 1080p source with 640k AC3.
This time with HighQuality-Insane, avg 1500 (x264 shows 3500 max), 720x400, original AC3 audio.
I did notice some "very few" dropped frames (still nice enough to watch). But picture quality was not as good as the above HighQualtiy-Slow with a 1750 bitrate.
So for now, without any manual settings tweaking, the "Constant Quality - crf 18" and "HighQuality-Slow @ 1750" are looking perfect to me.
(I have not tried HighQuality-Slowest/Slower).
PS: keep in mind that if you don't have an ac3/dts receiver and need to use aac sound you will get a lot of dropped frames...
Terranigma
6th April 2007, 03:11
Bigmango, are you saying you kept in-loop deblocking enabled and haven't experienced any dropped frames? If so, could you test HQ-Slowest with in-loop deblocking as well and see if you get any dropped frames? I honestly don't care for aac either. :)
Bigmango
6th April 2007, 03:26
Bigmango, are you saying you kept in-loop deblocking enabled and haven't experienced any dropped frames? If so, could you test HQ-Slowest with in-loop deblocking as well and see if you get any dropped frames? I honestly don't care for aac either. :)
I don't know if "in-loop deblocking" was in there or not (I don't have most of the advanced options in automkv).
I guess it was (as you said) in the HighQuality-Insane profile as I got some dropped frames at a 1500 bitrate, whereas I didn't seem to get dropped frames with "ConstantQuality --crf 18" and "HighQuality-Slow" at 1750.
I will try the "HQ-slowest" profile right away (but I don't know if this profile enables in loop deb by default ?).
PS: but as I said, the above 2 profiles were so good at 1750, I don't think anything else is needed :)
Bigmango
6th April 2007, 03:57
Ok, I have now tried "HighQuality-Slowest" @ 1600.
I almost didn't see any dropped frames (I played 3 minutes, only saw some dropped frames during a 1 second transition). Quality was good.
But I still think the best quality was with "ConstantQuality --crf 18" and "HighQuality-Slow" at 1750.
eLupus
6th April 2007, 12:59
could be worth disabling framedrop in mplayer.conf if you are playing on the edge of the xbox resources. it will then just get a short desync, then catchup instead of dropping frames.
foxyshadis
6th April 2007, 14:43
You should limit the maximum bitrate as well, although finding the maximum value by trial and error is always hard. (Unless you get lucky.) x264 has enough VBV options to control it. With proper vbv, you should be able to substantially increase bitrate, or use a crf without worry that rare peaks will degrade the viewing.
Terranigma
6th April 2007, 17:44
could be worth disabling framedrop in mplayer.conf if you are playing on the edge of the xbox resources. it will then just get a short desync, then catchup instead of dropping frames.
eLupus, I'll do that in the meantime. You think we can expect to use one of these x264 hq profiles without disabling in-loop deblocking? Very nice progress with the dev cvs by the way, keep up the good work :)
You should limit the maximum bitrate as well, although finding the maximum value by trial and error is always hard. (Unless you get lucky.) x264 has enough VBV options to control it. With proper vbv, you should be able to substantially increase bitrate, or use a crf without worry that rare peaks will degrade the viewing.
Will do. I'll set the max to 8000 since that's what mainconcept's h.264 codec recommends for DVD-RES. I'll let you know how it goes.
Terranigma
6th April 2007, 20:53
I came up with another profile for the xbox that's based on a median between the HQ-Slower & HQ-Slowest profile that uses in-loop deblocking. It's suited for ac-3 audio, as aac would just cause frames to drop all over the place. If you wanna use .aac, you'd have to disable trellis. With this profile, you won't experience any frame drops, but depending on the complexity of the scenes, you might find the audio desyncing for a frame or two throughout the entire playback process, which I think isn't really a big deal. :p
Max res tested was a res of 1200 (720X480 & 768X432).
Bigmango
6th April 2007, 21:11
Thx Terranigma, I am looking forward to trying this profile.
... but what's up with the attachment approvals on this forum, it takes ages. Do they have dude manually going through the files? :eek:
Terranigma
6th April 2007, 21:15
Do they have dude manually going through the files? :eek:
Well, they first have to check and make sure it's not spam or anything of that sort, and to see if it's worth approving =P
foxyshadis
7th April 2007, 04:01
Yeah, sorry about that, but it's safer.
It should probably be named PD-XboxHQ to follow MeGUI's conventions, but that's a minor point.
Terranigma
7th April 2007, 15:33
Yeah, sorry about that, but it's safer.
It should probably be named PD-XboxHQ to follow MeGUI's conventions, but that's a minor point.
Yes, that'd be better. Could you perhaps reup and edit my attachment with the renamed profile? Seems I'm unable to edit my attachments. :thanks: in advance
brucevangeorge
7th April 2007, 18:55
What kind of AAC encoder are you guys using? And can it support 5.1 surround? No point in making a media center without 5.1.
Or can 5.1 systems emulate surround from the stereo channels? That could be a good alternative and it saves processing power for the image instead.
I am currently using the free Nero cli encoder they released last year some time. Good quality AAC encoding. Has this been outdated by newer shinier encoders? If so, which one has the highest quality as of now?
brucevangeorge
7th April 2007, 18:59
Terranigma:
For the XBMC, does it have better rendering performace if you play it off the HD instead of DVD? Since HD has higher transfer rate than DVD. And HD doesn't need a read buffer to take up ram, does it?
brucevangeorge
7th April 2007, 19:01
Of course the AC3 is passed through to my high end 6.1 receiver, so the xbox is not processing any sound (this is confirmed as I get no sound output on my TV).
How did you manage that?
Doesn't the Xbox decode the audio as it reads it off the DVD? Then sends it to the receiver?
Terranigma
7th April 2007, 19:15
What kind of AAC encoder are you guys using? And can it support 5.1 surround? No point in making a media center without 5.1.
Or can 5.1 systems emulate surround from the stereo channels? That could be a good alternative and it saves processing power for the image instead.
I am currently using the free Nero cli encoder they released last year some time. Good quality AAC encoding. Has this been outdated by newer shinier encoders? If so, which one has the highest quality as of now?
Well I use Adobe Audition 2.0's aac encoder (via a plugin), I have no idea what Bigmango use. :p
Terranigma:
For the XBMC, does it have better rendering performace if you play it off the HD instead of DVD? Since HD has higher transfer rate than DVD. And HD doesn't need a read buffer to take up ram, does it?
It definately has better rendering performance if played off the HDD. I haven't tested using a data dvd burned as an iso as of yet. You'd probably experience lots of frame drops with the attached profile, since it already has troubles, as it is, just playing from the HDD.
Bigmango
7th April 2007, 22:00
What kind of AAC encoder are you guys using? And can it support 5.1 surround? No point in making a media center without 5.1.
Or can 5.1 systems emulate surround from the stereo channels? That could be a good alternative and it saves processing power for the image instead.
I am currently using the free Nero cli encoder they released last year some time. Good quality AAC encoding. Has this been outdated by newer shinier encoders? If so, which one has the highest quality as of now?
For the movies I watch on my TV (home theater) I always keep the original AC3/DTS tracks.
There are 2 reasons for this:
1. Better sound quality
2. Better video quality : the xbox is limited to 2Gb files, so the video can be compressed more as the xbox does not need to decode the sound (the digital sound goes directly to the receiver, the xbox does nothing). If you use aac you need to compress the video less to avoid the stuttering.
I use AAC for the movies I only play on the PC (or maybe if I had an HTPC) and for the movies I play on my mobile phone (smartphone).
For this I use Nero AAC whenever I can. Sometimes, I use avidemux, which supports only FAAC. The FAAC quality is also very good, but only LC is supported at the moment.
As for 5.1 sound:
- yes a receiver can emulate stereo sound in 5.1 (of course it's not as good but still better than stereo ). If you select 5.1 in the xbox settings, the xbox will automatically remap all the sounds to 5.1 (stereo, mono, whatever will be sent to the 6 speakers).
- yes you can encode your 5.1 AC3/DTS into 5.1 AAC. But this is not really worth it with the xbox as this would need too much decoding power = a lot of stuttering or lower video quality if you don't want the stuttering.
The bottom line is: if you have a receiver and want the make a media center with your xbox, keep your original AC3/DTS tracks.
Bigmango
7th April 2007, 22:04
Terranigma:
For the XBMC, does it have better rendering performace if you play it off the HD instead of DVD? Since HD has higher transfer rate than DVD. And HD doesn't need a read buffer to take up ram, does it?
I burn everything to DVD and play it from there. I haven't seen a difference when playing form HD.
As for the ram, the buffering is setup in the mplayer settings, so if you don't change it there I believe it won't change anything.
Yes the xbox does not have much ram, but I believe the play back is more limited by the CPU.
Bigmango
7th April 2007, 22:08
How did you manage that?
Doesn't the Xbox decode the audio as it reads it off the DVD? Then sends it to the receiver?
Nope. If your sound is AC3/DTS it goes straight to the receiver, the xbox does not decode it (select 5.1/AC3 sound option in the xbox sound settings).
To do that you put your video files with the AC3/DTS sound tracks into an MKV container.
MKV is great; you can keep all the sound and subtitles tracks when you do a DVD backup.
Terranigma
7th April 2007, 23:33
I burn everything to DVD and play it from there. I haven't seen a difference when playing form HD.
As for the ram, the buffering is setup in the mplayer settings, so if you don't change it there I believe it won't change anything.
Yes the xbox does not have much ram, but I believe the play back is more limited by the CPU.
Bigmango, that' awesome. For some reason, I just would'nt of expected xbmc to render h.264 files correctly via DVD. :)
Terranigma
13th April 2007, 20:32
This's the last profile I'll be doing for the xbox. This's the highest quality profile setting xbmc can handle at present time (that's why it's labeled as insane). I took a cue from foxyshadis with the name to match the other xbox profiles for megui.
It'd only work with x264 compiles that uses adaptive quantization (like Cef's or Sharktooth's build).
It's geared toward videos with DVD Resolutions and NTSC Film framerates. You'll only experience framedrops when the bitrate reach around 2300 or so due to the cpu used by in-loop. Enjoy! :cool:
ultrabrutal
7th August 2007, 07:41
...the xbox is limited to 2Gb files...
That's not true. FAT-X is limited to 4 GB files
TheRyuu
7th August 2007, 07:56
Just to let you guys know there is a better mplayer build.
There has been an ongoing thread over at the XBMC forums that I created about compiling a faster mplayer with different GCC parameters. I initially found out that using -Os was about 5-10% faster sometimes then using the default -O3.
Later on, through the help of elupus and other members that splitting the optimizations using -Os for libav stuff and using -O2 for everything else was the best route. It primarily speeds up AVC/h264. Others really don't gain that much ground but they do have a slight speed up. The newer one is noticably faster then the old(er) mplayer.
You can get that mplayer build here:
fast(er) mplayer GCC 4.1.2 (http://www.esnips.com/doc/7fbddd8d-c738-4668-86a1-e0121f3f0708/mplayer_elupus_4.1.2_fixed)
The GCC 3.4.4 compile was slightly faster, however using GCC 3.4.x gave libavcodec compile errors so we had to switch to the newer GCC 4.2.1. Later on we found out that GCC 4.2.1 has a "strict aliasing bug", so elupus used GCC 4.1.2 instead. And thats pretty much were it's at. Getting the most out of a 733mhz P3.
You can find the thread over at XBMC here. (http://www.xboxmediacenter.com/forum/showthread.php?t=27243)
Bigmango
7th August 2007, 08:25
That's not true. FAT-X is limited to 4 GB files
We are talking about DVD here.
So yes, the xbox is limited to 2Gb.
If I want to make quality movie backups (i.ex most of my -crf 18 backups for longer movies come out at more than 2 Gb) I can't put the movie on a DVD and play it on the xbox. You could split the file, but this is messing arround, especially since I am keeping DTS audio whenever I can).
If I split the file I can't be sure that my file will work properly with a certain video processing tool if I want to work with the file in the future (i.ex make a compiant blu-ray or compress it into another format). The problem is that many tools seem to have an audio/video sync problem. Of course sometimes it works with some tools... the problem is that sometimes it doesnt...
So to sum it up, making a quality "backup" (2+Gb file on DVD) and playing it on the xbox is messy.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.