How to transcode videos on an ODROID XU4/HC2 without burning it

I have an Odroid-HC2 as a NAS and media server in my house. It works very well, even as a media server. When I play a video remotely or select titles for offline access, the transcoding feature is used. There’s when the technical limitations of running a Plex media server on an ARM processor appears.

One of these limitations is the low power of the CPU. The HC2 uses the same SOC that the Odroid XU4 have, an Exynos5422 Cortex-A15 that can reach 2Ghz in 4 of its 8 cores. 

However, this CPU is not tuned for transcoding video. There are no hardware acceleration features that the Plex transcoder could use. So, when Plex starts transcoding, the CPU usage rockets up. 

Unlike the XU4, the HC2 doesn’t have a fan to cool down the chipset, but instead, it uses a large aluminum dissipator. At least, I think it is aluminum. This dissipator is made to dissipate not only the heat of the CPU but also the heat produced by the attached hard drive.

During transcoding, the CPU temperature can rise to 83 degrees Celcius, which is harmful to the entire motherboard.

My lazy solution

Limit the CPU frequency on which the device can operate. 
I bought an excellent case for my HC2, and I couldn’t find a way to add a fan to it. It’s just not enough space in it. So, reducing the transcoding speed in exchange to not burn my device is a fair trade.

How to limit the CPU speed

Finding the sweet frequency limit spot is a matter of trial an error. The limit depends on the ambient temperature where your device is located (a colder room with a wind current allows the dissipator to get rid of the heat faster).

These are the steps you need to follow:

  1. Install the cpufrequtils package
  2. See your available CPU frequencies
  3. Start transcoding a video and see how much hot your CPU gets after 30 seconds
  4. If the CPU gets hotter than 70 degrees go to the next step
  5. Set a lower frequency limit and repeat the step 2

Magic commands

Install the cpufrequtils package

List available CPU frequencies

Show me the current frequency limits of my CPU cores

Monitor the temperature of the CPU

Where to change the CPU frequency limits

Update the values in the file “/etc/default/cpufrequtils”. 

Remember that you need root privileges to make changes in this file.
After updated the limits, you need to restart the cpufrequtils service to apply the changes.

Conclusion

In my case, limiting the frequency to 1.2Ghz was enough to avoid crossing the 71 Celcius on a hot day of summer. 
Luckily, this speed is fast enough to transcode a single 1080p video encoded with h264 and AC3 audio that doesn’t exceed 4Mbps of bitrate into one with the same codec at 720p and 2Mbps (good enough for a smartphone or tablet screen).

Deja un comentario

Este sitio usa Akismet para reducir el spam. Aprende cómo se procesan los datos de tus comentarios.