Quad Core CPUs for Video Encoding - Are they Worth it

Post Reply
cwathen
Posts: 1309
Joined: Fri 15 Aug, 2003 17.28

Over the past 8/9 years, I've ended up with 3 Freeview PVRs which are now all full of content. Across the 3 of them, I have 900GB of data translating into about 600 hours of actual programming including complete libraries of series (also a goldmine of presentation from now long forgotten channels like FTN and Virgin 1). It occurred to me the other day that these PVRs now exist pretty much solely to play back old recordings, and that it would be nice to be able to view the content in different rooms rather than have to go to the room the PVR is in that has the recording on it, and also to be able to view the content on other devices.

I've recently upgraded to a 3TB hard disk with space to burn on it, so I thought I'd look at getting the files off them and on to a computer.

Turns out that what I thought would be the difficult bit - getting the files off the PVRs - turned out to be relatively simple - all of them worked in the same way using standard PC hard drives formatted into XFS which a Live Linux CD could access, and with a .REC file for each recording with the time and date of the recording encoded into the filename which made it easy (if slow) to match the files up to the specific recordings - it was just a matter of going down the list from the PVR and writing down every programme along with it's time and date.

The .REC files are simply the MPEG2 DataStream dumped to disk with no other encoding performed. XBMC can play these files directly on my PC, but other hardware (such as my phone) can't. Even if I can find software to play them, the files are huge (up to 2GB / hour depending on the channel) which limits the practicality of being able to take much content with me.

So, I decided to transcode them into x264. I've gone for fairly moderate settings in the encoder I'm using (ffMPEG) which will compress the files down to about half the size they are now without having any appreciable drop in quality.

And here's the kicker: the encoding time. Even without anything else running, the encoder is only running at a maximum of about 20FPS - slower than real time. Start trying to use the computer for other tasks, and it can drop as low as 12FPS. 500 hours of footage taking on average 1hr20mins to transcode an hour of material will take a minimum of 27 days to transcode, and that's with the PC running 24/7 and being used for nothing else.

My CPU is, by modern standards, a bit weak - a 2.8GHz Core 2 Duo, but it's fine for everything I use it for. I've google squeezing more out of ffMPEG, some people have suggested it can't use multiple cores, so I tried changing the affinity in task manager so that it could only use 1 to see if this made a difference (with the idea I could run a separate instance of ffMPEG on the other core). Straight away this cut performance in half, so it is using both cores.

Others suggested that it isn't truly loading the processor with 1 instance running, and I could run 2 or 3 at the same time. Again, running 2 instances cuts performance by a half, running 3 cuts it to a third of a single instance etc etc.

So I am satisfied that the encoder is running as fast as it can, and I can only improve it by dropping quality to achieve faster results (which I don't want to do), or getting a more powerful processor.

I'm not going to spend big bucks replacing my PC for a one off project, but it will support a Core 2 Quad and I've noticed these going on ebay for around 30 notes, which I'd be willing to invest in if it made a difference.

I would logically expect a Core 2 Quad at the same clock speed to be able to run the encoder at double the speed and get the job in half the time, but others have advised I will only see a modest improvement moving from 2 cores to 4.

Does anyone with experience of this know what I might reasonably expect with a better processor?
User avatar
Pete
Posts: 7589
Joined: Fri 15 Aug, 2003 13.36
Location: Dundee

Isn't HD encoding something that is often better handled by the GPU?

On a mildly related note my TiVo went boom the other day, dead HDD. Was flipping raging but I sharn't hijack this thread for that.
"He has to be larger than bacon"
cwathen
Posts: 1309
Joined: Fri 15 Aug, 2003 17.28

Pete wrote:Isn't HD encoding something that is often better handled by the GPU?
The encoding isn't HD, it's all SD source from standard Freeview PVRs. The GPU is nothing to write home about either - an ATI Radeon HD 2400 XT card which I added or the on-board Intel Q43 graphics. I would be happy to let the GPU take some of the strain if it will speed things up but can you do this in ffMPEG?
thegeek
Posts: 858
Joined: Sat 04 Jun, 2005 12.35

More thinking out loud than anything here...

might a NAS box be useful here? If you're in no hurry to get the files transcoded, you could leave it sitting in a corner doing its thing at a glacial pace, but then once it's finished you've got a nice media server to stream stuff from, plus also a decent solution for local backups.
User avatar
Gavin Scott
Admin
Posts: 6442
Joined: Fri 15 Aug, 2003 13.16
Location: Edinburgh
Contact:

I upgraded to an i7 quad core (or 8 with hyper threading, I suppose) and a relatively hefty GPU (Radeon HD 7700 series). The combination of the two is highly satisfactory. My productivity (if you can call it that for hobby work) has massively increased. I was lucky and spotted this machine on Gumtree for just £350. I'm pretty sure I wouldn't have spent the retail price for the upgrade - so perhaps you should explore that marketplace.
cwathen
Posts: 1309
Joined: Fri 15 Aug, 2003 17.28

Thanks for all the advice guys. As the prices for Core2Quads seem pretty stable, I've now got one winging it's way to me from ebay. If it doesn't make much difference, I can probably sell it for the same price I bought it for
cwathen
Posts: 1309
Joined: Fri 15 Aug, 2003 17.28

Well, looks like it was worth it. Swapped out the Core 2 Duo with a Core 2 Quad. Despite the new CPU being clocked slower than the old one (2.3Ghz vs 2.8Ghz), average FPS has increased from 20 to 50! Now also rocking a 7.1 Windows experience score for the CPU to boot (I think it was 5.9 before IIRC)

Best 25 quid I've spent in a long time, perfect for my transcoding project and hopefully should push this old girl on a bit longer yet.
Post Reply