4K H.265 → H.264 Video Server

Part 1 — Making 4K Video More Compatible

Video has changed considerably over the years.

Modern cameras, phones and streaming services increasingly use H.265/HEVC, particularly for 4K content. It is considerably more efficient than H.264, making it attractive when storage space and bandwidth matter.

But compatibility is a different story.

H.264 remains much easier to play on older hardware, televisions, media players and other devices. A file that is perfectly reasonable on a modern computer can therefore become inconvenient when it needs to be played somewhere with limited codec support.

That creates an interesting problem:

What if the source is 4K H.265, but the destination really wants H.264?

Instead of converting everything manually on my main PCs, I wanted a dedicated machine whose job would be to sit between the original media and the devices that need it.

The concept is simple:

4K H.265 in → H.264 out.

Why a Dedicated Server?

Video conversion can be a surprisingly demanding workload.

A conventional desktop can certainly perform the conversion, but using a daily-use machine for a long-running transcoding job is not particularly attractive. It consumes CPU or GPU resources, generates heat and ties up a computer that might be needed for something else.

A dedicated server changes the equation.

It doesn’t need to be particularly good at gaming. It doesn’t need an expensive graphics card. It doesn’t even need to be a modern high-end PC.

It needs to be good at one particular job.

That is where older hardware can become interesting.

A machine that would be considered slow for modern desktop use can still be perfectly adequate for a specialized workload, particularly when hardware video acceleration is available.

The Interesting Part: 4K

The project isn’t simply an H.265-to-H.264 converter.

The source material is 4K H.265.

That makes the workload considerably more interesting because the server has to decode a high-resolution HEVC stream and then encode it again as H.264.

The two operations are fundamentally different.

First, the server needs to understand the compressed H.265 video.

Then it needs to produce a new H.264 stream, potentially at a resolution and bitrate suitable for the target device.

If both operations are performed efficiently in hardware, the amount of CPU power required can be dramatically reduced compared with doing everything through software encoding.

This is where choosing the right hardware becomes more important than simply choosing the newest CPU.

Not All Transcoding Is Equal

There is an important distinction between playing a video and transcoding a video.

A modern GPU can decode 4K H.265 relatively easily. But transcoding means that the decoded frames have to go through another encoding stage.

For this project, the objective is therefore not simply to find hardware capable of 4K playback.

It is to find hardware that can handle the complete pipeline:

H.265 decode → processing → H.264 encode

and do so reliably enough that the machine can operate as a server.

That also opens the possibility of handling more than one stream simultaneously.

A server that can convert one video is useful.

A server that can convert several streams at the same time becomes considerably more interesting.

An Appliance Rather Than a Desktop

I also like the idea of this machine behaving differently from a conventional PC.

There is no reason for it to have a desktop-oriented role.

It should be something that can simply be switched on and left running.

The media files are stored elsewhere, the server performs the conversion, and clients receive a compatible stream.

In that sense, the computer becomes more like an appliance than a workstation.

That is one of the recurring ideas behind my hardware projects: old hardware doesn’t necessarily need to compete with modern hardware at everything.

Instead, give it a specific task where its capabilities still make sense.

A processor that is too slow for modern gaming might still be perfectly useful for a server.

A graphics card that is no longer interesting for 3D rendering might have an excellent video engine.

A motherboard with obsolete expansion technology might still provide exactly the connectivity required for a specialized machine.

H.265 In, H.264 Out

There is something almost deliberately backward about this project.

H.265 was developed to provide better compression than H.264. Converting H.265 back into H.264 can therefore look like taking a step backwards.

But compatibility sometimes matters more than compression efficiency.

The purpose isn’t to improve the original video.

It is to make it usable by hardware that cannot conveniently handle the original format.

That makes the server a bridge between generations of video technology.

The source can remain modern:

4K H.265.

The destination can remain old:

H.264.

And somewhere between them is a dedicated computer doing the conversion.

That is what makes this more interesting than simply running FFmpeg on a spare PC.

The question is not whether a modern computer can transcode 4K video.

Of course it can.

The interesting question is:

How cheaply, efficiently and reliably can an otherwise obsolete PC be turned into a dedicated 4K H.265-to-H.264 video server?

Continue with Part 2

Part 2 — Reconstructing 4K Video on a Radeon HD 6570 and Athlon 64 X2