Hi I’ve been building my CN9130 base unit - primarily targetting router/firewall/proxy/edge device functionality (love it for this although i’ve had to create a complete custom kernel compared to the base image).
However I recently setup headless video transcoding on it for video streaming using ffmpeg. However it nearly cooked my device transocding some x264/x265 videos (in fact it shutdown due to heat warning). I put it down to lack of HW acceleration and ffmpeg using nearly 100% across 4x CPU’s to transcode.
The OCTEON chipset supports HW acceleration for packet processing such as crypto etc. I was wondering if there any libraries that can utilise HW acceleration for video processing on CN9130. e.g. libimxvpuapi API for using hardware video codecs on i.MX platforms. LIBimxvpuapi
Secondly if it’s just not possible. Is it possible to add an additonal SOM like the i MX 8M to the clearfog base to handle video transcoding? would that work with libmxvpuapi above?
regards
First off, you never need to worry about physically damaging your SOM due to heat issues. It will always safely shut down before any damage happens. The existing passive heatsink solution is very much designed to handle typical network router use cases and applications doing extended cpu intensive tasks across all the cores will most definitely need an active cooling method of some sort.
With that being said software transcoding on 4xCortex-A72 is just not going to be efficient, most likely just handling maybe 1-4fps depending on the resolutions and codecs used. Unfortunately the the HW accelerators built into the CN913x are purpose built for accelerating networking, crypto, and storage only and could not be utilized for the uses you intend.
Of course you could add another system to the ClearFog to offload these tasks to, but that really depends on your form factor how you expect the system to perform, what is your power budget. An iMX8MP is a good low power SOC but the max transcoding it would support is 1 x 1080p60 stream with the ability to encode in h264/h265. If you plan to use 4K formats then you would need to find another SOC to fit those needs. The best way to implement this directly into the Base would be a SOM that could use a mini-pcie carrier, with the SOM running in USB 3.0 device-mode, or as a PCIe endpoint. Obviously USB 3.0 is much easier to design and implement from a software standpoint.
2 Likes
Thanks for the response.
Yes thankfully thats exactly what it did - automtically shutdown due to thermal alarms. To be honest it’s just me being greedy and trying to get the device to do everything. I’ve been building it as my edge gateway, proxy, firewall, VPN, wifi controller. plus some multimedia functions. So I was thinking it would be “nice” to move the video streaming server (with NFS mounted NAS) to this device since it’s the always on gateway, but in reality now I think i’ll keep the devices seperate.
Actually it was transcoding a full hd 1080p x264 (unsure of fps but definitely above 4fps) plus downmixing dolby audio to stereo - and doing what i thought was a reasonably good job of it so i was impressed. however it was doing it fully on the CPU hence the heat.
Thanks again for your response.
Okay fair enough. You can get a PWM click board that plugs into the mikrobus header and can drive a PWM cpu fan if you do want to be able to push the CN913x just a bit more.
1 Like
The Raspberry Pi 4B has a GPU and could probably be used for video transcoding.
I’ve NFS-mounted a NAS partition for swap on my 4B, this worked fine for more than a year (although the clever guys says it’s not possible to do that).
If 1 GbE is not sufficient, you might be able to add a secondary USB3 (2.5GbE or 1GbE) interface. One could be used for disk I/O and one for streaming; but you could also bond them if they’re two 1 GbE interfaces. Note: You won’t be able to get more than 3Gbit/s on a 5Gbit USB3 network interface.