Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 ASP

Reply
 
Thread Tools Display Modes
Old 6th June 2004, 23:22   #1  |  Link
adoniscik
Registered User
 
Join Date: Dec 2003
Location: Brookline, MA
Posts: 76
How fast a CPU is required for postprocessing?

I was tearing my hair out trying to solve the jerkiness in my xvid 1.0 videos. I came across a thread about how the decoder gives up until the next b-frame if the computer can not keep up. I monitored the CPU usage with task manager, and sure enough, my 1.9GHz P4 was simply not fast enough. There was a CPU usage drop concomitant with the frame drops.

The test video is a 29.97fps, 1.5Mbps two pass encode with default B-frame options and 128Kbps Vorbis audio. I discovered that no processing consumes 40% CPU usage, whereas Y and UV deblocking require an additional 40% and 25% respectively. Either of these is enough to cause freezing.

Can I expect some optimization in the next build, or is my computer too slow?
adoniscik is offline   Reply With Quote
Old 6th June 2004, 23:34   #2  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,180
just use ffdshow as a post processor, its VERY optimized for speed.
*.mp4 guy is offline   Reply With Quote
Old 7th June 2004, 08:30   #3  |  Link
jimmy basushi
Registered User
 
Join Date: Jan 2004
Location: russia -> australia
Posts: 143
adoniscik - the xvid devels have said a few times that thier decoder wont be optimised for speed if ever, or at least until more pressing matters are fixed (the crew have even more evil ideas to improve thier quality). but until then, check out ffdshow. it will decode qpel with full pp on my athlon 1200 system, so yours should be able to do it simply. just make sure under misc you select xvid as the idct.
jimmy basushi is offline   Reply With Quote
Old 8th June 2004, 10:31   #4  |  Link
Joe Fenton
Registered User
 
Join Date: Jul 2003
Location: In a house.
Posts: 666
Quote:
Originally posted by *.mp4 guy
just use ffdshow as a post processor, its VERY optimized for speed.
People keep saying that, but my tests on a Pentium II 350MHz, a Pentium II 400MHz, an Athlon XP 1600+, and an Opteron 240 tell me something different. What I found is that ffdshow is the slowest decoder/post-processor out, and is particularly bad on slower machines. NEVER use ffdshow on P2's. My guess is that it's "VERY optimized for speed" on fast P4's. If you don't have a fast P4, don't bother.
Joe Fenton is offline   Reply With Quote
Old 8th June 2004, 10:53   #5  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,180
I Have an Athlon Xp 2800+ and it can decode xvid with qpel@ ntsc dvd frame size and rate, then have enough extra power to do all three post processing methods, some convolution 3d, 3 pass high quality awarpsharp and some other stuff. an this is with the overhead of vorbis audio. i have never managed to get it to decode slowly on my system unless i use L3 or higher spb deblocking on a dvd res video with qpel...

maybe you arent using the latest build?

or maybe ffdshow just really stinks on slow procs?

well anyway, maybe i dont know what im talking about, but ffdshow is definately faster than xvids decoder no matter what the case is.
*.mp4 guy is offline   Reply With Quote
Old 8th June 2004, 11:30   #6  |  Link
jon.schaffer
Eternally Junior Member
 
jon.schaffer's Avatar
 
Join Date: Apr 2004
Location: France
Posts: 229
We are not in the so-huge-FFDShow-thread, but - for adoniscik - I would like to advise him to use FFDShow.
It's the only filter/decoder that allow me to play back my MPEG4 stuff on my P3 (700MHz)... whereas the XviD decoder (nor the DivX decoder) cannot. It even allows me to use some PP (deblocking, deringing) on some movies and AddNoise on nearly all movies.

I test it on my P2 (450MHz)... and FFDShow definitively wins the contest: PP is not usable, but playback is still perfect!

So, I think FFDShow must be recommended.
Moreover, latest builds present a P3-optimized version...

http://athos.leffe.dnsalias.com/


Jon
__________________
"Methinks it is like a weasel" (Hamlet in Hamlet, by Shakespeare)
jon.schaffer is offline   Reply With Quote
Old 9th June 2004, 01:02   #7  |  Link
Joe Fenton
Registered User
 
Join Date: Jul 2003
Location: In a house.
Posts: 666
If the movie is coded in a codec that only ffdshow handles, then yes, ffdshow is the way to go. However, with PP turned off while on a PII system, DivX, XviD, and 3ivX all play mpeg4 streams better than ffdshow. You really can't use PP unless you are on a P3 or better. On slower systems, ffdshow really stutters badly when it hits higher bitrate sections. DivX 5.x does the best on slower systems, followed by 3ivX, then XviD. I just use the free DivX codec for playback on my slower systems. I have ffdshow for other codecs, but don't use it for mpeg4 streams unless it's something DivX chokes on.

It seems to me that people claiming ffdshow works great on slower systems are probably playing low bitrate streams. Most of my streams are about 1100kbps and highly variable (up to 4000kbps). While DivX handles these just fine on slower systems, ffdshow can be almost unwatchable. If all your streams are low bitrate (<900kbps with no high bitrate sections), ffdshow may be suitable for you. It's not for me.
Joe Fenton is offline   Reply With Quote
Old 9th June 2004, 01:58   #8  |  Link
alchemy
Registered User
 
alchemy's Avatar
 
Join Date: Aug 2002
Posts: 18
It's not always about used codec, I ran in serious speed drop,while using different players on slow machines (like my old P3-450)
I remember having the right player was the key to good speed.
For example bsplayer (pre 1.x) with overlay Mode-1 worked like magic, when media player 6.4 coun't handle overlay by it self.

I Know that ffdshow is already uses it's own overlays, just make sure they are on (by default)

@adoniscik : What kind of material u r using? (Resolution)
and also try reclock - might be the trick for you
alchemy is offline   Reply With Quote
Old 9th June 2004, 05:13   #9  |  Link
adoniscik
Registered User
 
Join Date: Dec 2003
Location: Brookline, MA
Posts: 76
It is a DV capture, so DVD resolution. I think I will try ffdshow with the next update.
adoniscik is offline   Reply With Quote
Old 9th June 2004, 06:40   #10  |  Link
Poutnik
Useless idea generator
 
Poutnik's Avatar
 
Join Date: Apr 2004
Location: Europe, Czech Republic, Brno
Posts: 216
Re: How fast a CPU is required for postprocessing?

I have slow PC with Celeron 600 / Win98SE/ Nvidia TNT2/M64/DX9.0b.
I do capturing/playing 384*288*25fps video
with cbr mp3 56k stereo / 32k mono( not encoded in realtime...)

Using XviD 1.0.0final decoder ( xvid.ax )
with both deblocking on takes about 60% of CPU time.
__________________
C2D E4700 2.6GHz/ Intel GMA 3100/ 3GB RAM/
DTV Leadtek DONGLE GOLD USB2 / Leadtek TV2000 XP Expert / Vista64 Premium SP2
Poutnik is offline   Reply With Quote
Old 9th June 2004, 07:22   #11  |  Link
Neo Neko
Registered User
 
Neo Neko's Avatar
 
Join Date: Mar 2002
Location: Kansas City, Missouri
Posts: 1,812
Quote:
Originally posted by Joe Fenton
People keep saying that, but my tests on a Pentium II 350MHz, a Pentium II 400MHz, an Athlon XP 1600+, and an Opteron 240 tell me something different. What I found is that ffdshow is the slowest decoder/post-processor out, and is particularly bad on slower machines.
Not true. What version of ffdshow are you using? Who compiled it? It can make a difference as big as night and day. There have been a string of rather poorly optimised ffdshow compiles in the past. It started just as the first major non-milan releases started showing up. But that is to be expected from people who are novices when dealing with code designed for GCC in an MSVC environment. It has been over two years. Milan should take a short break from adding new features and release a new stable compile.

Quote:
Originally posted by Joe Fenton
NEVER use ffdshow on P2's. My guess is that it's "VERY optimized for speed" on fast P4's. If you don't have a fast P4, don't bother.
Actually ffmpeg/ffdshow in generall is hardly optimised for pentium 4 at all IIRC. But it does have extensive MMX1/2 and SSE optimizations for the Pentium I/II/III machines. And if you are going to be playing videos on a system that slow might I suggest you try something like geexbox which uses full on ffmpeg in a nice gcc POSIX environment that devotes the most resources possible on your system to video playback. You will get better performance than would be possible under Windows although you would not be able to multitask on the system while it is playing.
__________________
Opensource will not take over the world. But it will sure improve the lives of most of it!
_______________________________________________
Inkscape - Scallable Vector Graphics for everyone.
The GIMP - Free raster graphics and photo editing software.
Planeshift - Free 3D MMORPG. Cause everyone needs some fun.
Neo Neko is offline   Reply With Quote
Old 9th June 2004, 19:00   #12  |  Link
unmei
frying subs
 
unmei's Avatar
 
Join Date: Jan 2003
Location: ch-2500
Posts: 894
besides the player for FFDShow it might also depend on the colorspace used. At least that is my observation on a pen^3 /600mhz with MPC and a Matrox graphics card. I have to disable the RGB32 colorspace from the "supported colorspaces". This way it uses YV12, if RGB32 were allowed it would use it despite the framerate drops from 25 to about 4-6 fps in RGB32. With YV12 i can play "normal" xvid encodes on this system just fine ..but i admit it can't play encodes where i played with B-frames, added Q-pel and encode in DVD resolution ..but then again Xvid and DivX don't even play the "normal" encodes at 25fps..
(i'm pretty convinced the behaviour stems from the matrox, but i don't care much since the 'workaround' solves it)
__________________
U96 project -nyo

Last edited by unmei; 9th June 2004 at 19:04.
unmei is offline   Reply With Quote
Old 10th June 2004, 05:07   #13  |  Link
alchemy
Registered User
 
alchemy's Avatar
 
Join Date: Aug 2002
Posts: 18
@unmei : Just a random note, as ex-matrox owner - did you tryed DivXG400 soft ?
The thing with G400 and not only, is some videos with resolution dither than multiplies of 16 are kinda slow on those cards, therefore this soft corrects the problem.

@adoniscik
In my personal expirience the only thing that put my XP-2000+ to it's knees was alpha ver decoder of H.264 on full dvd resolution, but never on ANY XVid/Divx Material,including 1024x468 (some HD Screener)

I don't think that P4-1.9Ghz should be slow on any DVD/DV encoded stuff....

Good luck anyway...
alchemy is offline   Reply With Quote
Old 12th June 2004, 10:45   #14  |  Link
plonk420
amd & h.264 fanboy
 
plonk420's Avatar
 
Join Date: Jun 2002
Location: NTSC
Posts: 375
i ran anime just fine on a P2-333. had to turn post processing down to notch 1 or 2, but it played just fine.
plonk420 is offline   Reply With Quote
Old 12th June 2004, 22:05   #15  |  Link
lordadmira
Registered User
 
lordadmira's Avatar
 
Join Date: Mar 2004
Location: Zinzinnati
Posts: 281
Quote:
Originally posted by unmei
I have to disable the RGB32 colorspace from the "supported colorspaces". This way it uses YV12, if RGB32 were allowed it would use it despite the framerate drops
Use YUY2 or something, YV12 throws away a lot of color information.
__________________
Anata wa baka da! REPENT!
lordadmira is offline   Reply With Quote
Old 12th June 2004, 23:18   #16  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,403
Quote:
Originally posted by lordadmira
Use YUY2 or something, YV12 throws away a lot of color information.
You do know that XviD uses YV12 at the encoding stage which means any color information YV12 throws away is already thrown away when encoding?

Converting from YV12 back to YUY2 after decoding can't bring it back, either - so if your graphics card supports a YV12 overlay, why not use it?

np: Autechre - Parhelic Triangle (Confield)
Leak is offline   Reply With Quote
Old 13th June 2004, 03:21   #17  |  Link
lordadmira
Registered User
 
lordadmira's Avatar
 
Join Date: Mar 2004
Location: Zinzinnati
Posts: 281
AFAIK it uses whatever colorspace is fed to it.

PS: YUY2 is only half again better than YV12. There doesn't seem to be a short name for 4:4:4 colorspace.
__________________
Anata wa baka da! REPENT!

Last edited by lordadmira; 13th June 2004 at 04:44.
lordadmira is offline   Reply With Quote
Old 13th June 2004, 07:24   #18  |  Link
celtic_druid
Registered User
 
celtic_druid's Avatar
 
Join Date: Oct 2001
Location: Melbourne, Australia
Posts: 2,175
XviD always uses YV12 no matter what the input colourspace.
celtic_druid is offline   Reply With Quote
Old 13th June 2004, 10:49   #19  |  Link
Leak
ffdshow/AviSynth wrangler
 
Leak's Avatar
 
Join Date: Feb 2003
Location: Austria
Posts: 2,403
Quote:
Originally posted by celtic_druid
XviD always uses YV12 no matter what the input colourspace.
Yeah, it wouldn't be MPEG-4 if it didn't use YV12 - that's what the standard demands, so all other colorspaces will be converted to YV12 internally by XviD...

np: Push Button Objects - Plays Takeshi's Gutta Percha (House Of Distraction comp.)
Leak is offline   Reply With Quote
Old 13th June 2004, 18:15   #20  |  Link
kassandro
Registered User
 
Join Date: May 2003
Location: Germany
Posts: 503
I have installed xvid-1.0.1 after ffdshow. But now I can't disable the xvid decoder, which is too slow on my 1.3GHZ P3 to use it with deblocking. Do I have to reinstall ffdshow?
Sorry, I tried to configure ffdshow from virtualdub and that didn't work. Enabling ffdshow with its own configuration program worked.

Last edited by kassandro; 13th June 2004 at 18:22.
kassandro is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:22.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.