Skip to content

Instantly share code, notes, and snippets.

View aksinghdce's full-sized avatar

Amit Kumar Singh aksinghdce

View GitHub Profile
@aksinghdce
aksinghdce / Strong-Monkey.md
Last active August 24, 2023 05:49
Describing Akaya Project

Training AI with Knowledge from Yoga Principles.

A strong monkey who is learned in ancient Indian scriptures. He's single for life and is ascertained to live for ever. He's a Yogi and knows Tantra, Mantra and 8 powers.

ऊहः शब्दोऽध्ययनं दुःख विघातास्त्रयः सुहृत्प्राप्तिः ।

दानं च सिद्धयोऽष्टौ सिद्धे पूर्वोऽङ्कुशस्त्रिविधः ॥

@aksinghdce
aksinghdce / pdf2png.md
Created June 5, 2023 23:37
Get high quality PNG from PDF

Introduction

Use InkScape to build your illustrations in multiple pages.

Alert: InkScape's older version might not have the page feature.

Save a copy as PDF in high definition (300 dpi if needed)

I am assuming you'd be using these images in a video file composition

@aksinghdce
aksinghdce / command-text-to-speach.md
Created April 29, 2023 00:36
Text to audio in multiple languages and fonts

Install "espeak" tool on your linux machine. The tool also generates IPA (International Phonetic Alphabet)

espeak  "अमित कुमार सिंह"
@aksinghdce
aksinghdce / subtitles-audacity-blender-python.md
Created April 25, 2023 21:52
Code to generate video with subtitles using Audacity, Python and Blender
import bpy
from pathlib import Path
from datetime import datetime
import math

class BlenderVideoEditor:
    def __init__(self):
        '''initialize start_frame and duration of video-synced-audio'''
        self.vsa="/media/amit/4CFC-8D04/DCIM/1"
@aksinghdce
aksinghdce / blender-install-python-packages-modules.md
Created April 12, 2023 05:00
Blender : Install python modules for use in blender python environment

While working on Media Production workflow

We tend to need python modules developed by the community for use in our own python code. To install python modules we need a pip package that would integrate with the python bundled with blender package.

This video shows how to do that:

  1. Get Pip with the python binary that came with blender: https://blender.stackexchange.com/questions/56011/how-to-install-pip-for-blenders-bundled-python : python -m ensurepip --upgrade
  2. Install your python module with this newly installed pip
@aksinghdce
aksinghdce / render-and-upload-to-youtube.md
Created April 9, 2023 20:45
render video with blender and upload to youtube with OAuth2.0 credentials

Code:

#!/usr/bin/env bash
while getopts s:e:t:d:k: flag
do
	case "${flag}" in 
		s) start_frame=${OPTARG};;
		e) end_frame=${OPTARG};;
		t) title=${OPTARG};;
 d) description=${OPTARG};;
@aksinghdce
aksinghdce / blender-with-file-information-video-editor.md
Created April 8, 2023 01:53
Changing resolution in file properties in blender

Question 1: In the code you'd observe there's a lot of room for improvement. Can you spot those and write them in the comment?

import bpy
from pathlib import Path
from datetime import datetime
from datetime import timezone
import math
import exifread
@aksinghdce
aksinghdce / get-gps-and-data-from-image-videos.md
Created April 6, 2023 20:46
Get GPS and Other Data from Image taken from Camera

Look at the method : def readExif(self) of class BlenderVideoEditor:

I needed to install exifread. To install exifread, I had to located the python binary in blender installation folder. From there I ran the command

./python3.10 -m ensurepip --upgrade

./pip3.10 install exifread

@aksinghdce
aksinghdce / hi-optitransv2-ibus-keyboard-help.md
Created April 6, 2023 17:03
Hindi typing keymap text file | m17n hi-optitransv2
;; hi-optitransv2.mim -- Hindi input method.
;; Copyright (C) 2015 Vishvas Vasuki <vishvas.vasuki@gmail.com>
;; This file is part of the m17n database; a sub-part of the m17n
;; library.
;; The m17n library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public License
;; as published by the Free Software Foundation; either version 2.1 of
;; the License, or (at your option) any later version.
@aksinghdce
aksinghdce / 4k-videos-from-camera-storage.md
Created April 3, 2023 19:03
4K Videos from Camera DCIM folders
import bpy
from pathlib import Path
from datetime import datetime
from datetime import timezone
import math
# sequence_editor.sequences_all["178"].transform.rotation
# Song : https://www.youtube.com/watch?v=SKahWKxIzYI
class BlenderVideoEditor:
    def __init__(self):