Skip to content

Instantly share code, notes, and snippets.

View aakbar5's full-sized avatar

asad akbar aakbar5

View GitHub Profile
@aakbar5
aakbar5 / ffmpeg -- Reduce video size
Last active November 26, 2023 09:51
Video -- Reduce video size
Using FFMPEG
---
ffmpeg -i input.mp4 -s 320x240 -b 64k -vcodec mpeg1video -acodec copy output.mp4
Change parameters to get tradeoff quality and size
- Resolution via -s 320x240
- Bitrate via -b 64k
Using AVCONV
@aakbar5
aakbar5 / set or change the root password in Yocto
Created January 25, 2017 10:55
set or change the root password in Yocto
inherit extrausers
EXTRA_USERS_PARAMS = "usermod -P hello root;"
- This sets the root password to "hello".
- These lines can be added into your core-image-base.bbappend file.
@aakbar5
aakbar5 / GNU_HASH
Created March 1, 2017 12:31
GNU_HASH
Yocto build was showing a warning of "QA Issue: No GNU_HASH in the elf binary".
- The fix was to make sure that linker command line used by the respective application is using parameters used by Yocto build system.
- Just for information $(LDFLAGS) used by Yocto is having -Wl,--hash-style=gnu.
Ref: For inside of GNU_HASH: https://blogs.oracle.com/ali/entry/gnu_hash_elf_sections
@aakbar5
aakbar5 / determine device tree model used by the kernel
Created July 3, 2017 10:34
determine device tree model used by the kernel
# To determine device tree model (dts/dtb) used by the linux kernel
cat /proc/device-tree/model
# For example:
# root@nitrogen6x:~# cat /proc/device-tree/model
# Freescale i.MX6 Quad SABRE Lite Board
@aakbar5
aakbar5 / Video -- Rotate video
Created August 2, 2017 10:30
Video -- Rotate video
avconv -i input.mp4 -vf transpose=1 output.mp4
@aakbar5
aakbar5 / nvidia egl error
Created November 7, 2017 14:35
nvidia egl error from ldconfig
In case you are having ldconfig error in Ubuntu 14.04.5 LTS related to Nvidia EGL use follow fixes
Error
---
/sbin/ldconfig.real: /usr/lib/nvidia-384/libEGL.so.1 is not a symbolic link
/sbin/ldconfig.real: /usr/lib32/nvidia-384/libEGL.so.1 is not a symbolic link
Fix
---
sudo mv /usr/lib/nvidia-384/libEGL.so.1 /usr/lib/nvidia-384/libEGL.so.1.org
@aakbar5
aakbar5 / dts <> dtb
Last active July 7, 2025 22:46
dts <> dtb
# To convert dts file into dtb
<kernel-source>/scripts/dtc/dtc -I dts -O dtb <dts_file> -o <dtb_file>
# To convert dtb to dts
<kernel-source>/scripts/dtc/dtc -I dtb -O dts <dtb_file> -o <dts_file>
# Both of above commands are using dtc built with linux kernel source.
# However you can also use dtc binary comes with ubuntu packages. For this you
# need to install following package:
@aakbar5
aakbar5 / docker tips
Last active January 13, 2026 16:26
Find docker host name, ip and id inside the docker container.
# Incase you are interested to find out docker short, full id, hostname and ip address
# of the running container, execute following commands from inside of your container
# To find out docker container id (short form)
DOCKER_ID=`cat /etc/hostname`
echo $DOCKER_ID
# To find out docker container host name using /etc/hosts
HOST_NAME=`grep $DOCKER_ID /etc/hosts | sed 's/\s/\n/g' | tail -1`
# - grep: search for the line having docker id
@aakbar5
aakbar5 / multiple gcc installation
Last active November 16, 2018 23:13
Manage multiple GCC installations on Ubuntu machine
#
# Commands are tested on Ubuntu 14.04
#
# Issue following command to verify which GCC version is installed
gcc --version
--- OR ---
g++ --version
gcc (Ubuntu 4.8.5-4ubuntu8~14.04.2) 4.8.5
@aakbar5
aakbar5 / multiple python installation
Created November 16, 2018 23:17
Manage multiple Python installations on Ubuntu machine
#
# Commands are tested on Ubuntu 14.04
#
# Install the python3 as Ubuntu 14.04 comes with Python2
sudo apt-get update -y && \
sudo apt-get install python-pip python3 python3-pip
# Let's manage two versions