A few minutes ago I finished a small example that shows how to load and execute unmodified Linux ELF binaries in Windows. Basically, this is the same as Wine, just the other way around. You can download the source code from my github page. The code is very simple and only supports the system calls SYS_write and SYS_exit, just enough to write “Hello, World!” onto the screen. Nevertheless, it shows the basic principle.
Using mplayer, frames can be extracted from videos by simply selecting jpeg (or some other image format) as output driver. If the video is interlaced, a deinterlacing filter like
yadif can be used. However, in this case it is important to add the
scale filter at the end of the list in order to convert to RGB colorspace after deinterlacing.
The complete command looks as follows:
mplayer -vf yadif=1,scale -vo jpeg:quality=95 -nosound file.mpg
Do you know IgorPlug? Back in the old days when computers had RS-232 ports, this was a nice and cheap solution to control the OS and other software with an arbitrary infrared remote control. However, today most PCs do not have these connectors anymore. Fortunately, there is IgorPlug-USB, an IR receiver for USB ports. It uses an 8-bit AVR microcontroller and implements all necessary USB commands in software, as this microcontroller does not support USB natively. In comparison with the RS-232 solution, device drivers are needed in order to communicate with the IgorPlug-USB. Currently, I am using Windows 10 x64, and unfortunately, the original driver that came with IgorPlug-USB does not work with the 64-bit edition of Windows. There are other drivers (this one for example), but they never worked reliably for me. So, I decided to write my own “driver” based on libusb. It is not really a driver, because all the kernel-related stuff is handled by libusb. Therefore, it is very easy to implement and as this comes with a valid digital signature, it can be used without disabling signature checks etc.
The “driver” is designed as a replacement for IgorUSB.dll, so it can be integrated into any software that supports the original driver, e.g., EventGhost (or, maybe, Girder, but I have never tested it). In order to use it, you have to perform the following steps:
- Download Windows binaries for libusb and install one of the recommended drivers as described in their wiki. I use the WinUSB driver, as it comes with Windows and can be installed directly from the device manager (choose Browse my computer/Let me pick from a list of device drivers/WinUsb device)
- Download the new IgorUSB.dll that is used by EventGhost to communicate with the device through libusb.
- Copy IgorUSB.dll to the installation folder of EventGhost.
- Run EventGhost and enjoy!
If you are interested, you can grab the source code and experiment with it. For now, only receiving of IR commands is supported, other functions like setting LEDs are not implemented.
Thanks to Serge, I could fix some bugs and make a new release that should improve compatiblity with the original IgorUSB.dll. I changed the links in this post to point to the new version. Unfortunately, the IR codes reported to EventGhost have changed, so old configuration files won’t work anymore. If you want the old buggy version, you can download it below.
Some people report that the DLL does not work on Windows 10. Unfortunately, libusb-win32 is no longer maintained and is lacking Windows 10 support. I switched to another library called libusb. This slightly changes the installation procedure, because it needs another filter driver. Uninstall the device in the device manager and follow the instructions above to install the new version.
Welcome to my brand-new blog! Here I will write about some projects and the problems I came across when working on them. I hope you have fun with it, please feel free to comment and share your thoughts as much as you can.