These are some ffmpeg command lines used when developing VHS dubbing controller.
HLS Stream (on Linux)
#!/bin/bash # Stream a PAL 50i capture, cropped and de-interlaced using ffmpeg
|; Switch output between headphones and speakers in Asus Xonar STX Control Panel|
|; On Linux can be done through easily through the ALSA command line tools, but on Windows it's GUI all the way down|
|; This assumes the Xonar Essence STX Audio Center is already running|
|SetTitleMatchMode, 3 ; Exact match|
|ControlWindowTitle := "Xonar Essence STX Audio Center"|
This is a collection of code snippets for various features on the STM8S family microcontrollers (specifically the STM8S003F3). These are written against the STM8S/A SPL headers and compiled using SDCC.
Some of this controller's functions aren't particularly intuitive to program, so I'm dumping samples for future reference here. These are based on the STM8S documentation:
This specific part doesn't work out of the box with the OpenCM3 STM32 F0 USB example/testcase for two reasons:
This is a technique for extracting all imported modules from a packaged Python application as
.pyc files, then decompiling them. The target program needs to be run from scratch, but no debugging symbols are necessary (assuming an unmodified build of Python is being used).
This was originally performed on 64-bit Linux with a Python 3.6 target. The Python scripts have since been updated to handle pyc files for Python 2.7 - 3.9.
In Python we can leverage the fact that any module import involving a
.py* file will eventually arrive as ready-to-execute Python code object at this function:
PyObject* PyEval_EvalCode(PyObject *co, PyObject *globals, PyObject *locals);
|-- LR imports|
|local LrApplication = import("LrApplication")|
|local LrApplicationView = import("LrApplicationView")|
|local LrBinding = import("LrBinding")|
|local LrDevelopController = import("LrDevelopController")|
|local LrDialogs = import("LrDialogs")|
|local LrExportSession = import("LrExportSession")|
|local LrFileUtils = import("LrFileUtils")|
|local LrFunctionContext = import("LrFunctionContext")|
|local LrLogger = import("LrLogger")|
This is a first pass at reading the date and time from a serial GPS device on a tiny microcontroller. The target device is an ATTiny13A with only 64 bytes of RAM, which isn't enough to store the full 79 characters of a NMEA sentence, so something like minmea wouldn't work (their API passes around full sentence strings).
When compiled with
avr-gcc -Os, this is around 500 bytes of program space.
The size can be reduced by 100 bytes if the handling of checksums is removed.