I needed an action camera to document DIYP’s trip to Photokina in September. I didn’t really want to have to fork out for a GoPro. It’s just not something I’d use often enough to justify the cost. So, I looked into the cheaper alternatives. This is when I found the Yi HD Action Camera, and some of the side-by-side examples I was seeing with the GoPro Hero3+ Silver just blew me away.
In a world of GoPros and a million cheap competitors, finding the good ones can often be difficult. It doesn’t help that every reviewer out there has a different definition of “good”. So, seeing side-by-side comparisons of footage taken with two cameras at the same time is usually the best way to really see the difference. Even if YouTube’s compression does often destroy what you really want to see.
I’d come across a lot of inexpensive action cameras in my research. Most of them were really not that great. But this one little white (yellow, or black) box kept popping up. We’ve even reviewed it here on DIYP (yes, it has become a little more expensive since then). When I delved further into it, it actually looked pretty amazing.
With a little work, this unassuming $100-or-less action camera could give me footage easily comparable to a GoPro Hero3+ Silver, at about a third of the price. It even beats it on framerate, because the Yi can do 1080p60 whereas the Hero3+ Silver can only do 1080p30.
I say with a little work because out of the box, it’s not that amazing. It has compression artifacts on high detail scenes and fast movement. The highlights and shadows blow out fairly easily in contrasty scenes. It has kind of a watercolour look denoising effect, and the in-camera sharpening actually kills more detail than it enhances. There’s also no built in LCD or real controls on the camera itself. It’s still better than the similarly priced competition, but it’s no GoPro. At this massive price difference, though, you can’t really expect it to be.
This is where “hacking” the camera through scripts comes into play. Basically you load a script onto your microSD card, put it in the camera and then turn it on. After that, you’re pretty much all set to go. For an idea of the kind of difference it can make, here’s a side by side comparison video. On the right is the stock Yi as it comes from the factory. On the left is a split screen showing the camera running the YiMAX-PRO script along with contrast corrected footage.
Like Magic Lantern for Canon DSLRs, the hacks aren’t permanent. Simply formatting your memory card will reset things back to default. But what can these hacks let us do to improve the image quality?
Well, let’s first look at the how, then we’ll get onto the what and the why.
So, how do we do this?
The basic script is simple. You create a text file called autoexec.ash and put it in the root directory of your microSD card. In this file you put various codes and commands that the camera reads on startup, allowing you to override defaults. Anything not specifically overridden remains at the default setting.
There are many things that you can override to make the Yi perform in a way it was never officially intended. You can change the bitrate, shoot RAW stills (yes, really), manually set the exposure, or hack the WiFi to sync multiple cameras. You can even run an FTP server on it to download footage straight to your desktop over the built in WiFi.
There’s an archive of many known commands and scripts on GitHub. You will want to make a careful note of your camera’s firmware version, and that for which the script was intended. Various addresses and commands are different depending on which version of the firmware you’re using. You can check which version of the firmware you’re using with the Yi mobile app for iOS or Android, and you can download the latest version here.
Here’s some of the things that I changed to give me the results that I wanted.
Wherever possible I shoot 1080p24, no matter what camera I’m using. It just lets me keep consistency between projects without having to convert footage to different framerates. At this resolution and framerate, the Yi saves at 10mbps. Fine if you just want to upload footage straight from the camera to YouTube or Facebook. Not so fine if you want to start editing clips, and making colour adjustments. It degrades pretty quickly.
With storage space so cheap these days, I don’t worry about recording bitrates as high as the camera can handle. 64GB UHS-I microSD cards are very inexpensive. Even at 50mbps, one of those will get you around 4 hours of footage. Your battery will die long before the card fills up. So, I shoot 1920×1080 at 24 frames per second with a 50mbps bitrate.
To tell it to do this basically just involves a single line in your autoexec.ash file.
writew [resolution address] [bitrate address]
There are two lists. One which corresponds to resolution addresses and another to bitrate addresses. Again, you’ll want to check your firmware version. These lists are for the current version of the firmware which is 1.2.13. In this list, you’ll usually see three listings for each resolution. I’m not entirely sure why this is, but personally, I just go with the first in the group and it doesn’t seem to cause an issue.
The other list (also for firmware 1.2.13) presents the bitrate addresses.
So, to tell the camera to shoot 1080p24 at 50mbps I’d use the following line in my autoexec.ash file.
writew 0xC05C2482 0x4248
That’s it, simple as that. Immediately I’ve increased the clarity of complex parts of my scene while simultaneously eliminating the issue of detail destroying motion. This is a constant bitrate, by default. But VBR and ABR are available, too, if you hunt around for the info.
Set default resolution & framerate
The above command sets the bitrate for a given resolution and framerate combination, but it doesn’t actually tell your camera to shoot it. You can select it from within the app, but it’s a lot easier to just have the script do it when you turn on the camera.
This way, no matter what my settings ended up being last time I used it, when I turn on the card, it defaults back to 1080p24. To set the default resolution, you simply add this line.
writeb 0xC06CC426 [Video mode]
This list gives you a list of all the codes for each resolution mode, as well as a bunch of other information you can ignore for now. For me, 1920×1080 resolution at 24fps is video mode 0x21.
So, the line in my script reads…
writeb 0xC06CC426 0x21
You’d just switch out “0x21” for whichever video mode you want to use as your default.
Increase max filesize
Along with higher bitrates comes larger files. The Yi Action Camera has a filesize limit of about 2GB. It’s a number that crops up often, due to FAT32 file system limitations. But, who uses FAT32 any more? This limit can be bumped up to 4GB (I don’t think it can be removed entirely), resulting in fewer files. For firmware 1.2.13, again, it’s a single line.
writew 0xC03A8520 0x2004
Adjusting the image
This is where things get a little complicated, because we start to see see lines of code with numbers that seem to make no sense at all. The short version is for me to tell you to just go and grab YiMAX-PRO, the script which the “hacked” camera was running in the video above.
You can see in the images below the difference it makes once you correct the contrast in something like Premiere Pro or DaVinci Resolve. These are 100% crops.
The difference on this shot with lots of backlighting, moving water, and leaves blowing is even more drastic.
Aside from the amount of compression in a 10mbps file, the footage comes out of the Yi with what users describe as a “watercolour” effect. There’s some pretty major issues with the picture itself which YiMAX-PRO helps to overcome.
- The contrast is too high. This often blows out the highlight detail. In those few times when it doesn’t, it crushes the shadows.
- Colours are too saturated or vibrant. Pulling these back individually to make things look cleaner can be a pain. The white balance isn’t always perfect, either.
- In-camera noise reduction removes a lot of the very fine detail that isn’t actually noise. This is what’s causing the blurred appearance in the fine detail of the rocks and leaves above.
- Sharpening applied in-camera is also a little aggressive, leading to blurred areas (because of the noise reduction) with sharp-ish edges.
YiMAX-PRO reduces the contrast, colour, sets the exposure to retain highlight detail, and disables in-camera sharpening & noise reduction. This results in a pretty flat image, by default. In the below example, the stock camera is the more contrasty vibrant image. The other image is the flatter, desaturated “straight out of camera” image produced by YiMAX-PRO. This isn’t a crop, this is the entire frame scaled to fit the website.
It’s certainly not Log footage. It’s not even Cinestyle. But, it is a much better starting point than the default footage that comes out of the camera. Yes it needs a little work in post to give it some life, but that’s the entire point.
Also, if you want to keep the colour and contrast, but just disable in-camera noise reduction & sharpening, you can do that, too. That’s the beauty of scripts with codes that only span a line or two each. You can enable and disable overrides at will.
But let’s look at some of the options.
This is one of those lines I was talking about with numbers that don’t seem to make any sense. But there are two spots that do.
t ia2 -adj ev 10 0 [vibrance] 0 0 [saturation] 0
The numbers used in the YiMAX-PRO script, and sets vibrance at 140, and saturation at 150. But, you can play around with these according to your own personal preference.
t ia2 -adj ev 10 0 140 0 0 150 0
Shadow/Highlight Clipping & Gamma
This one kinda makes half-sense. The number in the shadow one I don’t understand. It takes a value between 0-255, and the higher the number the brighter the shadows. The number you want to change the one at the end, which is “163” in this example.
t ia2 -adj l_expo 163
Highlight detail is a little easier to understand. Again, it’s a 0-255 number. Here, the lower the number, the sooner highlights blow out to pure white. In this example, the white level is set all the way up to 255 to retain as much highlight detail as possible.
t ia2 -adj autoknee 255
Gamma is set similarly. Again, the number is 0-255.
t ia2 -adj gamma 200
Noise reduction & sharpening
This is one I can’t really explain much about. This is something that Nutsey (the author of YiMAX-PRO and several other Yi scripts) figured out all by himself. Exactly how the numbers work or the consequences of changing them isn’t documented. Yes, I could just try changing them myself and see what happens, but given that the script just works for me right out of the box, I haven’t tried that yet.
It should be possible, however, to remove everything from the YiMAX-PRO script except the bitrate, noise reduction & sharpening settings. This would give you similar contrast and colour to the original camera footage but without the high compression or software artifacts.
The list of things that can be changed is quite long, but finding out the information to get things exactly how you want will require a little legwork. The folks over on the Dashcam Talk forums have put an amazing amount of work into testing this camera’s limits.
For more information on the “t commands” to change how your image looks, check out this thread on Dashcam Talk. Other things you can make your camera do on the GitHub repository include RAW Photo mode, and an FTP Server to download files over WiFi from your camera.
Ready made scripts
XYC, or “Xiaomi Yi Configurator” is a huge script which allows you to telnet into your camera. From there, you are confronted with a menu which allows you to configure things on the fly. It lets you change all the settings the default app won’t allow you to. There’s a hell of a lot of work gone into this one, and it’s probably the most interactive and user friendly script out there for the Yi.
YiMAX-PRO is the script I use. It’s the one I suggest everybody uses when they know they’re going to want to keep the same configuration time after time. I basically have two setups that I use on my Yi cameras (I have 6 of them now). Either I’m shooting 1080p24, or I’m shooting 1080p60. So, I have two copies of YiMAX-PRO on my desktop, each in their own folder. One is modified for 1080p24, the other for 1080p60.
When I know in advance that I need 60fps, I’ll load up all my microSD cards with that script before I head out the door. Otherwise, the 24fps script is transferred to the cards by default after they’re formatted.
So, if you want to be able to randomly change things on the fly and see what stuff does, get XYC. If you know what settings you need and want a good quick starting point, get YiMAX-PRO and customise it to your needs.
What about the new Yi 4K?
The bad news is that there’s very little information out there on hacking the new Yi 4K action camera. The good news is, we may not need it. Yi are getting ready to release the Yi Open API, which would allow us to legitimately override the camera’s settings.
The Yi Open API is aimed at software and hardware developers, which is very cool and interesting news. One of the reasons I have six of the original Yi cameras is for a 360° rig. Not being able to synchronise all the cameras and trigger them at once, is a pain.
Regardless, the Yi HD still costs a little over a third of the price of the new Yi 4K, and if 1080p is all you need, then why not? Of course, the Yi 4K also comes with a built in LCD and double the battery life. So, there are compelling reasons for both cameras.
Where can I find out more?
There’s information darted around the web, but there are several main places I’d recommend for further reading.
- Dashcam Talk Yi Action Camera Forum (this seems to be the main hub for everything Yi hacking related)
- Nutsey’s Blog (Author of YiMAX-PRO)
- PJanisio’s GitHub (autoexec.ash & script archive)
- “t commands” reference
- Official Yi Camera Facebook group
Of course, you can also find out more about the camera itself on the Yi Technology website.
Is that it?
Yeah, I think so. It was difficult to know how much to include in this post, and where to suggest reading more elsewhere. The post could’ve easily been three or four times as long, with a whole bunch of meaningless settings that most people wouldn’t have found that useful. So, I tried to include the most important ones and reference the rest.
I’d originally planned to just get one of the Yi action cameras for the Photokina trip so I wasn’t tying up my phone the whole week. Then, eventually replace it with a GoPro when a good deal came along. After playing with the Yi for a couple of weeks, though, it was an easy decision to not only stick with it, but to get more.
Having several makes shooting behind the scenes footage during shoots a doddle. Instead of having to keep taking breaks to move the camera to other angles, I can just setup a few of them, leave them recording, and cut between them in the edit. Having six is also kind of essential for the 360° rig. Speaking of which, you can download the plans to 3D print your own on thingiverse.
I’m not in any rush to go up to 4K, but the Yi 4K is looking very tempting from what I’ve seen so far.
Do you use either the Yi HD or new Yi 4K action cameras? What do you think of them? Have you come up with any unique hacks for them? Are you facing any challenges with them? Let us know in the comments.