Sunday, February 19, 2017

Tuesday, February 14, 2017

Imagemagick: bash split large images into smaller

for f in *.tiff ; do fbase=`echo $f | cut -d '.' -f 1`; echo $fbase; convert -crop 510x510 +repage $f sub/${fbase}_%02d.tiff ; done

Thursday, February 09, 2017

Sunday, January 22, 2017

Monday, January 16, 2017

MPV: Check twitch stream quality and specify one

Get stream format codes and avaliable resolutions youtube-dl -F https://www.twitch.tv/burkeblack
Gives, e.g.: [twitch:stream] burkeblack: Downloading stream JSON
[twitch:stream] burkeblack: Downloading channel access token
[twitch:stream] burkeblack: Downloading m3u8 information
[info] Available formats for 24252344256:
format code extension resolution note
meta mp4 multiple Quality selection URL
Audio_Only mp4 audio only 128k , mp4a.40.2@3561785328572937k
Mobile mp4 400x226 292k , avc1.66.30, mp4a.40.2
Low mp4 640x360 692k , avc1.66.30, mp4a.40.2
Medium mp4 852x480 992k , avc1.77.30, mp4a.40.2
High mp4 1280x720 1760k , avc1.77.31, mp4a.40.2
Source mp4 1280x720 3561k , avc1.4D4020, mp4a.40.2 (best)


Select the quality format you want, and play it. For example, for medium: mpv https://www.twitch.tv/burkeblack --ytdl-format=Medium

Sunday, January 15, 2017

MPV: Play youtube playlist with shuffle and repeat (i.e. loop)

mpv -no-video --shuffle --loop https://www.youtube.com/playlist?list=PL55713C70BA91BD6E