Orange Pi RK3399: HDMI recording on a budget // Review
The Orange Pi RK3399 is yet another board to join the ranks of other RK3399 based SBCs. In true Orange Pi fashion, they give you everything, but is this SBC worth it?
Unboxing
Occasionally I’ll be given an SBC for review, but like most of my reviews I purchased this one. If you saw my previous mailbag video, you would have seen how Orange Pi shipped this board.
Topside
So, what does this little baby give you? Starting from the top right working clockwise.
- The first of two MIPI-CSI interfaces
- two MIPI-LCD interfaces
A couple of buttons to mash, which in the documentation have been assigned,
- Menu
- Return
- Volume down and
- Volume up
Then, there’s:
- Speaker output
- MIC
- IR receiver
- Audio in/out jack
- SD slot
- 4x USB2.0 ports
- Recovery button
- Debug serial
- 12v 2A DC jack… nice
- External battery connector
- Reset button
- Loosely compatible Pi header
- GbE
- USB Type-C, even better
- SPDIF out
- HDMI out
- and something that we’ve all been waiting for, HDMI in
- Also mSATA
- WiFi and Bluetooth connectors
- 5v 2A power header
- and a 12v 2A one
On the semi side, we have
Underneath
On the flip side, we have:
- The second MIPI-CSI
- and eDP interfaces
- There’s also a mPCIe slot
- and a SIM card.
As for ICs, we have
The Orange Pi user guide tells me that I can power this thing from either the 12v DC jack, 12v header, 5v header, USB Type C, or batteries. I would have liked to have tested out running this thing on batteries, but they didn’t arrive in time.
Android Tests
The SBC comes preinstalled with Android 6 on the eMMC. So I thought I’d check that out first.
I thought I’d dive straight into testing out the HDMI input to see if it’d work, but…
It was looking good for a while, but then…
OK, let’s move on to Linux tests.
Installing Linux
Installing Linux is easy enough. It’s identical to all the other RK3399 based SBCs around.
Download the Linux upgrade tool and the Orange Pi Debian image.
That’s all par for the course.
HDMI Recording
Since the HDMI recording failed dismally, I need to see if it does actually work under Linux. I used this Linux image for HDMI recording.
I first tried to record using gstreamer and had some mixed results.
Doing real-time AVI encoding at 60FPS
gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=60/1 ! jpegenc ! queue ! avimux name=mux ! filesink location=output1-60fps-RTencoding.avi
and then at 30FPS
gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=30/1 ! jpegenc ! queue ! avimux name=mux ! filesink location=output1-30fps-RTencoding.avi
gst-launch-1.0 v4l2src device=/dev/video0 io-mode=4 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=60/1 ! filesink location=output1-60fps-Raw.raw
ffmpeg -f rawvideo -pix_fmt nv12 -video_size 1920x1080 -framerate 60 -i output9.raw ~/output9.mp4
So, then I switched over to using ffmpeg with hardware encoding.
ffmpeg -hwaccel vaapi -f v4l2 -pix_fmt nv12 -video_size 1920x1080 -framerate 60 -s 1920x1080 -r 60 -i /dev/video0 ffmpeg-60fps-vaapi.mpg
ffmpeg -hwaccel vaapi -f v4l2 -pix_fmt nv12 -video_size 1920x1080 -framerate 60 -s 1920x1080 -r 60 -i /dev/video0 -c:v mjpeg -q:v 3 -an ffmpeg-60fps-vaapi-HQ.mov
ffmpeg -hwaccel vaapi -f v4l2 -pix_fmt nv12 -video_size 1920x1080 -framerate 60 -s 1920x1080 -r 60 -i /dev/video0 -c:v mjpeg -q:v 3 -framerate 60 -r 60 -an ffmpeg-60fps-vaapi-HQ2.mov
ffmpeg -hwaccel vaapi -f v4l2 -pix_fmt nv12 -video_size 1920x1080 -framerate 30 -s 1920x1080 -r 30 -i /dev/video0 -c:v mjpeg -q:v 3 -r 30 -an ffmpeg-30fps-vaapi-HQ.mov
ffmpeg -hwaccel vaapi -f v4l2 -pix_fmt nv12 -s 1920x1080 -r 30 -i /dev/video0 -c:v mjpeg -q:v 3 -an ffmpeg-30fps-vaapi-HQ2.mov
ffmpeg -vsync 2 -hwaccel vaapi -f v4l2 -pix_fmt nv12 -s 1920x1080 -r 60 -i /dev/video0 -c:v mjpeg -q:v 3 -an -y -frames 900 ffmpeg-60fps-vaapi-HQ4.mov
And ended up with this being the best results so far, but even then. It was a little stuttery at times.
ffmpeg -hwaccel vaapi -f v4l2 -pix_fmt nv12 -s 1920x1080 -r 30 -i /dev/video0 -c:v mjpeg -q:v 10 -an -y -frames 900 -vsync 2 ffmpeg-30fps-vaapi-HQ42.mov
GPIO Tests
So before I move on to Armbian tests, I thought I’d check out what GPIOs the Orange guys had enabled.
Unfortunately, the schematics were wrong and the actual I2C addresses were way off. So, here’s an adjusted I2C scan for you.
I2C bus 0
- /sys/devices/platform/ff3c0000.i2c/i2c-0/i2c-dev/i2c-0/name rk3x-i2c
- /sys/devices/platform/ff3c0000.i2c/i2c-0/name rk3x-i2c
**RK808 - 0x1B **
PMIC, voltage regulators and RTC.
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/name rk808
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/regulator/regulator.11/name vdd_center
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/regulator/regulator.12/name vdd_cpu_l
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/regulator/regulator.13/name vcc_ddr
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/regulator/regulator.14/name vcc_1v8
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/regulator/regulator.15/name vcc1v8_dvp
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/regulator/regulator.16/name vcc3v0_tp
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/regulator/regulator.17/name vcc1v8_pmu
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/regulator/regulator.18/name vccio_sd
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/regulator/regulator.19/name vcca3v0_codec
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/regulator/regulator.20/name vcc_1v5
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/regulator/regulator.21/name vcca1v8_codec
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/regulator/regulator.22/name vcc_3v0
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/regulator/regulator.23/name vcc3v3_s3
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/regulator/regulator.24/name vcc3v3_s0
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-001b/rk808-rtc/rtc/rtc0/name rk808-rtc syr827 - 0x40
Synchronous step down regulator for the CPU.
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-0040/name syr827
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-0040/regulator/regulator.9/name vdd_cpu_b syr828 - 0x41
Synchronous step down regulator for the GPU.
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-0041/name syr828
- /sys/devices/platform/ff3c0000.i2c/i2c-0/0-0041/regulator/regulator.10/name vdd_gpu
I2C bus 1
- /sys/devices/platform/ff110000.i2c/i2c-1/i2c-dev/i2c-1/name rk3x-i2c
- /sys/devices/platform/ff110000.i2c/i2c-1/name rk3x-i2c TC358749XBG - 0x0F
HDMI to MIPI-CSI for HDMI recording.
- /sys/devices/platform/ff110000.i2c/i2c-1/1-000f/name tc358749xbg-v4l2-i2 ALC5651 - 0x1A
Audio CODEC
- /sys/devices/platform/ff110000.i2c/i2c-1/1-001a/name rt5651
I2C bus 4
- /sys/devices/platform/ff3d0000.i2c/i2c-4/name rk3x-i2c
- /sys/devices/platform/ff3d0000.i2c/i2c-4/i2c-dev/i2c-4/name rk3x-i2c AK09911 - 0x0C
Compass 3DOF
- /sys/devices/platform/ff3d0000.i2c/i2c-4/4-000c/name ak09911
- /sys/devices/platform/ff3d0000.i2c/i2c-4/4-000c/input/input3/name compass CM32181 - 0x10
Ambient Light Sensor
- /sys/devices/platform/ff3d0000.i2c/i2c-4/4-0010/name cm32181
- /sys/devices/platform/ff3d0000.i2c/i2c-4/4-0010/iio:device1/name cm32181 FUSB302 - 0x22
Programmable USB Type C controller
- /sys/devices/platform/ff3d0000.i2c/i2c-4/4-0022/name fusb302
- /sys/devices/platform/ff3d0000.i2c/i2c-4/4-0022/extcon/extcon1/name 4-0022
- /sys/devices/platform/ff3d0000.i2c/i2c-4/4-0022/extcon/extcon1/cable.0/name USB
- /sys/devices/platform/ff3d0000.i2c/i2c-4/4-0022/extcon/extcon1/cable.1/name USB_HOST
- /sys/devices/platform/ff3d0000.i2c/i2c-4/4-0022/extcon/extcon1/cable.2/name USB_VBUS_EN
- /sys/devices/platform/ff3d0000.i2c/i2c-4/4-0022/extcon/extcon1/cable.3/name SDP
- /sys/devices/platform/ff3d0000.i2c/i2c-4/4-0022/extcon/extcon1/cable.4/name CDP
- /sys/devices/platform/ff3d0000.i2c/i2c-4/4-0022/extcon/extcon1/cable.5/name DCP
- /sys/devices/platform/ff3d0000.i2c/i2c-4/4-0022/extcon/extcon1/cable.6/name SLOW-CHARGER
- /sys/devices/platform/ff3d0000.i2c/i2c-4/4-0022/extcon/extcon1/cable.7/name FAST-CHARGER
- /sys/devices/platform/ff3d0000.i2c/i2c-4/4-0022/extcon/extcon1/cable.8/name DP CW2015 - 0x62
Battery fuel gauge ASM1153E
USB 3.0 and SATA MPU6500 - 0x68
Gyro/Accel 6DOF
- /sys/devices/platform/ff3d0000.i2c/i2c-4/4-0068/name mpu6500 LSM6DS3 - 0x6A
6DOF Gyro/Accel
- /sys/devices/platform/ff3d0000.i2c/i2c-4/4-006a/name lsm6ds3_gyro
- /sys/devices/platform/ff3d0000.i2c/i2c-4/4-006a/input/input4/name gyro LIS3MDL - 0x1C | 0x1E
3DOF compass
I2C bus 9
HDMI out
- /sys/devices/platform/ff940000.hdmi/i2c-9/name DesignWare HDMI
- /sys/devices/platform/ff940000.hdmi/i2c-9/i2c-dev/i2c-9/name DesignWare HDMIAlas, no SPI. That’s really to be expected, but we do have frequency scaling control and access to the PMIC and voltage regulators.
Armbian Booting
OK, so moving on. Time for the latest Armbian nightly build.
Which doesn’t seem to have any HDMI output, but looking on the Armbian forums it seems that that part hasn’t been sorted out yet.
This is actually really handy and saves a lot of fiddling around with tweezers and jumpers.
Armbian GPIO
So what about GPIOs from Armbian?
The rest of the buses remained the same.
And yup, SPI is a no show again.
One of the really annoying things was the GbE driver. I saw problems with all three O/S and even when dropping down to 100Mbit half duplex, I’d still see the NIC drop off the network entirely.
Armbian SATA
So, on to SATA testing. This will be good.
I used a fairly recent but bog standard 1TB SATA disk, (WD10JPVX). Note that the SATA interface is NOT hot swap. So you’ll have to power off and on again to see the disk.
I ran a bunch of iozone tests for a couple of hours using Phoronix. Since the hard disk is attached to a plain USB 3.0 to SATA bridge, the results were as expected.
Click here to see all the results and here for a comparison against other SBCs.
I’m thinking of running a comparison video across all SBCs that are SATA capable. So leave a comment below if you’d like to see it.
Power Consumption
Unfortunately, my power logger seemed to stop recording current draw for some reason. So, I can’t really see what the current draw was like, but while running Armbian and sitting idle, I saw the SoC temperature sit around 31C.
- Max: 34.4
- Average: 31
- Min: 30.6
During the Phoronix tests I saw a max of 52 with an average of 32C.
- Max: 52.2
- Average: 32
- Min: 30
This is all pretty similar to other RK3399 based SBCs I have reviewed. So no surprises there.
Summary
So, what do I think of the Orange Pi RK3399? Cons:
- Well, it’s not as polished as some of the other RockChip based SBCs, like the NanoPi NEO4 for example.
- Even though it’s a fairly stock standard design, the software side is quite flakey. Not having a workable Android O/S is a bit of an issue.
- Documentation is fairly complete, but there are a lot of errors. So trying to track down components takes a while. On the plus side:
- You can actually record from HDMI. This makes it the only SBC on the market capable of doing so. The video does occasionally stutter even with hardware encoding, but I can see this only improving over time.
- The HDMI input on the SBC doesn’t support HDCP but the Toshiba device does allow for it. I’m gathering that this would cost a fair amount to implement as licensing costs would go through the roof for the Orange guys and make this board a whole lot more expensive.
- It’s one of the only SBCs to push out a lot of the RockChip GPIOs. A lot more than other SBCs.
- And we’ve got battery management, but I haven’t tested this yet.
So, a bit of a mixed bag. Definitely not an SBC for a beginner, possibly workable for a novice, so it’s really a board for hackers at the moment.