Skip to content

Instantly share code, notes, and snippets.

View alopatindev's full-sized avatar

Alexander Lopatin alopatindev

View GitHub Profile

https://wiki.archlinux.org/title/DaVinci_Resolve

$ ffmpeg -i input.mp4 -c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -c:a pcm_s16le -f mov output.mov

This causes a/v desync for me (15 min video). In case if anybody runs into the same, here's the solution:

ffmpeg -threads 16 -fflags '+genpts+igndts' -i input.mp4 -c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -af 'aresample=async=1,asetpts=PTS-STARTPTS' -c:a pcm_s16le -f mov output.mov
@alopatindev
alopatindev / awesome.svg
Created February 24, 2024 10:47
awesome.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// Installation:
// 1. https://violentmonkey.github.io/
// 2. ⚙️ Open Dashboard
// 3. Install from URL => https://gist.githubusercontent.com/alopatindev/e0e2acecc9fd78048f2c5f9057151a50/raw
// ==UserScript==
// @name Remove Youtube Popups
// @namespace https://violentmonkey.github.io/
// @version 0.0.1
// @description Stop attention stealing
@alopatindev
alopatindev / stacktrace.md
Created May 13, 2023 14:11
Audacity crash related to convolve and snd-avg

Stacktrace:

Thread 1 "audacity" received signal SIGSEGV, Segmentation fault.
avg_s_fetch (a_susp=0x5555586e4258, snd_list=0x5555586ea208) at /var/tmp/portage/media-sound/audacity-3.2.5-r1/work/audacity-Audacity-3.2.5/lib-src/libnyquist/nyquist/nyqsrc/avg.c:140
(gdb) bt
#0  avg_s_fetch (a_susp=0x5555586e4258, snd_list=0x5555586ea208)
    at /var/tmp/portage/media-sound/audacity-3.2.5-r1/work/audacity-Audacity-3.2.5/lib-src/libnyquist/nyquist/nyqsrc/avg.c:140
#1  0x000055555634c3c7 in SND_get_first (snd=0x5555586e7040, cnt=0x5555586e5a38)
    at /var/tmp/portage/media-sound/audacity-3.2.5-r1/work/audacity-Audacity-3.2.5/lib-src/libnyquist/nyquist/nyqsrc/sound.c:1093
#2  0x00005555563a78bf in offset_n_fetch (a_susp=0x5555586e59c8, snd_list=0x5555586ea1f0)
@alopatindev
alopatindev / Dark.user.js
Last active May 6, 2023 13:18 — forked from ChandanShakya/Dark.user.js
Greasemonkey / Violentmonkey userscript for day, evening and night color schemes
// ==UserScript==
// @name Dark Reader (Unofficial)
// @icon https://darkreader.org/images/darkreader-icon-256x256.png
// @namespace DarkReader
// @description Inverts the brightness of pages to reduce eye strain
// @version 4.7.15
// @author https://github.com/darkreader/darkreader#contributors
// @homepageURL https://darkreader.org/ | https://github.com/darkreader/darkreader
// @run-at document-end
// @grant none
@alopatindev
alopatindev / upload.sh
Last active January 11, 2022 12:59
Upload specific music to Android device one-liner
IFS=$'\n' ; for i in $(ls --color=no -1 | grep -v Bone | grep -v Future) ; do adb push "$i" "/mnt/sdcard/Music/Steven_Wilson/$i" ; done
diff -ur /var/tmp/hostapd/hostapd/Android.mk ./Android.mk
--- /var/tmp/hostapd/hostapd/Android.mk 2021-08-13 23:32:56.873413502 +0300
+++ ./Android.mk 2021-08-13 23:22:08.955399008 +0300
@@ -4,7 +4,8 @@
ifneq ($(TARGET_SIMULATOR),true)
ifneq ($(BOARD_HOSTAPD_DRIVER),)
WPA_BUILD_HOSTAPD := true
- CONFIG_DRIVER_$(BOARD_HOSTAPD_DRIVER) := y
+ #CONFIG_DRIVER_$(BOARD_HOSTAPD_DRIVER) := y
+ CONFIG_DRIVER_RTW := y
##cvt 3440 1440 60
##xrandr --newmode 3440x1440_60.00 419.50 3440 3696 4064 4688 1440 1443 1453 1493 -hsync +vsync
#xrandr --addmode 3440x1440_60.00 HDMI1
#xrandr --output HDMI1 --mode 3440x1440_60.00
xrandr --output HDMI1 --auto
#xrandr --output HDMI1 --primary
##lcdtest
#arandr
@alopatindev
alopatindev / adb_repull.py
Last active August 12, 2023 17:39
ADB pull emulation for machines with problematic USB ports/cables. Continuously retries and resumes download when disconnection happens.
#!/usr/bin/env python3
# adb-repull.py
#
# ADB pull emulation for machines with problematic USB ports/cables.
# It continuously retries and resumes download when disconnection happens.
#
# Copyright (c) 2018 Alexander Lopatin
#
# Permission is hereby granted, free of charge, to any person obtaining a copy

Keybase proof

I hereby claim:

  • I am alopatindev on github.
  • I am alopatindev (https://keybase.io/alopatindev) on keybase.
  • I have a public key whose fingerprint is 1C98 5509 A5F0 7B4D 4DF3 8BCA 44FB 438E DA18 3EF0

To claim this, I am signing this object: