Skip to content

Instantly share code, notes, and snippets.

View leon-anavi's full-sized avatar

Leon Anavi leon-anavi

View GitHub Profile
@leon-anavi
leon-anavi / audio-ffmpeg.md
Last active September 9, 2024 18:59
ffmpeg extract
  • Extract audio from movie:
ffmpeg -i test.MP4 -ac 2 -f wav test.wav
  • Improve audio
  • Replace the audio in the movie:
ffmpeg -i test.MP4 -i test-fixed.wav -acodec copy -vcodec copy -map 0:v:0 -map 1:a:0 test.mov
@leon-anavi
leon-anavi / vnc-t2.txt
Last active July 25, 2023 09:28
rockchip-rk3399-vnc
root@rock-pi-4b:~# /usr/bin/weston --backend=vnc-backend.so --shell=fullscreen-shell.so --vnc-tls-cert=/etc/freerdp/keys/vnc.crt --vnc-tls-key=/etc/freerdp/keys/vnc.key
Date: 2023-07-25 UTC
[09:27:32.553] weston 12.0.1
https://wayland.freedesktop.org
Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
Build: 12.0.1
[09:27:32.553] Command line: /usr/bin/weston --backend=vnc-backend.so --shell=fullscreen-shell.so --vnc-tls-cert=/etc/freerdp/keys/vnc.crt --vnc-tls-key=/etc/freerdp/keys/vnc.key
[09:27:32.553] OS: Linux, 6.1.38-yocto-standard, #1 SMP PREEMPT Thu Jul 6 18:52:54 UTC 2023, aarch64
[09:27:32.554] Flight recorder: enabled
[09:27:32.554] Using config file '/etc/xdg/weston/weston.ini'
Create PDF from markdown:
pandoc readme.md -f markdown-implicit_figures -s -o readme.pdf
@leon-anavi
leon-anavi / anavi-buttons.dts
Last active January 18, 2021 22:11
dtbo examples
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709", "brcm,bcm2710";
fragment@0 {
target-path = "/";
__overlay__ {
keypad: anavi-buttons {
compatible = "gpio-keys";
leon@leon-desktop-G1:/media/storage/yoe$ bitbake lirc
Setting MACHINE=qemux86-64
/media/storage/yoe/conf/auto.conf has been updated
Setting DOCKER_REPO to yoedistro/yoe-build:buster
NOTE: Started PRServer with DBfile: /media/storage/yoe/cache/prserv.sqlite3, IP: 127.0.0.1, PORT: 32923, PID: 57
Parsing recipes: 100% |###################################################################################################| Time: 0:00:54
Parsing of 3247 .bb files complete (0 cached, 3247 parsed). 4534 targets, 633 skipped, 1 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
@leon-anavi
leon-anavi / Demo 1: Hello
Last active November 4, 2023 03:52
Arduino sketch for I2C mini OLED display
#include <FS.h> //this needs to be first, or it all crashes and burns...
#include <ESP8266WiFi.h> //https://github.com/esp8266/Arduino
// For OLED display
#include <U8g2lib.h>
U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);
const int pinButton = 0;
/**********************************************************************
Demo example for Olimex board eduArdu
Tested with Arduino 1.8.8
Date: 2018/12/12
Description:
This demo is based on IRrecvDumpV2 sketch of the "IRremote" library.
On the terminal you can monitor the input data from IR transmitters.
You will see the infrared protocol and the code.
**********************************************************************/
@leon-anavi
leon-anavi / lircd.conf
Created September 3, 2018 06:37
lircd.conf
# Please take the time to finish this file as described in
# https://sourceforge.net/p/lirc-remotes/wiki/Checklist/
# and make it available to others by sending it to
# <lirc@bartelmus.de>
#
# This config file was automatically generated
# using lirc-0.9.4c(default) on Sat Sep 16 16:51:40 2017
# Command line used: -d /dev/lirc0 /home/pi/lircd.conf
# Kernel version (uname -r): 4.9.41-v7+
#
@leon-anavi
leon-anavi / weston
Created June 6, 2018 21:33
eel_5.0.2
root@raspberrypi3-64:~# systemctl status -l weston
● weston.service - Weston Wayland Compositor
Loaded: loaded (/lib/systemd/system/weston.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-06-06 15:16:00 UTC; 14min ago
Main PID: 434 (code=exited, status=1/FAILURE)
CPU: 42ms
Jun 06 15:16:00 raspberrypi3-64 systemd[1]: Started Weston Wayland Compositor.
Jun 06 15:16:00 raspberrypi3-64 systemd[1]: weston.service: Main process exited, code=exited, status=1/FAILURE
Jun 06 15:16:00 raspberrypi3-64 systemd[1]: weston.service: Unit entered failed state.
@leon-anavi
leon-anavi / Start MediaPlayer
Last active June 6, 2018 14:32
agl-demo-platform-raspberrypi3
[ 340.892035] vc4-drm soc:gpu: failed to allocate buffer with size 6430720
[ 340.899115] vc4-drm soc:gpu: failed to allocate buffer with size 6430720
[ 340.906024] [drm:vc4_bo_create [vc4]] *ERROR* Failed to allocate from CMA:
[ 340.913223] [drm] kernel: 8100kb BOs (1)
[ 340.919570] [drm] V3D: 198428kb BOs (192)
[ 340.926035] [drm] V3D shader: 260kb BOs (65)
[ 340.932464] [drm] dumb: 32kb BOs (2)
[ 340.938865] [drm] binner: 16384kb BOs (1)
[ 340.945161] [drm] RCL: 48kb BOs (6)
[ 340.951527] [drm] BCL: 8kb BOs (2)