Log in

View Full Version : X264? How to encode for low overhead playback?


trbarry
24th April 2005, 18:33
I've recently started playing with X264 a bit just using Vdubmod. I think it's getting good enough that maybe I could start doing some 720p HD caps in it.

But I have only a 2.4 Ghz P4 and probably won't build another box until this summer. Meanwhile, X264 is a bit more taxing to play.

So, let's assume I'm willing to sacrifice some compression and just use a higher bit rate and try to get very good quality with lower playback overhead at 1280x720. Are some encoder options well suited for this?

I have tried turning off b-frames, Cabac, and the encoder loop processing. All seem to help but I'm really just flailing around in the dark here. A search didn't seem to show anyone worrying about this much.

I'm using a recent ffdshow for playback.

I'd be interested in anyone's 720p encoding & playback X264/AVC experiences. Anybody studied this sort of thing and have any suggestions?

Or do any video cards have special accel yet that helps?

- Tom

Sharktooth
24th April 2005, 20:06
Well, lowering the reference frames and disabling the wieghted prediction should help too.

trbarry
24th April 2005, 20:58
Of course at some point I'll have it so crippled I'd be better off sticking with Xvid. But I was curious and X264 will likely continue to improve rapidly at the same time as machines speed up. So it seemed worth trying.

- Tom

video
24th April 2005, 21:00
most playback speed help comes from proper DXVA/VGA HW support, if there is any. turning off encoder inloop depblocking doesn't help so much for playback. turning off b-frmaes or even reducing # of ref frames, ie. how many P or I frames is looked ahead or behind for a b-frame should help. turning off cabac/cavlc arith coding should speed up decoding, of course. however my axp2700+/r9700pro box plays back 720p w/o frame drop, so a 2.4GHz P4 should do, too

trbarry
25th April 2005, 03:23
so a 2.4GHz P4 should do, too

Mine is my dev machine that was an early 1.7 Ghz P4 with rdram, probably a lower memory speed than current. It has an old Radeon LE in it so I don't know what sort of DXVA support it has.

Generally I just need to build a new one but I'm still going back and forth about building a Linux box and thinking about multiple cpu's, watching Opteron prices.

But in the mean time I wanted to see if there was anything playable in 720p (or even 1440x800) with X264 that could match Xvid, which plays fine on that machine.

I haven't tried all the above suggestions yet.

- Tom

PS - can ffdshow use DXVA with X264?

Sergey A. Sablin
25th April 2005, 11:12
Originally posted by trbarry
Mine is my dev machine that was an early 1.7 Ghz P4 with rdram, probably a lower memory speed than current. It has an old Radeon LE in it so I don't know what sort of DXVA support it has.

Generally I just need to build a new one but I'm still going back and forth about building a Linux box and thinking about multiple cpu's, watching Opteron prices.

But in the mean time I wanted to see if there was anything playable in 720p (or even 1440x800) with X264 that could match Xvid, which plays fine on that machine.

I haven't tried all the above suggestions yet.

- Tom

PS - can ffdshow use DXVA with X264?

Tom,

I don't know who tells you about DXVA, but AFAIK there is no any available acceleration for H.264/AVC on any video card at all.
There are only mpeg-2/4, wm9 accelerations like iDCT, MC and so on.
So what you need to playback H.264 HD streams is only powerful CPU (HT and dual CPU/core also usefull in some cases) and if you are using multiple reference frames then high speed memory also usefull.
My prescott 2.6 GHz plays full featured (Main profile, CABAC, 5 refs, MC block downto 8x8, deblock and so on) 720p@30Hz at about 5 mbit fine.

Ark
25th April 2005, 11:29
I suggest Mplayer, which usually suck up less resources.

Give it a try, and see how it does.

Stacey Melissa
26th April 2005, 05:14
The biggest factors I've noticed for playback requirements with x264 are the number of reference frames (2 is my normal setting), and the bitrate. High max bitrates cause playback issues on my Athlon XP 1800. Ceterus paribus, the --qcomp and --rcbuf parameters positively correlate with max bitrate. Using --no-chroma-me also seems to have a significant positive effect on playback performance, and the quality is better, too, IMO.

I haven't tried any HD encodes with x264. The above is just what has worked for me with my full-size anamorphic encodes from NTSC widescreen DVD material, usually at bitrates between 1600 and 2000 kbps.

akupenguin
26th April 2005, 08:39
Originally posted by Stacey Melissa
The biggest factors I've noticed for playback requirements with x264 are the number of reference frames (2 is my normal setting), and the bitrate. High max bitrates cause playback issues on my Athlon XP 1800. Ceterus paribus, the --qcomp and --rcbuf parameters positively correlate with max bitrate. Using --no-chroma-me also seems to have a significant positive effect on playback performance, and the quality is better, too, IMO.
Bitrate, yes. (vbv maxrate is on the todo list.)
Reference frames: I see little change in speed (Barton 2500), but I can believe that cache size would make a big difference here.
Chroma-ME: no way! It doesn't affect the features used in the stream, nor the frequency of usage. It just slightly modifies the MVs used in P-frames, and the comparison between P- and I- macroblocks.

trbarry
28th April 2005, 21:04
Bitrate, yes. (vbv maxrate is on the todo list.)

Yes. Not having a workable vbv max rate was always one of my issues with older version of Xvid on previous slower machines. It caused me to always use CBR just so HD encodings would not stutter on the active parts.

- Tom

Mug Funky
2nd May 2005, 11:07
i second the use of mplayer, if you can (you may be outputting to teev or something else, and requiring directshow i suppose).

typically things that would drop frames and play bad in ffdshow/MPC will play flawlessly at 50% CPU usage with mplayer. it's quite stunning.

whether it will help on HD AVC i don't know, but it's worth a try (my p3 733 wont even play SD AVC without drops, even with mplayer).

sjchmura
2nd May 2005, 19:39
Btw - in terms of speed of encoding and quality can anyone tell the difference between

Best vs. Extra?

I have gone frame by from from a good 1080i source ->720p 23.967 and simply cannot see the difference.

Only thing XVID does better is the black to dark grey. I still see (with FFDSHOW even) alot of macroblocking on fade-outs.

720p@3mbps seems really really good. It takes FOREVER to encode but is worth the wait

sjchmura
3rd May 2005, 02:28
Trbarry (long time no talk)

Which filter are you using for playback? Can I suggest the newest FFDshow build? I am shocked at the differences in CPU time. On my 3ghz I can encode in teh background and PLAY 720p.

trbarry
22nd May 2005, 13:04
Trbarry (long time no talk)

Which filter are you using for playback? Can I suggest the newest FFDshow build? I am shocked at the differences in CPU time. On my 3ghz I can encode in teh background and PLAY 720p.

sjchmura -

Yes, it's been awhile. And yes, I'm finally running XP again on that machine. ;)

I'm running an ffdshow from 2005-04-06. I don't know where the release numbers are shown.

But after some initial testing I decided to wait on X264 until I can build a faster box. I think I won't be happy unless I can encode and play at least 720p.

So I guess I'd sort of abandoned this thread. Sorry for the late reply.

- Tom

SeeMoreDigital
22nd May 2005, 13:30
Originally posted by trbarry
I'm running an ffdshow from 2005-04-06. I don't know where the release numbers are shown. You can find this out in VirtualDubMod, here: -

http://img270.echo.cx/img270/9269/buildversion1gr.gif


Cheers

Sharktooth
22nd May 2005, 13:45
My build shows also the SVN revision number betwen Core and build date.

SeeMoreDigital
22nd May 2005, 13:52
Originally posted by Sharktooth
My build shows also the SVN revision number betwen Core and build date. Where are your builds again?


Cheers

Sharktooth
22nd May 2005, 14:55
the first thread in this forum...
it's a sticky:P
http://forum.doom9.org/showthread.php?s=&threadid=89979

SeeMoreDigital
22nd May 2005, 15:18
...And it can't be stated often enough ;)

By-the-way, any possibility of somebody adding PAR and DAR encoding/signalling to the GUI?

From what bond has said, it's an available option when encoding via CLI!


Cheers

Sharktooth
22nd May 2005, 15:29
Im working on VFW GUI but i've not so much free time to do it, debug it and test it.

SeeMoreDigital
22nd May 2005, 16:10
Originally posted by Sharktooth
Im working on VFW GUI but i've not so much free time to do it, debug it and test it. I wish I could help :(

yidaki
5th November 2005, 12:54
Btw - in terms of speed of encoding and quality can anyone tell the difference between

Best vs. Extra?

I have gone frame by from from a good 1080i source ->720p 23.967 and simply cannot see the difference.
[_ _ _]hmm, what does that mean.
Difference in speed of encoding or quality?
As far as quality is concerned, you can tell a difference as long as you play back on a HDTV. (or HD screen/projector)
But the speed of the encoding process could very well be the same if you're unlucky :D