Ximode - Normal (Script for daylight/everyday usage)

Tanckom

Active Member
Joined
May 1, 2016
Messages
179
Reaction score
61
Country
Germany
LAST UPDATE: 11.05.2016

Hello, so i wanted to create (since Xiaomi is kinda lazy) the missing features for the Xiaomi camera.
The missing feature in my opinion is, that you need to create for yourself for every purpose your own script, if you don't want to use everything in auto-mode (which can be frustrating).
This script is aiming at the new users (also experienced users - who are looking for new tweaks)who just recieved a Xiaomi and recieve with this "complete package" everything they need to start off with their new cam.

So my goal is to create out of several tests, scripts and modes one complete configuration, where all scripts shall be used with the Yiplus Script (Yiplus is a script where you can switch between scripts without pc/smartphone - this is done by only clicking once, two times, three times,... etc. on a button to load a script.

However to create a script which is really good for 80% of the people, i need some help from you, to tell me what shall be edited etc. (You will be added in sources).
p.s. THIS shall not be an Yimax script for using a software later, this should be used to film normal videos which can be edited, but don't need to.

#XIMODE Normal
#Mode: Normal (Mode for daylight/everyday usage)

#-------------------------------------------------------------
#Version: 1.0
#Date: 11.05.2016
#Author: Tanckom
#Sources: Yimax(by nutsey), PJanisio, Dashcamtalk, (Based on Yimax), strAvus
#Description: This script is made for the normal user who wants to film outside/inside
#in daytime/ pre-evening. Record in ~60fps when the video is too dark, record in ~30fps
#when the video is too bright.
#Mode made for normal videos, which can be used for postprocessing. (not same as Yimax!!!)
#-------------------------------------------------------------
#Firmware to use with: Custom 35Mbit 1.2.13 Firmware (by Fried )
#Tested on: SN23A
#-------------------------------------------------------------
#Side note: Booting takes around 17 seconds. During booting the blue front LED flashes several times
# until the long beep arrives which indicates that the script has been succesfully loaded.

#+++++++++ BITRATE AND RESOLUTION ++++++++++

#2304x1296p30 35Mbit
writew 0xC05C1EB2 0x420C

#1080p60 35Mbit
writew 0xC05C1EE2 0x420C

#1080p48 35Mbit
writew 0xC05C2452 0x420C

#1080p30 35Mbit
writew 0xC05C1F72 0x420C

#1080p24 35Mbit
writew 0xC05C2492 0x420C

#720p120 35Mbit
writew 0xC05C2812 0x41F0

#++++++++++++ CORRECTIONS - PHOTO ++++++++++++++++

#ISO, SHUTTER SPEED, GAIN CONTROL
#ONLY SET A FIX VALUE IF NEEDED, OTHERWISE DONT TOUCH IT!
#FIRST VALUE: ISO (100,200,400,800,1600,3200,6400,12800,25600) (Don't go higher than 1600
#otherwise Noise!)
#SECOND VALUE: Shutter Speed 0 == automatic, 1==7.9s, 8==7.7f, 50==6.1s. 100==4.6s, 200==2.7s,
#400==1sec, 590==1/3sec, 600==1/5sec, 800==1/10sec, #900==1/15sec, 1000==1/30sec, 1100==1/50sec,
#1145==1/60sec, 1200==1/80sec, 1275==1/125sec, 1300==1/140sec, 1405==1/250sec, 1450==1/320sec,
#1531==1/500sec, #1607==1/752sec, 1660==1/1002sec, 1788==1/2004sec, 1800==1/2138, 1900==1/3675,
#2000==1/6316, 2047==1/8147 (EXIF value)
#Best shutter speed: 1/30 and 1/50
#THIRD VALUE: Gain control (adding more light to the sensor -> adding noise ) Values: 6,12,18 (6 f.ex. increase two times light signal)
#t ia2 -ae exp 800 1000 0

#++++++++++++ CORRECTIONS - VIDEO ++++++++++++++++

#vibrance/saturation adjustments, Value: 0-255
#t ia2 -adj ev 10 0 vibrance 0 0 saturation 0
t ia2 -adj ev 10 0 140 0 0 150 0

#shadow clipping adjustments Values: 0-255, higher value, more "light" in the video
#this makes blacks not crushed
t ia2 -adj l_expo 163

#highlighting ,Values: 0-255, lower value, more "light" in the video
#this gets back the highlights
t ia2 -adj autoknee 255

#set gamma level - makes picture darker, more highlights? - values [0~255]
t ia2 -adj gamma 200

#enable 1/13/14/34/38 scene modes: auto/landscape/portrait/through_glass/car_DV
#It is said on dashcamtalk that scene 14 is best (true???)
t cal -sc 14

#fix ae/awb/af/adj 0:eek:n 1:eek:ff + IMPROVED HIGHLIGHTS script by nutsey
t ia2 -3a 1 0 0 1
t ia2 -awb off

#Disable vignettecorrection - v:video mode, s: still mode - enable 0:disable,1:enable
#t ia2 -vnc v 1

#++++++++++++ QUALITY CORRECTIONS ++++++++++++++++

#enable raw+jpeg stills
t app test debug_dump 14
sleep 8

t gpio 6 sw out1
sleep 1
t gpio 6 sw out0

#Set JPEG quality to 100%
t cal -jqlt 100
sleep 1

#noise reduction 0:no reduction(noisy but sharper)/16383:full noise reduction(no noise but less sharp)
t ia2 -adj tidx -1 1024 -1
sleep 1

t gpio 6 sw out1
sleep 1
t gpio 6 sw out0

#set sharpness for video mode
t is2 -shp mode 0
#t is2 -shp fir 100 0 0 0 0 0 0
t is2 -shp max_change 5 5
t is2 -shp cor d:\coring.txt
sleep 1

#++++++++++++ ANYTHING ELSE ++++++++++++++++

#4GB no split files
writew 0xC03A8620 0x2004

#cleanup
lu_util exec rm /tmp/fuse_d/DCIM/100MEDIA/*_thm.mp4
lu_util exec rm /tmp/fuse_d/DCIM/100MEDIA/*.THM

#+++++++++++++ FINISHED +++++++++++++

t gpio 6 sw out1
sleep 1
t gpio 6 sw out0

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

 

Attachments

  • Ximode_Normal_1.0.zip
    2.3 KB · Views: 53
Last edited:

criogix

New Member
Joined
Apr 12, 2016
Messages
14
Reaction score
1
Country
Spain
This is exactly what I need but on my 22L it does nothing, it doesn't load.... Any ideas what it might be?
 
OP
Tanckom

Tanckom

Active Member
Joined
May 1, 2016
Messages
179
Reaction score
61
Country
Germany
This is exactly what I need but on my 22L it does nothing, it doesn't load.... Any ideas what it might be?
Had the same issue with this one too, however solved it, will upload tomorrow the working script ( since I'm on my phone right now)
 
OP
Tanckom

Tanckom

Active Member
Joined
May 1, 2016
Messages
179
Reaction score
61
Country
Germany
Has been updated and works now. Forgot to change format from Dos/Windows to UNIX
 

criogix

New Member
Joined
Apr 12, 2016
Messages
14
Reaction score
1
Country
Spain
I confirm I can finally hear the beep!!! Later on I'll test the quality. THANK YOU!!!!
 
Top