PDA

View Full Version : Recording makes the Winuae superslow


MRZ
12 March 2002, 12:14
Hello. my english is not the best, but ill try, need to fix this problem u know ;)

When im recording in 640*480 with sound the emulator get almost 1000% slower, thats realy bad. I cant play and the OS3.1 takes 1 minutes to load. I can record with sound, thats workes great. Without recording with picture everything works perfekt.

I have an XP1600+, 256DDR, Radeon 8500.

Hope u can help me.

Thx

TikTok
12 March 2002, 13:47
What codec are you using? I guess some slow down is inevitable since your PC has to encode a hell of a lot of data each second and write it to your HD.

MRZ
12 March 2002, 13:55
Well... Correct me if im wrong...

I have DivX 5 pro installed and when i start WINAUE and select "output settings" I can only select "Cinepak Codec from Radius" as a Video codec. Is this right or do i need something else?

/MRZ

oldpx
12 March 2002, 14:09
No matter what codec you use, it will get slow. Think about it, you are compressing and encoding an avi file while another heavy task, an amiga emulator is running so even your XP1600 may not do it fast enough. Cinepak compression is ok, you may choose divx but it's a matter of preference and divx tends to be slower than cinepak.

MRZ
12 March 2002, 14:39
Do it work on a XP 2000+?

I just recorded a demo, its run in normal speed when u run the .AVI, lucky... :)

Well, now i can just record demos. To record a 3min demo i have to wait 30min, but thats ok, im just lucky they added this cool future. :)

oldpx
12 March 2002, 15:28
Do it work on a XP 2000+?

It will be faster than it currently is, but full speed is another thing. Just because a cpu is the fastest one on the market doesn't mean that it is powerful enough to do anything at full speed.

filobeddo
12 March 2002, 16:47
As soon as I saw the record feature I knew it would cause massive side effect to the speed of WinUAE.

What I would really like to see is an option/toggle so that you can start recording when you need, rather than from boot-up.

I think mostly people will want to record a particular thing in WinUAE, rather than the whole session. This would help the speed thing a little.
Also, how about recording to uncompressed frames. The AVI will be huge of course, but as long as you have the space you can encode after (always better).
Since this ditches the real-time encoding it should make quite a difference. No?

oldpx
12 March 2002, 16:50
I think mostly people will want to record a particular thing in WinUAE, rather than the whole session. This would help the speed thing a little.
Yes
Since this ditches the real-time encoding it should make quite a difference. No?
Yes :)

Ian
12 March 2002, 18:41
The problem doesn't lie with your CPU, it lies with your Hard Drive, my hard drive is a 7200 rpm affair, and with the DivX bundle there's a test util that tells you how fast your PC can write the frames to your disk, mine can do around 15 (According to the util) and between 15 and 20 for real.

Changing your processor won't really make any difference.

jmmijo
12 March 2002, 19:21
Yes Ian is correct in this matter. Remember that most ATA sub-systems can only write so much data per second, they can usually read much faster then they can write. However you can also speed things up using either SCSI or IDE RAID controllers. Promise makes a really nice one in their FastTrak series for ATA/IDE hard drives, preferrably 7200 RPM drives or you can go all out and get their expensive RAID 5 controller. Also note that Adaptec makes the best SCSI RAID cards and there is no shortage of very fast SCSI hard drives, like the Seagate 15K Barracuda series ;)

These are what the big rendering outfits use, just very large uber arrays :laughing

§ane
12 March 2002, 19:29
@Ian: You couldn't be more wrong, 2 minutes worth of DivX video would equal to what, say 10MB, now surely todays hard drives could read/write a mere 10MB in less than a second (mine can and it's only 5200rpm), compared to the time it would take to actually encode the 2 minutes worth of DivX, well you're talking a long time.

However if you are recording full uncompressed frames that is different, only then is it limited by the speed of the hard drive. I think what that DivX util is measuring is the overall encoding performance you can expect from your system, although I haven't tried it, my system can encode DivX at about the same speed 10 - 20 FPS and the output is being written directly to my RAM drive where the read/write speed is not an issue.

Encoding video is extremely CPU intensive, and WinUAE is already providing a lot of over head, the emulation itself at times can account for up to 100% of the CPU work load, leaving very little for other processing.

The encoding process involves iterating through each and every pixel for every single frame over and over performing color conversion, compression and numerous other computations.

oldpx
12 March 2002, 19:50
Sane is right as usual :)
How can a hard drive effect the emulation? :rolleyes

In ancient times, you needed to have a very fast SCSI hard drive to be able to write uncompressed data at full speed but modern 7200RPM IDE hard drives can overcome these kind of problems that's all.

TikTok
12 March 2002, 22:26
It might help a little if you used one HD for WinUAE (for the hardfile or directory you are using as a HD), and a separate one for the video output. That would hopefully reduce the thrashing a little which might slow things down. Of course, you need two physical HDs for this, not just two separate partitions :D.

Ian
13 March 2002, 00:33
@§ane

If what you say is correct, I should get more speed from using your old 0.8.17r3 version with AVI support, that only takes up on average about 11% (Get as high as 40% in parts, but mostly about 10 or less) of my CPU time, whereas the 0.8.21r* takes up an average of about 65% without recording.

My system should have far more time to encode the DivX avi, but I get exactly the same 21 fps I get when I use the latest WinUAE, which use far more of the processor time anyway.

Even though the Codec is getting 50% (Roughly) more CPU time with your 0.8.17r3 version, I still get exactly the same fps when recording. I'm not doubting what you say is right, I just seems very strange to me (Someone who knows nothing about encoding and the problems it causes)

It also make no difference if I choose Fastest mode for encoding, as opposed to the higher quailty slowest mode I still get the same fps.

Bearing in mind that I don't really know about encoding, I hope you can explain some of this to me:) (In a nice non-argumentative way;))

@Tiktok

I have 2 hard drives, and I can say it makes no difference at all on my system.

I get 21 fps using my system HD and the same using my other HD.

@Burseg

I never said it effected emulation, I said it effects recording speed;) And the hard drive I use to save the output on is a 7200 rpm DMA 100 IDE Drive, so obviously they ain't good enough to record at full speed.

BTW, I get 19 fps when writing full uncompressed frames.

MRZ
13 March 2002, 00:39
WOW, I MADE A RECORD IN "REALTIME" WITH NO LATANCY!!!!!!

It was only 10*10 pixels, but it was in realtime :)

If someone know why they realeased a record future an no one can use it, that was kinda strange...

oldpx
13 March 2002, 00:49
Your hard drive is capable of such a task Ian. But if you are getting 19 frames uncompressed then a faster harddrive can help. A friend of mine who is into video stuff keeps saying the increased speed of IDE drives is not enough to get as much performance as SCSI ones because of different architecture.

The data is first captured as a single frame and then encoded and compressed with given options by the cpu only then it is written to your hard drive, after that the following frame is processed the same way.

With compression, the resulting file will be quite smaller than an uncompressed one therefore less data is needed to be written to the hard drive. Let's say I am capturing a five second long avi clip with divx compression, it will fit into a tiny file.A few hundred kilobytes will be written to your hard drive so in your theory this can take only a second and there mustn't be any delay. However in reality, it will still take longer than five seconds to capture the video because your computer needs time for the cpu to process the compression task, hard drive speed is secondary to that.

I'm not sure about this for I am not into programming but logically, as WinUAE generates a frame, the computer doesn't let it generate another one until it's compression is finished so that seems to be the reason of the slowdown to me.

RetroMan
13 March 2002, 00:51
Well, I can still play CD³² games fullspeed while recording :p

Chuckles
13 March 2002, 00:52
Originally posted by MRZ

If someone know why they realeased a record future an no one can use it, that was kinda strange...

Well, I think the reason they released it with a record feature even though it won't run full speed while recording is simply that there are a number of people who wanted to be able to record demos, etc., and who don't care that it can't be done in realtime. If you simply want to capture your favorite demo as an AVI, it doesn't much matter that the process of recording is slow just as long as the resulting AVI runs at the proper speed. Look at the bright side. If you were never able to beat "Game X" because your reflexes were too slow, now you no longer have THAT excuse anymore. ;)

oldpx
13 March 2002, 00:56
There are many different compresssors out there with different dis/advantages some may be faster and others may be slower. That mostly depends on the image quality.

Chuckles
13 March 2002, 01:08
Originally posted by Burseg
I'm not sure about this for I am not into programming but logically, as WinUAE generates a frame, the computer doesn't let it generate another one until it's compression is finished so that seems to be the reason of the slowdown to me.

That all sounds reasonable to me. I am a programmer, and though I'm not familiar with the internals of WinUAE, it seems logical to me that the memory that WinUAE uses to hold each frame can't be re-used for the next frame until that frame has been at least copied into a buffer somewhere to be flushed out to disk. If you were running at 50 - 60 fps, it seems to me that would be an awful lot of memory that would be required in order to hold even 1 seconds worth of data. If you think about how long it should take to copy each frame to a buffer, compress it and flush it out to disk, I don't think it's surprising at all that there would be a slowdown. If you could simply copy all the frames to a buffer and do the compression and writing to disk later you might be able to speed it up a bit, but you'd need TONS of memory in a hurry.

Of course I could be completely off base here - maybe there's a little leprechaun inside WinUAE that does all this stuff magically, and he's just dawdling to piss people off. ;)

Ian
13 March 2002, 01:10
@ Burseg

I get ~20 fps no matter what codec or quality settings I use.

No doubt there is a perfectly logical explaination for this, but I'm affraid I just don't see it.

@ Chuckles

I have more than enough memory to do what you say;) I have about 300 mb free when WinUAE is running & recording:)

No only if I knew how to set up a ramdrive using Windows XP;)

oldpx
13 March 2002, 01:12
Does your emulation run at 20fps or the resulting avi?

Ian
13 March 2002, 01:18
Emulation runs at ~20 fps when recording, the resulting .avi is at full speed thanks to §ane's expert coding.:)

My problem doesn't lie with this at all, it's the way §ane explained it above, it just doesn't make sense taking into account what I have posted.

CPU time doesn't seem to have anything to do with it at all. Hopefully §ane will set me straight:D

oldpx
13 March 2002, 01:21
Ok I give up :p

Ian
13 March 2002, 01:55
@§ane

I appoligise, you are right.

I just overclocked my CPU to an XP2000 (About 1.61 ghz) and it was slightly faster, ~23 fps.

It still seems strange that your old version of WinUAE encodes at the same speed as the new version of WinUAE, even though it uses far more processor time than your version does in normal operation.

Maybe other's will have the same question's I had, so I'll leave all this crap here;)