djcev.com

//

Memory / Work / Dotfiles

Created , last updated . Source file.
Tags: , , , .

See https://djcev.com/git/dotfiles/ .

Test if xscreensaver has blanked or locked the screen

xs="$(xscreensaver-command -time | grep -E ' blanked| locked')"
[ ! -z "$xs" ] && printf "yes, we're locked\n"

Japanese-locale MS Windows software & wine

LC_ALL=ja_JP.UTF-8 LANG=ja_JP.UTF-8 wine jasoftware.exe

Extracting icons from .exe files

wrestool -x -t 14 file.exe > file.ico
wrestool file.exe # to list all resources in file.exe

TTS

Old Google TTS link. Doesn't seem to work now.
http://translate.google.com/translate_tts?tl=en&q=

Disc Burn Instructions

Good discs include Verbatim 98909 (BD-R M-Disc, expensive) and Verbatim 97457 (BD-R HTL, a bit less than $1 per disc). See https://club.myce.com/t/is-verbatim-model-97457-truly-htl/313023.

mkisofs -iso-level 3 -J -r -V 'VolumeID.Date' -o disc.iso disc
mkisofs -udf -allow-limited-size -iso-level 3 ...   # for large files
dvdisaster -c -mRS03 -i disc.iso                    # pad disc image
dvd+rw-format -ssa=1G /dev/cd0                      # format BD: 1G spare
cdrecord dev=5,1,0 speed=1 -dao disc.iso            # for CD
cdrecord dev=5,1,0 speed=1 -v -dao -audio *.wav     # for CD Audio
growisofs -speed=1 -dvd-compat -Z /dev/cd0=disc.iso # for DVD
growisofs -speed=1 -Z /dev/cd0=disc.iso             # for BD

ffmpeg x11grab

Screencasting with ffmpeg tutorial
https://forums.freebsd.org/threads/screencasting-with-ffmpeg-tutorial.23826/

ffmpeg -f x11grab -video_size cif -framerate 25 -i :0.0 test2.mpg

gm=(xwininfo | grep 'geometry')
ffmpeg -video_size $(echo gm | grep -Eo '[0-9]+x[0-9]+') \
    -framerate 30 \
    -f x11grab \
    -i :0.0+$(echo gm | grep -Eo '[0-9]+\+[0-9]+' | sed s/+/,/),nomouse \
    -c:v libx264 -qp 0 -preset ultrafast -profile:v high444 \
    capture.mov

Berserk VHS opening to webm

ffmpeg -i \[Soyokaze]\ Berserk\ -\ 13-16\ \[VHS].mkv \
    -ss 01:12:09.859 -to 01:13:19.761 \
    -c:v libvpx -b:v 512K -g 64 \
    -c:a libvorbis test2.webm