Yi hacked resolution 2304x1296 30fps 35Mbits

This is my approach to as immersive footage as possible. Recorded at 1600x1200 60p with lens rectification off(!). Then rectified, cropped and resized to 1920x1080 without losing the horizontal field of view with perfectly straight-lined image. This is different of the superview idea presented here - to stretch 4:3 footage to 16:9. I like to have correct proportions of the image which my way does ;).

autoexec.ash
Code:
#mode 1600x1200
writeb 0xC06CC426 0x0C
#mode 0x0C resolution set to 1600x1200
writel 0xC05C2D7C 0x04B00640
#set bitrate 30 Mbps
writew 0xC05C2092 0x41F0

#set noise reduction value to 50
t ia2 -adj tidx -1 50 -1
sleep 1

#ready beep
t pwm 1 enable
sleep 1
t pwm 1 disable


Virtual Dub processing file .vdf
Code:
VirtualDub.video.SetInputFormat(7);
VirtualDub.video.SetOutputFormat(7);
VirtualDub.video.filters.Clear();
VirtualDub.video.filters.Add("resize");
VirtualDub.video.filters.instance[0].Config(100,100,1,4,3,1,2200,1650,4,3,1,0,1,0x000000);
VirtualDub.video.filters.Add("Barrel Distortion");
VirtualDub.video.filters.instance[1].Config("-0.14000", "0.01500", 1,1,1,1 );
VirtualDub.video.filters.Add("null transform");
VirtualDub.video.filters.instance[2].SetClipping(228,334,228,334);
VirtualDub.video.filters.Add("resize");
VirtualDub.video.filters.instance[3].Config(1920,1078.9,0,16,9,1,320,240,4,3,0,7,2,0x000000);
VirtualDub.audio.filters.Clear();

Get the Barrel Distortion filter here: http://emiliano.deepabyss.org/

 
Hi ondrascz, and welcome to the forum :) I like the video, thanks for sharing. I'm downloading virtualdub and filters now, and will probably give it a try later.
 
Hi guys, and possibly @funnel :)

I'm on firmware 1.2.13 on XiaoYi 23A, and looking at your bitrates have this in my autoexec:
Code:
writew 0xC05C1EB2 0x420C
writel 0xC05C2CB4 0x05A00A00

It basically takes the addresses for 2304x1296 30P 16:9 and sets:
Bitrate = 35Mbps
Resolution = 2560x1440

So, I'm getting 2560x1440 @ 35Mbps files on my Xiaomi Yi.

My question is: Are those videos only upscaled from 2304x1296, or are they actually filmed in that resolution?
EDIT: And another question, if it's only upscaled, is there a way of enabling natively 2560x1440? I'm aware that the app might crash, I couldn't find answers on search
 
Last edited:
...i mean the 2506x1440 are upscaled after recording.
I als0 have no chance to set that resolution via script, i tested many times.
Code:
2560x1440 30fps to 50 mbps
#writeb 0xC06CC426 0x00
#writew 0xC05C1E52 0x4248
LG
gente
 
And how to turn on the resolution 2506x1440 on the App ? I have version App. 2.1.1. on my phone , so I can select it as a resolution for recording?
 
And how to turn on the resolution on the App ? I have version 2.1.1. on my phone , so I can select it as a resolution for recording?
As far as I'm aware there is no way to set it via the App, I'm effectively setting it in autoexec.ash to overwrite those values for 2304x1296 @30fps, so the videos I get are 2560x1440, 35Mbps @30fps, but not sure if upscaled or real.

I could speculate that the resolutions are hardcoded in the app, or maybe the app is getting them somewhere from the firmware (although unlikely)
 
And how to turn on the resolution 2506x1440 on the App ? I have version App. 2.1.1. on my phone , so I can select it as a resolution for recording?
...only setting via script, but the script crashes while booting...
 
And I ask this script to test ? crashes do not understand this device :) ? but the script itself sits at loading :) ? please link to the script :) thanks.
 
2560x1440 30fps to 50 mbps
#writeb 0xC06CC426 0x00
#writew 0xC05C1E52 0x4248
@gente What does this line mean?
Code:
#writeb 0xC06CC426 0x00
Where is that address from?

@blacki2015 If you put the two lines from my post in your autoexec.ash, and have 2304x1296 @30fps @High quality set into the App, the resulting videos should be 2560x1440 @35Mbps
Just be careful of the firmware version and the hardware version, and make sure to have a newline at the end of your autoexec.ash
 
Last edited:
#VIDEO MODE 0x00
#default resolution
2560x1440 30fps to 50 mbps
#writeb 0xC06CC426 0x00
#writew 0xC05C1E52 0x4248

Ok ??
 
#VIDEO MODE 0x00
#default resolution
2560x1440 30fps to 50 mbps
#writeb 0xC06CC426 0x00
#writew 0xC05C1E52 0x4248

Ok ??
Not quite.
The "#" sign means comment, if you write stuff without it that makes no sense to the camera, it will crash.
For example, do this:
0. Make sure you're running 1.2.13
1. From the app, select the highest setting on video mode, 2304x1296 @30fps.
2. In settings, make sure it's set on Video Quality: High
3. For safe measure, make the camera start in Video Mode
4. Download a pre-existing autoexec.ash or make your own. Just make sure you know what you're doing with the newline. Use Notepad++ for safe results. Bottomline, make sure that you know how to write an autoexec.ash file that actually works.
5. Put autoexec.ash in the root of your SD card.
6. Put these two lines at the beginning of the file:
Code:
writew 0xC05C1EB2 0x420C
writel 0xC05C2CB4 0x05A00A00
... this will give you 2560x1440 @35Mbps
If you want 50Mbps, replace the first line with:
Code:
writew 0xC05C1EB2 0x4248

The first line overwrites bitrate for selected resolution (in this case 2304x1296)
The second line overwrites the resolution value, turning 2304x1296 in 2560x1440, but I'm not sure if upscaled or real.
More info here:
https://github.com/PJanisio/Xiaomi_Yi_autoexec/tree/master/bitrate/1.2.13

EDIT: 50Mbps can be dangerous, it can heat up the camera quite a lot, and have crappy results if you have a lower class SD card
 
This is my approach to as immersive footage as possible. Recorded at 1600x1200 60p with lens rectification off(!). Then rectified, cropped and resized to 1920x1080 without losing the horizontal field of view with perfectly straight-lined image. This is different of the superview idea presented here - to stretch 4:3 footage to 16:9. I like to have correct proportions of the image which my way does ;).

autoexec.ash
Code:
#mode 1600x1200
writeb 0xC06CC426 0x0C
#mode 0x0C resolution set to 1600x1200
writel 0xC05C2D7C 0x04B00640
#set bitrate 30 Mbps
writew 0xC05C2092 0x41F0

#set noise reduction value to 50
t ia2 -adj tidx -1 50 -1
sleep 1

#ready beep
t pwm 1 enable
sleep 1
t pwm 1 disable


Virtual Dub processing file .vdf
Code:
VirtualDub.video.SetInputFormat(7);
VirtualDub.video.SetOutputFormat(7);
VirtualDub.video.filters.Clear();
VirtualDub.video.filters.Add("resize");
VirtualDub.video.filters.instance[0].Config(100,100,1,4,3,1,2200,1650,4,3,1,0,1,0x000000);
VirtualDub.video.filters.Add("Barrel Distortion");
VirtualDub.video.filters.instance[1].Config("-0.14000", "0.01500", 1,1,1,1 );
VirtualDub.video.filters.Add("null transform");
VirtualDub.video.filters.instance[2].SetClipping(228,334,228,334);
VirtualDub.video.filters.Add("resize");
VirtualDub.video.filters.instance[3].Config(1920,1078.9,0,16,9,1,320,240,4,3,0,7,2,0x000000);
VirtualDub.audio.filters.Clear();

Get the Barrel Distortion filter here: http://emiliano.deepabyss.org/

Nice effect @ondrascz could you please explain more detailed virtualdub process for those like me who are not use to it, with a video or even screenshots... no rush obviously.. :)
 
@gente What does this line mean?
Code:
#writeb 0xC06CC426 0x00
Where is that address from?

@blacki2015 If you put the two lines from my post in your autoexec.ash, and have 2304x1296 @30fps @High quality set into the App, the resulting videos should be 2560x1440 @35Mbps
Just be careful of the firmware version and the hardware version, and make sure to have a newline at the end of your autoexec.ash
@gente What does this line mean?
Code:
#writeb 0xC06CC426 0x00
Where is that address from?

@blacki2015 If you put the two lines from my post in your autoexec.ash, and have 2304x1296 @30fps @High quality set into the App, the resulting videos should be 2560x1440 @35Mbps
Just be careful of the firmware version and the hardware version, and make sure to have a newline at the end of your autoexec.ash
...you upscale it from 1920x1080p with writel to 1440p and i set the original resolution with writeb, seems more quality. Study the forum, you're confusing because what.
But the camera do not set that resolution, for whatever reason.
LG
gente
 
The max sensor resolution is 2304x1296, so yes 2560x1440 is definetly upscaled. But you can do that if you want for some reason.
 
...you upscale it from 1920x1080p with writel to 1440p and i set the original resolution with writeb, seems more quality. Study the forum, you're confusing because what.
But the camera do not set that resolution, for whatever reason.
LG
gente
Thanks, I've seen that line used in several places but haven't seen an explanation. I can't find a reference to that address in the forum or on the github address list, I'll take a look at the binary and/or memory.
 
The max sensor resolution is 2304x1296, so yes 2560x1440 is definetly upscaled. But you can do that if you want for some reason.
Thanks @funnel, except saving time at post-processing, I can't see another reason why anyone would want that, upscaling is generally useless in my opinion.
If the max sensor resolution is 2304x1296, I'm guessing we can't go past that no matter what we do?
 
When I start recording, I have such a spectacle on the microSD card :)
The first file from one to four seconds
data rate 75699kb / s
the bit rate 75877kb / s
Great :)) image quality really knocks great quality !, but so what ... :)
====================================
Next file, the same recording, without stopping, start a new recording, etc. With cameras to record one point e.g. 50 seconds.
>>
system on the same !, creates another file and its data;
Data rate: 31026kb / s
Total bitrate: 31153kb / s - and this is the whole record, and I'd like to have them in quality such as the file "test", which I presented above in terms of quality and quantity of data recorded per second :) and frankly, these short video clips that are impressive :)

Rather, it is not suggesting AutoExec? or the camera itself, as recorded in the files of lower quality.
I ask you, dear colleagues for help and answers as you solve me to have the best image quality and speed of data transmission bitrate :) :))
My custom firmware 1.2.13 is, change them? and add some files to the card? After these first files that have the same record and same without knowing it and stop further part in different quality, wonder what creates such a good quality video recordings and then splits the file and the rest of the records in the inferior quality?

I greet and thank you for your help.
 
Back
Top