Skip to content

Instantly share code, notes, and snippets.

View matthijskooijman's full-sized avatar

Matthijs Kooijman matthijskooijman

View GitHub Profile
@matthijskooijman
matthijskooijman / 00Intro.md
Last active September 27, 2022 13:17
GStreamer debugging

Overview

This gist illustrates three problems:

  • Using decodebin insists on producing NV12_32L32 instead of NV12, needing a slow conversion or failing to play without that. Directly connecting v4l2slh264dec to kmssink does negotiate NV12 correctly.
  • Using playbin is slow for an unknown reason. Producing the same pipeline (but flat) runs ok.
  • Using playbin3 runs ok for some files, but for other files it runs for 1-2 seconds and then hangs. decodebin3 is ok for these files.

It seems that decodebin3 does work for all files, so I'll probaly build something with that (but it is still experimental, so maybe this should be fixed in the default versions too?).

Most tests using the https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/1080/Big_Buck_Bunny_1080_10s_5MB.mp4 file from https://test-videos.co.uk/bigbuckbunny/mp4-h264

@matthijskooijman
matthijskooijman / license-tools.txt
Last active May 7, 2022 21:55
License checking tool overview
https://www.npmjs.com/package/oss-attribution-generator
Supports JS. Should be able to generate an attribution file, but shows a
failure after seemingly succesfully processing all dependencies.
Has capabilities for overriding the licenses.
https://github.com/src-d/go-license-detector
Supports Go. Detects the license for a single license folder (returning
certainty / match factor), but does not support dependency
@matthijskooijman
matthijskooijman / debootstrap-list.log
Last active March 3, 2022 08:18
Build logs of failed armbian build for orangepipc
Show variables in function: source [configuration.sh:569]
DEBOOTSTRAP_LIST =:
apt-utils bzip2 ca-certificates console-setup
cpio crda cron dbus
dmsetup fdisk gnupg ifupdown
init initramfs-tools iputils-ping isc-dhcp-client
kmod less libpam-systemd linux-base
locales logrotate netbase netcat-openbsd
@matthijskooijman
matthijskooijman / gist:8273067aa256ced18c1e67bca8cfd0b2
Created February 10, 2021 10:30
Symbols supported by KiCad default font
Ω α ¶ § ⁂ ⌕ ⌁ ↯ ϟ
☞ ⁑ ⁕∗ ⁖ ⁘ ⁙ ⁜ ※ ∵ ∴
↹ ⇄ ⇤ ⇥ ↤ ↦ ◁ ▷
◊ ⌗ ⌜ ⌝ ⌞ ⌟ ⎔ † ‡ ⌘ ⎇ ⌥ ◆ ◇
↵ ⏎ ⎄ ⌫ ⌦ ⌧ ↖ ↘
⇱ ⇲ ⇞ ⇟ ↑ ↓ ← → ◀ ▶ ▲ ▼ ◁ ▷ △ ▽
⇦ ⇨ ⇧ ⇩ ⎙ ⍰ ↺ ↻
∅ ∈ ∉ ⊂ ⊃ ⊆ ⊇ ⊄ ⋂ ⋃ ≠ ≤ ≥ ≈ ≡
⌈ ⌉ ⌊ ⌋ ∑ ∫ × ⊗ ⊕ ⊙
@matthijskooijman
matthijskooijman / jquery.wymeditor.embed.js
Last active January 20, 2021 15:38 — forked from winhamwr/jquery.wymeditor.embed.js
WYMeditor embed plugin with video/source support
/**
* WYMeditor : what you see is What You Mean web-based editor
* Copyright (c) 2005 - 2009 Jean-Francois Hovinne, http://www.wymeditor.org/
* Dual licensed under the MIT (MIT-license.txt)
* and GPL (GPL-license.txt) licenses.
*
* For further information visit:
* http://www.wymeditor.org/
*
* File Name:
@matthijskooijman
matthijskooijman / spec.json
Created December 8, 2020 14:52
MJS2020 solar testje @ DeWAR
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"description": "MJS2020 data",
"data": {
"url": "https://meetjestad.net/data/?type=sensors&ids=2001,2003,2004,2005,2006&begin=2020-12-05,00:00&format=json"
},
"transform": [{"calculate": "datum.extra[9]/1000", "as": "solar"}],
"config": {"mark": {"tooltip": {"content": "data"}}, "point": {"size": 1}},
"facet": {"field": "id"},
"spec": {
@matthijskooijman
matthijskooijman / spec.json
Last active November 17, 2020 09:42
MJS2020 node 2000 graphs
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"description": "MJS2020 data",
"data": {
"url": "https://meetjestad.net/data/?type=sensors&ids=2000,2007&begin=2020-11-07,00:00&format=json"
},
"transform": [{"calculate": "datum.extra[9]/1000", "as": "solar"}],
"config": {"mark": {"tooltip": {"content": "data"}}, "point": {"size": 1}},
"facet": {"field": "id"},
"spec": {
matthijs@tika:~$ lsmod | grep -i conntrack
nf_conntrack_netlink 49152 0
xt_conntrack 16384 244
nf_conntrack_ftp 20480 1 nf_nat_ftp
nf_conntrack 172032 9 xt_conntrack,nf_nat,nf_nat_ftp,xt_state,nf_nat_ipv4,xt_nat,nf_conntrack_netlink,xt_connmark,nf_conntrack_ftp
nf_defrag_ipv6 20480 1 nf_conntrack
nf_defrag_ipv4 16384 1 nf_conntrack
nfnetlink 16384 6 nft_compat,nf_conntrack_netlink,nf_tables,nfnetlink_log
x_tables 45056 14 xt_conntrack,iptable_filter,nft_compat,xt_multiport,xt_NFLOG,xt_state,xt_tcpudp,xt_nat,ipt_REJECT,xt_connmark,ip_tables,xt_limit,ip6t_REJECT,iptable_mangle
libcrc32c 16384 4 nf_conntrack,nf_nat,dm_persistent_data,raid456
var authz = 'Insert value of Authorization header here'
var url = 'https://api.eventix.io/3.0.0/shop/' + new URLSearchParams(window.location.search).get('editing');
function fetch_tickets() {return fetch(new Request(url + '/tickets', {'headers': {'Authorization': authz}})).then(response => response.json())}
function order_tickets(a, b) {return fetch(new Request(url + '/tickets/reorder', {'headers': {'Authorization': authz, 'Content-Type': 'application/json;charset=UTF-8'}, 'body': JSON.stringify({'predecessor': a.guid, 'successor': b.guid}), 'method': 'PUT'}))}
async function sort() {tickets = await fetch_tickets(); tickets.sort((a, b) => a.name.localeCompare(b.name)); for (let i = 0; i < tickets.length - 1; ++i) { await order_tickets(tickets[i], tickets[tickets.length-1])}}
sort()
// Note: Printing fetch_tickets afterwards is not helpful, as the returned list is not sorted itself
// Put this function in RAM to prevent any unpredictable latency from
// loading instructions from flash.
byte BB_SPITransfer (byte c) __attribute__((section(".ramfunc")));
byte BB_SPITransfer (byte c)
{
// Number of cycles between writes to SCK (excluding one SCK write
// but including the other). These counts do not include the delay
// loops. The movs before the delay loop is also not counted,
// since it compensates for the missing cycle on the last branch
// in the delay loop (when it is *not* taken). Note that the PORT