Wednesday 29 January 2014

1080p60 Lossless Capture

With the release of the PlayStation 4 and Xbox One, everybody wants to be able to capture these systems at native resolution and frame rate. This isn't going to be difficult with hardware encoders but what about lossless software capturing? Since I have a capture card capable of 1080p60 video (Micomsoft SC-512N1-L/DVI) I decided to give it a try.

I don't by any means have an amazing computer. It's a Sandybridge based i5 2500k at stock speed with 8GB RAM. I use an SSD for my Windows 7 boot drive and save all recordings to a single Western Digital 1TB Black hard drive.

I don't have a PlayStation 4 or Xbox One so I decided to use my Xbox 360 which is capable of up scaling games to 1080p. The only 60 fps game I have is Super Street Fighter IV but this should be more than adequate for testing the capabilities.

Unfortunately the Micomsoft card is currently limited to the YUY2 (4:2:2) color space. I will test some of the most popular lossless codecs and configure them for YUY2 compression. The lossless codecs being tested are Lagarith, Huffyuv, x264vfw and UT Video. I have configured the codecs as shown below.

1080p60 1080p lossless configuration config huffyuv
Huffyuv YUY2 Configuration. Predict median (best) gave the best compression.
1080p60 1080p lossless configuration config lagarith yuy2
Lagarith YUY2 Configuration
1080p60 1080p lossless configuration config ut video 422
UT Video YUY2 Configuration (automatically chosen by the codec)
1080p60 1080p lossless configuration config x264vfw
x264vfw YUY2 Configuration (click to enlarge)

The software used will be AmaRecTV as it allows me to see if the capture has inserted or dropped any frames along with the bit rate of the capture and CPU load.

Before the real testing begins, I decided to carry out two capture tests to get some good indications if this was possible. One was a 10 second recording of the static Xbox 360 dashboard. The other was the opening intro movie to Super Street Fighter IV which lasts over 3 minutes (it's only 30 fps). Obviously any codec can deal with a static scene but it gets really tested when it has to deal with such a fast paced intro where there are lots of fast scene changes and movement. The SSF4 intro movie that I used can be viewed here. I decided to take note of the highest bit rate and CPU load that I saw in AmaRecTV. Below are my test results. I included the MB/s values as it may be easier for some to read in relation to a hard drive writing speed.

1080p60 1080p lossless configuration results lagarith huffyuv ut video
Click to enlarge
1080p60 1080p 1080p30 lossless configuration results lagarith huffyuv ut video
Click to enlarge
x264vfw really shocked me in the static dashboard test. That is just a phenomenal result.

Lagarith just cannot contend with fast motion scenes. Not only did I get inserted frames but my preview window actually started to lag and even paused for some seconds. Huffyuv, x264vfw and UT Video all passed but of course, x264vfw shows another impressive result in halving the bit rate of the other two codecs. To reduce the bit rate of x264vfw further, the preset could be changed from Ultrafast to something lower. I actually tried this but my CPU could not keep up and I was getting lots of inserted frames. You will need a very fast CPU if you want to use anything more than the Ultrafast preset.

I actually stumbled upon an issue that I can only blame the Xbox 360 for. All of the codecs that passed showed exactly 8 dropped frames over the entire intro movie.

1080p60 1080p lossless configuration xbox 360
Click to enlarge
These dropped frames seem to occur at the same time regardless of codec and happen even when the bit rate and CPU load is relatively low. The capture will be fine during the Ken and Ryu fight but once it changes to Ibuki and Guy it will drop 2 frames within 10 seconds. It will then continue to do this throughout the rest of the intro. This might be because 59.94 was chosen in AmaRecTV but this should be correct for 1080p as everyone knows that the Xbox 360 and PS3 output 59.94 at 720p. 

I can only assume the Xbox 360 fluctuates to nearer 60 fps in 1080p mode which causes the dropped frames. To see if I was correct, I manually inputted 60.00 into the Device tab of AmaRecTV so instead of "w=1920, h=1080, fps=59.94,  fcc=YUY2, bit=16" it read "w=1920, h=1080, fps=60.00,  fcc=YUY2, bit=16". Doing this was a success and I no longer had any dropped frames.

Now that we have some base results, it is time to look at proper 1080p60 capture. Since Lagarith failed the 1080p30 test, I saw no reason to try it at 1080p60. I played arcade mode in Super Street Fighter IV and again took note of the max bit rate and CPU load I encountered.

1080p60 1080p lossless configuration results huffyuv ut video x264vfw
Click to enlarge
Disappointing results for Huffyuv and UT Video but the 1080p30 test foreshadowed this. The doubling of the frame rate is just too much for these codecs. What is surprising however is that x264vfw keeps at a maximum of 16% CPU load even when the bit rate is increased by 356.8 Mb/s. That would lead you to think you could lower the preset to save some bandwidth but as indicated earlier, any deviation from the Ultrafast preset is just not possible.

As the tests have indicated, x264vfw is absolutely stunning (the only one to actually achieve proper 1080p60 capture). I have read that the Western Digital I have is capable of 123.3 MB/s but this is actually quite slow compared to other drives which can go to 130 MB/s and beyond. I actually did these tests when my hard drive only had about 200 GB free so it doesn't seem like the drive slowing down as it fills up will be an issue (especially if you get a faster hard drive).

The one thing to consider is, should you even consider doing this for normal gameplay capture? The bit rates identified here are pretty huge for normal use. Even a 2TB drive would not take long to fill up. This is cool to have and knowing it can be done but I actually recommend to stick with 720p for now or even look into applying a reasonable CRF value for 1080p60 for minimal quality loss.

There is however one issue though if you do take the 1080p60 and x264vfw route. Editing the captured file is very laggy in Sony Vegas (it was taking about 10 seconds to seek to a different part of the video). More on fixing this issue here.

No comments:

Post a Comment