Mostly work related stuff which I would've entered into my "Log book". Instead of hosting it on an intranet site, outsourcing the hosting to blogger!
Wednesday, February 28, 2024
free satellite imagery from Sentinel and other sources
changing the storage limit on onedrive for a particular 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.
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/
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 -
- Select menu Plugins ->Plugin Manager ->Show Plugin Manager
- Check JSTool checkbox, install and restart Notepad++
- 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-
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.
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 -
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,
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.
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.
(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
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.
Wednesday, January 31, 2024
error message for a new user with google sign-in
A new user for our CMS which uses google sign-in got an error message, "ourdomain has not completed the Google verification process ..."
"OAuth user cap
Monday, January 29, 2024
increasing file upload size in Wordpress
On one of our servers running Ubuntu 22.04, Wordpress reported upload size is set to 2 MB. Changed to 50M from 2M in the global php settings at
/etc/php*/8.1/apache2/php.ini - that has fixed the issue.
Sunday, January 28, 2024
email configuration changes on server - app password and <<< for mail command
With google phasing out support for "less secure apps", we had to use "App password" for one of our servers. On PB's terminal on Mac, Ctrl+D was mapped to something else, so we could not use the usual method of the mail command for testing where we end the body with Ctrl+D. Instead, tested by the three less-than symbol to send email, like
mail -s "<Subject>" recipient@something.com <<< "<Mail Body>"Google phasing out password-based SMTP / POP3 / IMAP
We got an email with "[Action Required]", with a link to this blog post from google - https://workspaceupdates.googleblog.com/2023/09/winding-down-google-sync-and-less-secure-apps-support.html
We have used two different methods to deal with this - one solution using XOAuth, and one using App Passwords.
1. For some of our Moodle instances which used Google Workspace emails for outbound emails, we could use the in-built XOAuth support as explained here,
Admins can enable Gmail XOauth2 for outgoing and incoming mail
So I created two separate sets of credentials for one of the email ids, since the redirect url for each (one production and one development) server would be different as mentioned in the documentation linked from the tracker link above -
server.url/admin/oauth2callback.php
Setting up OAuth 2.0 - API Console Help (google.com)
2. For our internal server using ssmtp as mentioned in this earlier post, this procedure (or the use of PHPMailer which supports XOAuth) would not be suitable, since it does not have a public-facing website url.
describes a python solution, but needs refresh, and needs a browser.
)
In passing, the email from google mentions that App Passwords are not going away - "Password-based access (with the exception of App Passwords) will no longer be supported" . We had earlier created App Passwords for use with We can create App Passwords if we enable 2FA. So, we enabled 2FA, created an App Password, and just replaced the password in our earlier ssmtp configuration file with the App Password (without spaces). And that works.
Saturday, January 27, 2024
Firebase notification and action taken
Firebase sent us an email with the information given in this link about email enumeration protection,
https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection
So, enabled the protection for the VV app's projects, following the procedure given in the bottom part of the link above.
Friday, January 26, 2024
sendgrid error after changing settings
When a moodle server had its domain changed, the sendgrid account it used to send password reset emails was still using the old domain. When the "From" email id was changed, sendgrid gave an error,
550 The from address does not match a verified Sender Identity.
Two different ways to verify:
Domain Authentication, which is their preferred way - by adding three CNAME records and one txt record - and
Thursday, January 25, 2024
Merriam-Webster dictionary api and moodle plugin
This moodle plugin "Dictionary" requires a one-time free registration to the Merriam-Webster api at https://dictionaryapi.com/ - they currently provide 1000 free lookups per day per key, and 2 free keys per registration. The plugin uses one key for dictionary, one for thesaurus.
Tuesday, January 23, 2024
spam via Moodle support form, and ways to prevent it
For the first time, I got some spam apparently sent via one of our Moodle servers. This forum thread describes the issue and the solution -
Moodle in English: How to remove link to Contact site support to avoid SPAM | Moodle.org
Instead of commenting out, used the method mentioned lower down in the thread for Moodle 4.1 and above, by going to Site administration --> Server --> Support contact and changing the option to make it available only for logged-in users. Did the same thing for two of our production instances, too.
Friday, January 19, 2024
tech support options for Moodle
Copy-pasting from an email exchange -
(Deleting the part about my availability)
Thursday, January 18, 2024
SheepIt render farm - benchmarks and mini-howto for rendering fluids/particle systems - Blender 3.0 to 3.6
Summary
- Storage used: 971.8 MB
- Cumulated time of render: 9h01m
- Points spent: 5,767 points
- Real duration of render: 1h23m
- On reference per frame rendertime: 0m51s
| CPU | Intel(R) Core(TM) i7 CPU M 620 @ 2.67GHz x4 |
|---|---|
| RAM allowed | 1.3 GB |
| RAM available | 3.9 GB |
| Max render time per frame | |
| Power CPU | 6 % |
| Scheduler | very_slow_computer |
|---|
| CPU | Intel(R) Core(TM) i5-4430 CPU @ 3.00GHz x4 |
|---|---|
| RAM allowed | 4.8 GB |
| RAM available | 8.3 GB |
| Max render time per frame | |
| GPU | GeForce GTX 1050 Ti |
| VRAM | 4.3 GB |
| Compute device | CPU, GPU |
| Power CPU | 34 % |
| Power GPU | 4 % |
| Scheduler | Default |
| CPU | 12th Gen Intel(R) Core(TM) i5-1235U x12 |
|---|---|
| RAM allowed | 2.9 GB |
| RAM available | 8.1 GB |
| Max render time per frame | 1h |
| Power CPU | 72 % |
| Scheduler | Default |
| CPU | Intel(R) Core(TM) i5-4430 CPU @ 3.00GHz x4 |
|---|---|
| RAM allowed | 6.7 GB |
| RAM available | 8.1 GB |
| Max render time per frame | 30 m |
| GPU | GeForce GTX 1050 Ti |
| VRAM | 4.3 GB |
| Compute device | CPU, GPU |
| Power CPU | 46 % |
| Power GPU | 12 % |
| Scheduler | Default |
And finally, here's a youtube video of the rendered output. This is a "Fulldome" video, meant for projection in a planetarium. (Since this is my first effort, the launch needs more work to look more realistic - currently the motion of the rocket looks a bit cartoonish.)
Blender VSE - Video Sequence Editor - and image sequences
A quick note to myself - when importing image sequences into Blender VSE, we must ensure that the files are sorted by name in the file open dialog box (or in whatever order we want them to be) before selecting the relevant images, and then importing. Or else, some jumbled order will result in the imported sequence.
Wednesday, January 17, 2024
Blender render - hard-code metadata like frame number in output
For stamping rocket launch frame number, this page
Font size 12 px by default, which would be extremely small for a 4K frame.
Thursday, January 11, 2024
interesting device to "do your app busy-work for you"
Interesting device, heard about it via theverge because it sold out its first 10k run within 24 hours of launch - https://www.rabbit.tech/
Its USP seems to be that it can save you from having to tap through many clicks on apps using routines which can be launched by the push-to-talk device. If it really delivers on the promises given in the talk in the link above, it might become the "next big thing."
Tuesday, January 09, 2024
blender rendering notes - part 2 - and SheepIt render farm
- As noted in the previous post, time-remapping to make the animation slower does not work well with particle systems, probably because baking is not done for fractional frames. A similar issue is discussed here.
- A gotcha for me was that the keyframes for the rocket animation were not visible in the timeline, but some other keyframes, like the camera field of view animation which I had added, were visible.

So, dragging these keyframes to newer locations further along the timeline was not enough - I had to go to graph editor, and make sure the filters had "Show hidden"
and then the keyframes (after 1000 frames) were visible. - More notes and links to tutorial video timestamps below,
Getting rid of unwanted assets:
playing custom local video playlist from Kodi
The way to play local videos as a playlist seems to be, as per this forum thread,
right-click or C in the Files view to get the context menu for a video file,
choose to queue it,
the file view automatically jumps to the next file in the folder,
right-click or C and choose to queue it and so on,
and when all the required files are added,
left arrow for the hidden menu, choose Go to Playlist,
then choose Save - it will now ask you for a filename for the playlist.
In order to play this playlist, from the home screen,
choose Videos (NOT Movies)
choose Playlists
highlight the desired playlist,
C for context menu, and choose Play.
Or press P to play after highlighting the desired playlist,
after which you have to press TAB for full-screen video without the menu.
List of keyboard shortcuts is at https://kodi.wiki/view/Keyboard_controls
Most of the options like audio device are in the Kodi Settings (gear icon on top of home screen.) LibreElec settings for system name, keyboard layout, etc.
Monday, January 01, 2024
problems with Sony player 4K playback on planetarium dome
We have a Sony HD player for playback of 1080p files - works well for XVID-encoded files. When we had issues with the Firestick for playback, we tried out the Sony UBP-X700 4K Ultra HD Blu-Ray Player even though it was very much more expensive - Rs. 30k compared to the Firestick 4K's Rs. 5k. But unfortunately, it did not work out.
Problems with the Fire TV stick 4K were:
- Using the Amazon Firestick 4K for playout is extremely flaky - since the firestick keeps checking Amazon for updates and auto-updates, sometimes the show stops playing.
- Audio has to be taken from the projector's EP audio out, and has a lot of hiss.
Problems with the Sony were:
- It was starting up in 4K 60 Hz which our projector did not support
- It was changing modes when playing files with different resolutions and frame rates, causing delays and missed frames between files.
So we returned that, and are leaning towards playback using a Raspberry Pi 4.
Edit: Raspberry Pi 4 running Kodi and a pre-owned external USB Lexicon Alpha audio interface is what we're using as of May 2024.
Sunday, December 31, 2023
gpu cpu render time comparison
https://blenderartists.org/t/
rendering tips for Blender - noise threshold
To speed up Blender rendering with cycles -
About noise threshold
https://medium.com/@samuelsullins/your-first-real-render-in-blender-a27d3049d659
(also mentions tip about Lock Camera to View for easily manipulating camera by viewing through it).
For 720p, 100 samples should be plenty,
https://blenderartists.org/t/cycles-how-many-sample-should-i-render/1466873
Recommended workflow now is to set a noise threshold, and allow the number of samples to be dynamically set. - You need to set a time limit.
https://blenderartists.org/t/question-about-noise-threshold-in-3-0/1354392
Friday, December 29, 2023
Thursday, December 28, 2023
Wordpress users unable to log in
Troubleshooting request - admin users got logged out of Wordpress, unable to log in, "reset password also not working".
Rebooting the server has not resolved the issue.
The users shared this page,
https://blog.hubspot.com/website/locked-out-of-wordpress
Reset the password by connecting to the database and editing the users table, getting the MD5 hash of the password using
echo -n testpasswrdreplacewithcorrectone | md5sum
which works fine, tested with
Friday, December 22, 2023
frame repeat / drop bug
Found frames being repeated (or dropped?) with a ~20 minute video processed with OCVvid2fulldome - found duration had reduced from 24 minutes to 22, and also some jerkiness in motion. The github issue is here.
Possibly this is due to using ffmpeg in the backend, and this issue?
https://superuser.com/questions/1255380/ffmpeg-duplicating-frames
ffmpeg seems to assume 25fps input as default for frame sequences, and adds duplicate frames if output is 30 fps. https://gist.github.com/hn-88/95dbd59767dcdff23eab2f2be5880c2f
-fps_mode passthrough
seems to be a workaround when using ffmpeg from the commandline, but when ffmpeg is used via OpenCV, how do we manage this?
generate a video with frame numbers
Using ffmpeg, can use the following
Generate a video of frame numbers. (github.com)
This can be used to test for bugs like this one,
frames being repeated or dropped · Issue #10 · hn-88/OCVvid2fulldome
Tuesday, December 12, 2023
update to Moodle minor update post - stop git from complaining about file permissions changes
Found a couple of issues while upgrading using the steps given in my previous post regarding Moodle minor update using git -
- If we uninstall the h5pactivity built-in plugin before the upgrade, the upgrade does not proceed - it complains about corrupted plugin. So, basically, we can't uninstall the default plugins without causing issues with upgrades.
- If we change the file permissions, we need to add a command
git config core.filemode false
to prevent git from complaining about overwriting local files, listing all the files, and aborting the git pull. Via this post.
So, the updated list of commands:
workflow and supported codecs
Workflow for creating files playable at our theatre using only cross-platform tools.
- ffmpeg to create mp4 file if input is frame sequence - as in this post,
ffmpeg -r 30 -f image2 -i "Our-frame_%06d.png" -vcodec libx264 -crf 15 -pix_fmt yuv420p Our-movie-4k-frames.mp4 - OCVWarp to create warped file. Fourcc of avc1 results in x264 video, good quality.
- Avidemux to edit the warped file, move the credits to the beginning and speed up credits. Also overlay Hindi / Telugu title text as graphics using the logo filter.
- To note: Firestick 4K needs FAT32 formatted disk, which has a 4 GB file size limitation. So, re-encoding files with x265 (HEVC) using the options in the Configure button to choose file-size based codec quality. This takes around 8 hours to encode a half-hour 4K 30 fps video on an i5 laptop!
- Similarly, the older BluRay player needs to have 1080p encoded with XVID fourcc. x263, I guess.
Upcoming - perhaps try AV1 codec?
https://trac.ffmpeg.org/wiki/Encode/AV1
Sunday, December 10, 2023
Moodle server down - restart db server fixed it
Uptimerobot alerted me that one of our Moodle servers was down.
1. automated bot attack
2. some services not restarted properly after an automated system update
3. some other issue triggered by some user action
Right now I'm not digging into the logs for troubleshooting, in case the issue happens again, will do more digging.
We anyway would need a server upgrade some time in the first half of 2024 for operating system upgrades - at that time, I could tighten some of the parameters for better security (like the open ports with default services present currently).
Friday, December 08, 2023
Wordpress permalink issue
One of our servers' site admins reported a problem, with "remove the index.php from the URL" - the standard method of
WordPress dashboard --> Settings --> Permalinks --> "Post Name" Permalink, Save Changes
did not work for them. "File not found" error.
Checked the .htaccess file, it seemed to be OK.
But looking at how Apache handles .htaccess files, found that AllowOverride would be needed for the .htaccess files to work.
Following
https://ubuntu.com/tutorials/install-and-configure-wordpress#4-configure-apache-for-wordpress
added the lines
<Directory /oursrv/path/to/www/wordpress>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
Require all granted
</Directory>
to the relevant files in /etc/apache2/sites-available and then did
sudo service apache2 reload
The admins report that this solved the issue.
Saturday, December 02, 2023
Update your trusted root store for Azure Storage services
We got an email from Azure, asking us to update our trusted root store for Azure Storage services - "If you have client applications that still use certificate pinning, they'll be affected by this change and you'll need to take action by 29 February 2024 to avoid potential connection interruptions."
I don't think any of our apps or services use certificate pinning, so did not take any action.





