Posts

Showing posts from 2024

Brother HL-L2445DW on Raspberry Pi (ARM) and CUPS

The official Brother HL-L2445DW drivers only support x86 architecture, so even if force installed on an ARM linux, such as the Raspberry Pi, it will not work. During installation, it will show an error message like this: bash linux-brprinter-installer-2.2.3-1 ... dpkg: warning: package architecture (i386) does not match system (armhf) The files are on the system but they will not work. Installing the ARM Raspberry Pi compatible Brother drivers The brlaser project is an open source driver for Brother laser printers. While it does not officially support the HL-L2445DW, there is a workaround. Step 1 - install brlaser  sudo apt-get install printer-driver-brlaser Step 2 - select a different but compatible driver In CUPS, select  Brother HL-L2300D, using brlaser v4 , which is fully compatible with the newer L2445DW.  Done, the printer is not fully operational, including double-sided printing

Convert animated WEBP to MP4

 Animated WebP, similar to animated GIF, is not the best video format to work with, but this is what the usual SVD (image or text to video) and ComfyUI will generate. Unfortunately, FFMPEG does not support WebP to MP4 conversion yet, so this simple frame-by-frame conversation had to be done. As it's generating a PNG for each frame, it's rather slow, so it's only suitable for short animations. The below simple python code converts the animated WebP into MP4, using the predefined FPS. Don't forget to  pip3 install pillow   moviepy import os import shutil import tempfile import argparse from moviepy.video.io.ImageSequenceClip import ImageSequenceClip import PIL.Image def analyse_image (path): im = PIL . Image . open(path) results = { 'size' : im . size, 'mode' : 'full' , } try : while True : if im . tile: tile = im . tile[ 0 ] update_region = t