Wednesday, March 22, 2023

Jetson Nano installation

 

Installing cuda11 in Jetson Nano [1]. All instructins works, but doesn't run on it. Better is cuda10.

 

[1] https://jfrog.com/connect/post/installing-cuda-on-nvidia-jetson-nano/

 

 

Errors:

The following packages have unmet dependencies

...
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

Fix:

sudo apt-get -o dpkg::Options::="--force-overwrite" install --fix-broken

 

Tuesday, March 21, 2023

Python and OpenCV issues

Error:

   import cv2, numpy as np,time
 File "/home/fincahuanaco/.local/lib/python3.7/site-packages/cv2/__init__.py", line 3, in <module>
   from .cv2 import *
ImportError: numpy.core.multiarray failed to import

 

Solution:

$ python3 -m pip install opencv-python==4.0.0.21

$ python3 -m pip list  
 

opencv-python          4.0.0.21

numpy                  1.15.0

 

Other combinations

opencv_python==4.4.0.46 and numpy==1.19.3 works.

 

Saturday, March 18, 2023

AWS Python issues

$ curl -O https://bootstrap.pypa.io/get-pip.py
$ python3 get-pip.py --user
 

References:

[1] https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install-linux.html

 

AWS Common commands

 

Without ifconfig command

public IP

$ curl ifconfig.me

private IP

$ ip addr 

References:

[1] https://opensource.com/article/18/5/how-find-ip-address-linux

Friday, March 17, 2023

Vocal Remover

 

[1] AI Vocal Remover and Isolation https://vocalremover.org/

[2] AI Vocal remover, it split in to tracks https://multimedia.easeus.com/vocal-remover/    #2024

[3] Split Music and Vocal https://studio.mikrotakt.app/  #2024

 

Tuesday, February 28, 2023

ffmpeg: Extract audio and reinsert a new for use in whatsapp

 

#Extract audio

ffmpeg -i mad-pi.mp4 -map 0:a:0 mad-pi_audio.wav 

 

#Extract reinsert new audio

ffmpeg -i mad-pi.mp4 -i mad-pi_audiohd.mp3 -c:v copy -map 0:v:0 -map 1:a:0 new.mp4
 

#reencode for whatsapp

ffmpeg -i new.mp4 -c:v libx264 -profile:v baseline -level 3.0 -pix_fmt yuv420p working.mp4

 

Friday, February 17, 2023

Python tools for Web Developers

 

[1] FastAPI https://fastapi.tiangolo.com/

[2] Dash Python https://dash.plotly.com/background-callbacks

 

Wednesday, February 15, 2023

Ringtones: Download mp3

 

 

Resources:

[1] Easy download https://mp3-ringtone.com/

[2] Play and using FireBug download https://www.zedge.net/find/ringtones/2023


Monday, February 13, 2023

ffmpeg: Extract mp3 from video

 

 ffmpeg -i mad-principio_peter.mp4 -vn -y out1.mp3 #9M

 

ffmpeg -i mad-principio_peter.mp4 -f mp3 -ab 192000 -vn out2.mp3 #14M

ffmpeg -i mad-principio_peter.mp4 -f mp3 -ab 128000 -vn out3.mp3 #9M
ffmpeg -i mad-principio_peter.mp4 -vn -acodec libmp3lame out4.mp3 #9M

ffmpeg -i mad-principio_peter.mp4 -acodec libmp3lame -ab 128k out5.mp3 #9M

ffmpeg -i gym.mp4 -f webm -c:v libvpx -b:v 1M -acodec libvorbis gym.webm -hide_banner

Second

ffmpeg -i sample.avi -q:a 0 -map a sample.mp3  #complete
ffmpeg -i sample.avi -ss 00:03:05 -t 00:00:45.0 -q:a 0 -map a sample.mp3 #fraction
Parameters :
-q:a 0 for variable bit rate
-ss starting timestamp
-t  the encoding time (If you don't specify, it will go to the end)
-map 0:a:3 selects audio stream #4 (ffmpeg starts counting from 0) 
** specific the timestamps in HH:MM:SS.xxx format.

 

References:

[1] https://json2video.com/how-to/ffmpeg-course/ffmpeg-extract-audio.html

Friday, December 23, 2022

Download zip file from Google Drive

 First

Share your file in GD (with anybody access by link) and get FILEID

Second

Execute next code(replace FILEID and choose FILENAME):

wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O FILENAME && rm -rf /tmp/cookies.txt

 

Note:

Previous methods doesn't work, because now GD needs confirmation, then using cookies it's possible.

Monday, December 12, 2022

Ubuntu NFS Installation

On Server (10.10.7.229):

$ sudo apt install nfs-kernel-server  #install server

$ sudo mkdir -p /mnt/nfs_drive  #create share point

$ sudo chown -R nobody:nogroup /mnt/nfs_drive  #no owner

$ sudo chmod 777 /mnt/nfs_drive  #set r/w permission

$ sudo vi /etc/exports  #define clients grants
 

/mnt/nfs_drive 10.10.7.218(rw,sync,no_subtree_check) #mine
/mnt/nfs_drive 10.10.7.235(rw,sync,no_subtree_check) #houdini

$ sudo exportfs -a

$ sudo systemctl restart nfs-kernel-server
 

On Client: 

$ sudo apt install nfs-common 

$ sudo mkdir -p /mnt/nfs_drive_client   #mirror

$ sudo mount 10.10.7.229:/mnt/nfs_drive /mnt/nfs_drive_client

Notes: 

$ sudo ufw status  #verify the firewall, more details in reference[0]


References: 

[0] Working https://linuxhint.com/install-and-configure-nfs-server-ubuntu-22-04/

[1] https://www.tecmint.com/install-nfs-server-on-ubuntu/

Wednesday, November 23, 2022

qemu bridge to enable network during simulation

 Install brctl

 sudo apt install bridge-utils

Add new virtual bridge

sudo brctl addbr virbr0
sudo brctl addif virbr0 eth0 

Check

/etc/qemu-ifup and /etc/qemu-ifdown  #files
 

 

 

 

Monday, November 21, 2022

Candide Model Applications

 

[0] Model and code https://github.com/wobushizhanghua/candide3-face/blob/master/src/main.cpp

[1] Landmark 3D https://webspace.science.uu.nl/~veltk101/publications/art/wss06.pdf 

[2] https://github.com/MarekKowalski/FaceSwap

[3] https://github.com/jorticus/face-replace/blob/master/README.md

 

Friday, November 18, 2022

Gimp Python-Fu

 

[0] https://www.gimp.org/docs/python/index.html#PREGION-OBJECT-MEMBERS

[1] https://www.gimp.org/docs/python/index.html#DRAWABLE-OBJECT-METHODS

[2] http://myvirtualbrain.blogspot.com/2012/06/gimp-python-fu-very-basics.html 

[3] Samples https://github.com/jfmdev/PythonFuSamples

[4] https://github.com/gummyCowboy/GIMP-python-fu

[5] https://gist.github.com/garystafford/5259576a7e9299d5b80284489aa25fc3


Tuesday, May 31, 2022

OnLine Animation

[0] gif editor crop, mp4 to gif https://ezgif.com

[1] https://www.powtoon.com/?locale=en

[2] https://www.animaker.com/

[3] https://biteable.com/

 

 

Tuesday, May 10, 2022

Houdini Trying to use textures

 

[1] How to use textures on Houdini

http://wordpress.discretization.de/houdini/home/advanced-2/textures/

[2] Repository of textures with normals

https://opengameart.org/content/50-free-textures-4-normalmaps

[3] Textures for Blender

https://polyhaven.com/textures/brick/outdoor/wall

[4] HDRs (Environment Ilumination patterns) https://polyhaven.com/hdris

Thursday, May 05, 2022

NVIDIA tools

 

 

[1] https://github.com/NVIDIA/warp

https://media.githubusercontent.com/media/NVIDIA/warp/main/docs/img/gifs/nanovdb.gif

Tuesday, May 03, 2022

Ubuntu upgrade cmake

 

1. Download https://cmake.org/download/

2. Unpack and enter to folder to execute commands

./bootstrap
make -j$(nproc)
sudo make install
 

 References

[1] https://askubuntu.com/questions/355565/how-do-i-install-the-latest-version-of-cmake-from-the-command-line

 

Wednesday, April 27, 2022

Ubuntu Forware port 80

  #!/bin/bash iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8069 iptables -t nat -A PREROUTING -i eth0 -p tc...