Thursday, February 29, 2024

procedure to change state - Indian Driving License

The procedure in this Malayalam video is for changing the state to Kerala, but I suppose a similar procedure would work for changing to another state which is available on the Parivahan Sarathi website.

Notes: Can do renewal and address change in one step.

Parivahan website

Online services -> driving license related

Choose destination state

driving license -> Service on DL (Renewal/Duplicate...)

must be 15 characters when entering DL number - add zeros after year if not.

If doing with renewal, Don't use this!
 
Apply for renewal in the first page.

for renewal.

No need for attestation of documents
just must be smaller than 500 kB

There's also an application status link on the Parivahan Sarathi service.
2-3 days for approval.
~ 1 week for printing and dispatch. (This is for Kerala RTOs).

Wednesday, February 28, 2024

free satellite imagery from Sentinel and other sources

Nowadays we have grown used to Google Maps having high resolution satellite images. But they are copyrighted images and the Google credits need to be shown onscreen if we use it in a planetarium show or something like that. Looking at OpenSpace and its data sources, googled for some free sources of hi-res satellite images - 

for quick and easy temporal images.

for slightly lower resolution, but with older data also

Sentinel images for hi-res
Full global coverage since March 2017. 10, 20 & 60 metre resolutions.

World Imagery Wayback - easy to navigate like google maps, but with ESRI terms of use - allows noncommercial use.
and ESRI World Imagery - up to 3 cm resolution! For free with ESRI terms of use - allows noncommercial use.



changing the storage limit on onedrive for a particular user

Yesterday, I had looked at
portal.azure.com and the Users link there.
In that interface, it only allowed adding of licenses, I did not see the screen for quota changes.

Today, I tried going to admin.microsoft.com
There, I get the option to edit the storage limit for onedrive.
But still, we can only limit it to less than one 1TB, we cannot increase it to more than 1 TB (as per the license being used by that user).

Sunday, February 25, 2024

OCVWarp with frameserving

I tried to incorporate frame-serving via avisynth+ to my OCVWarp workflow described here, so that steps 1 and 2 could be conflated and the rendering time could be halved - most of the rendering time is taken up by the CPU usage of the codec, I believe. But it did not work.

The latest avisynth+ files work with the latest Virtualdub - even 4096x4096 videos are rendered with no problems. But creating a frameserver with Virtualdub and pointing OCVWarp to the frameserver causes OCVWarp to crash/not respond. AVFS also did not help.

append ConvertToRGB24()

But not responding even in vdub.

(
to get avfs to work, had to run 
pfm-192-vapoursynth-win.exe
in an administrator cmd 
)

easily adding a mask with blender using Multiply

If only an opacity mask (like making the sky less bright) needs to be done, we just need to add the layer on top, and choose the Multiply blend under Compositing.



Friday, February 23, 2024

ffmpeg recipes for image slideshows

 Just to bookmark this, I've not tried these out yet - https://stackoverflow.com/questions/24961127/how-to-create-a-video-from-images-with-ffmpeg - where there is a long answer with resizing options, adding audio, etc.

api js formatting - make it readable in Notepad++

Since javascript code obtained from servers is minified and on a single line, it can be difficult to read.

As the top post in this link says, Is it possible to indent JavaScript code in Notepad++? - Stack Overflow

  1. Select menu Plugins ->Plugin Manager ->Show Plugin Manager
  2. Check JSTool checkbox, install and restart Notepad++
  3. Open js file and then go to menu -> Plugins -> JSTool -> JSFormat

link to check if Windows Firewall is blocking something

https://www.wikihow.com/Check-if-Your-Firewall-Is-Blocking-Something

Basically we have to go to Control Panel --> System and Security --> Windows Defender Firewall --> Advanced settings

Another way would be to delete the settings for a particular software or exe, and run it so that the popup comes up again, to enable or disable.

Tuesday, February 20, 2024

emails from microsoft365 bouncing, showing "no such user"

One of our domains runs their emails on Microsoft365/Outlook, and they were unable to send emails to some other domains they own. Some messages would bounce saying "no such user". It turned out that the recipient domain had been added to Microsoft365 as an additional domain, but no users were added under that domain. Also, that domain was actively being used, with MX records pointing to Google Workspace. So, Outlook or Microsoft365 was not looking at the MX records, but instead looking at the internal users with active directory, and deciding that there was "no such user". 

The solution was to remove that recipient domain from Custom domain names - Microsoft Azure

Any other users who had been added to the Microsoft active directory would need to check their inbox on Outlook and not on Google Workspace for any emails sent from our domain on Outlook. This would be relevant for emails being sent from Onedrive, Microsoft Teams, etc. 

Friday, February 16, 2024

DKIM and SPF for a domain using Microsoft Outlook as email provider

One of our domain administrators got an email from Microsoft, "Ensure your email authentication records are set up to avoid mail flow issues to third-party email accounts." Apparently, DKIM was not set up properly.

The page at
Email authentication settings - Microsoft Defender
says,

|Microsoft.Exchange.Management.Tasks.ValidationException|CNAME record does not exist for this config. Please publish the following two CNAME records first.
Domain Name : ourdomain.org
Host Name : selector1._domainkey
Points to address or value: selector1-ourdomain-org._domainkey.ourdomain.onmicrosoft.com

(This is tested and working fine with dig.)


Host Name : selector2._domainkey
Points to address or value: selector2-ourdomain-org._domainkey.ourdomain.onmicrosoft.com

(This record returns SOA. I thought there was something wrong with onmicrosoft.com DNS settings. But probably this record is used only when the key needs to be rotated.) 

I set the DKIM CNAME records as per the email.

The page
Email authentication settings - Microsoft Defender
says sync will take a few minutes to several days. 

After 90 minutes or so, I checked and found DKIM successfully enabled at that page. The page said that it would take several minutes to roll out the changes, so that DKIM signing would commence after a few minutes/hours.

This page
Set up SPF identify valid email sources for your Microsoft 365 domain | Microsoft Learn
says that SPF is already set. And I verified that it is set properly using dig. So that should solve this issue.


Thursday, February 15, 2024

Uploading of Specific Fonts on WordPress with Astra Theme

Copy-pasting from an email exchange:

we were trying to upload special fonts for headings and subheadings in the home page and we could not do it.

Can you pls check if it is related to any file permission issue.
 
Are you trying to install those fonts locally or use them by linking to Google's servers? 

If you are trying to install them locally, you probably may not have the required permissions.

I've now downloaded those fonts and installed them on the wp server locally. Maybe wpastra can pick them up from there. Please check.
 
(When they said it still did not work, I responded as follows:)
 
1. Google fonts can be linked in web pages in such a way that the users of the web pages get the fonts from google and display it on their browsers. If this has to work properly, there are several things which have to be taken care of. Example:

2. Another way in which fonts can be embedded in web pages is using fonts on your web server, like this,

3. Another way in which fonts (any font) can be used is to just define the font, without embedding it - in this case, the font will fail to load if the same font is not present in the user's machine.

Without knowing what you are trying, whether the situation is 1, 2 or 3, I cannot help you further.

If you cannot tell me whether it is 1, 2 or 3, I would need access to a test page where the issue is seen.
 
(And they confirmed that it is working:)
The font issue is resolved, and we can choose the font type from the font family. We found out that we were missing one step for changing the font.


60 fps to 30 fps with ffmpeg without reencoding


ffmpeg -itsscale 2.0 -i input-60fps.mp4 -vcodec copy output-30fps.mp4

(Use the "copy" video codec, and scale the input timestamps using the floating point number 2.0)

Tuesday, February 13, 2024

problems with recording with a laptop's built-in mic

Copy-pasting from an email exchange - 

Sorry, perhaps I should have asked you for a small sample recording before you recorded the whole thing. The audio quality is not great. There is something wrong either with the settings or with your hardware or both.

1. The same issue as last time, the audio sounds as if it has been recorded over a telephone line or something like that - the frequency response falls off after 5kHz, and there is nothing beyond 8kHz - 

 


You can compare that with this recording made with a Zoom H1 recorder,

 


where the frequencies up to 15 kHz and even a little beyond are clearly present.

2. Another bigger problem is that the recording has distortion due to getting clipped - the mic gain was "too hot".
 
(It turned out that the issues were due to recording using the laptop's built-in mic instead of using an Audiogram and a proper mic.)

 

creating stellarium flybys

As mentioned in September last year, Stellarium now has some features which enable creation of flybys. Perhaps Saturn is the most spectacular? Tried out creating two fulldome versions suitable for planetariums, one with Saturn visible at the apex of the dome, and another with Saturn near the front side of the dome, suitable for planetariums with unidirectional seating. 

Code is at https://github.com/hn-88/stellarium-scripts

 




More flybys available via stephanpls at https://github.com/Stellarium/stellarium/discussions/2178



Monday, February 12, 2024

adding SPF record for one of our servers

One of our servers which used to send a few notification emails to us via postfix stopped doing so - status=bounced (host gmail-smtp-in.l.google.com[142.251.2.27] said: 550-5.7.26 This mail has been blocked because the sender is unauthenticated. 550-5.7.26 Gmail requires all senders to authenticate with either SPF or DKIM.

So, set up an SPF record in cloudflare, and all is well again.

optimizing kodi for planetarium projection

By default, Kodi on LibreELEC running on Raspberry Pi 4 was detecting our Optoma ZK 507 projector and setting the output resolution to 4096x2160 @ 30 Hz. This was all right, but our 3840x2160 and 1920x1080 shows were showing a black bar at the bottom. Checking for solutions - not the minimise black bars global setting, but instead, setting the resolution from the comments on this thread, 

https://discourse.osmc.tv/t/howto-guide-to-the-kodi-whitelist-function-and-related-settings/83919

I did not need to make a whitelist or blacklist in Kodi (blacklist is for devices, whitelist is for allowed video modes) - just setting the resolution at Settings --> System --> Display to 3180x2160 @ 30 Hz did the trick. Now, no black bars at the bottom of the FHD or UHD videos. 


Another issue was, hiss in the sound output via a generic USB sound output, when amplified by our sound system. We set up a limiter and a gate with our old Behringer MDX 2200 compressor. Then, for further sweetening, I got a second-hand Lexicon Alpha sound device via bajaao.com for approximately one day's salary, and used that for sound output - no more hiss.

For recognizing the Lexicon Alpha, we had to plug it in after the Raspberry Pi booted into LibreELEC and Kodi - on every reboot. After recognizing the device, a one-time configuration change in Kodi --> Settings --> Audio settings --> Audio device , and set the output device to Lexicon Analog (not Lexicon SPDIF in this case).

Trying a direct connection for the Lexicon Alpha onto the RPi (as against a connection via a USB hub) also did not resolve the issue of not recognizing it on boot. So, we're plugging it in after every reboot (on the USB hub for convenience.) 

Also available -
https://kodi.wiki/view/Settings/System/Audio#Maintain_original_volume_on_downmix
(not directly useful for us, since we're not downmixing all our files)
 

https://kodi.wiki/view/Settings/System/Audio#Volume_control_steps
(set it to the maximum of 50)

And, compression also seems to be available, via specific video's context menu
https://forum.kodi.tv/showthread.php?tid=196313
https://kodi.wiki/index.php?title=Video_playback#Audio_Settings

If this could be a global setting, we could perhaps avoid the hardware compressor, too.

Friday, February 09, 2024

huggingface and making your own customized chatbot for free

Huggingface released a free method to build customized AI chatbots

https://venturebeat.com/ai/hugging-face-launches-open-source-ai-assistant-maker-to-rival-openais-custom-gpts/

That link also discusses some pros and cons - like no web lookups for huggingchat. So, I looked up how we can make our own chatbot, the full detailed step by step process, how much manual work is involved, and what we need to customize it.


(seems to be generated by a chatbot? Not very useful at all.)

(this is good. Need to input data as csv - query and response examples)

(this seems to be the generic steps without customization)

So, link (2.) seems to indicate that we need to train it using a csv file with sample queries and responses. This is something which, for example, a large number of volunteers could generate. If each one generates questions and answers based on one Discourse, for example, 200 or 2000 people could generate quite a good data set.


Thursday, February 01, 2024

IPV6 readiness

A blog post about AWS charging for IPV4 addresses -

We could use AAAA records (IPV6) instead of A records (IPV4) to avoid these charges, since Cloudflare would proxy to IPV4 and IPV6. In case we need to SSH into the servers, and our ISP / router does not support IPV6, then we might need something like this,
 
A and AAAA are auto generated for cloudflare proxied servers.

But for ssh, we will need to use cloudflare tunnels.
Connect private networks · Cloudflare Zero Trust docs 
 
 
According to https://aws.amazon.com/blogs/networking-and-content-delivery/dual-stack-ipv6-architectures-for-aws-and-hybrid-networks/:

    1. Go to your VPC settings and assign a /56 prefix.
    2. Go to subnet settings within the VPC and assign a /64 to the subnet.
    3. Go to the instance's network interface settings and enable IPv6 address assignment. 

Full howto:
 
How to connect to ssh without ipv6, from Amazon console instead of Cloudflare -
(could not try out since my account doesn't have the required permissions.)
 
On Azure it seems to be fairly straightforward to add IPV6
 
Created an ssh tunnel with

Then connect with warp using
 
Probably we don't need warp, only need to make sure the tunnel is to 2222 and not 22.
checking config files as per
change port at ~/.cloudflared/config.yml

But no, we don't have those config files because we created from dashboard - 

Example config at
which is live at
 
There, they talk of a browser rendered terminal.
 

Logged in success with browser-rendered terminal on Edge browser on Windows 11. 
 
Possible pain point - Note is that for each login (with a timeout of 24 hours as the default), we have to copy-paste the private key, in PEM format, into the authentication form. PEM format for the private key is a must. OpenSSH format doesn't work - Browser SSH Private Keys not working - Zero Trust / Access - Cloudflare Community.