FilmKit tackles a problem many Fujifilm X-series camera owners face: how to manage camera presets and perform RAW conversion without relying on bulky desktop software. Instead of pushing RAW processing to the client side, FilmKit cleverly communicates directly with the camera over USB to use its built-in image processor for conversion. This approach reduces client hardware demands and taps into the camera’s native capabilities.
managing Fujifilm X-series presets and RAW conversion via WebUSB
At its core, FilmKit is a TypeScript app running in the browser that interfaces with Fujifilm X-series cameras using the Picture Transfer Protocol (PTP) over WebUSB. It manages camera presets—specifically the native d185 profile format, a 625-byte binary profile used by the camera to store preset data.
The app’s architecture revolves around USB communication via WebUSB, which requires Chromium-based browsers for support. Communication is done using a reverse-engineered PTP implementation that reproduces the proprietary Fujifilm RAW conversion protocol. Rather than processing RAW images client-side (which is CPU-intensive and complex), FilmKit sends commands to the camera to perform the conversion internally, then transfers the processed image back.
A key element is the patch-based profile editing system. Instead of rewriting the entire preset profile, FilmKit only overwrites changed fields, preserving EXIF sentinel values and other unmodified data. This patching helps avoid corrupting the camera’s native preset format and maintains metadata integrity.
Under the hood, the author reverse-engineered the PTP protocol and preset encoding by capturing USB traffic with Wireshark from Fujifilm’s official X RAW Studio software. To decode complex fields—such as the nonlinear encoding of HighIsoNR or conditional writes for Color Temperature and monochrome film modes—the project references related reverse-engineering efforts in rawji, fudge, and libgphoto2.
Currently, FilmKit is tested only on the Fujifilm X100VI but is expected to work with other X-series cameras supporting the same RAW conversion protocol.
reverse engineering and patch-based profile editing under the hood
What sets FilmKit apart is the technical depth in reproducing Fujifilm’s proprietary protocols and profile formats. The code implements a PTP stack over WebUSB, which is non-trivial given the lack of official documentation. The author’s approach to reverse engineering via USB captures is a textbook example of working with closed hardware protocols.
The patch-based editing approach is a thoughtful design choice. The native profile format is 625 bytes long and contains sensitive EXIF sentinel values. Blindly overwriting the entire profile risks corrupting metadata and rendering presets unusable. Instead, FilmKit computes diffs and writes only the changed segments back to the camera.
This tradeoff means the code has to be meticulous in tracking changes and interpreting the binary structure of the profile. It reflects a deeper understanding of the camera’s internals and the risks of manual editing.
The implementation also addresses edge cases in encoding, such as HighIsoNR’s nonlinear scale and conditional writes depending on film simulation modes, which are often glossed over in simpler tools. This attention to detail improves compatibility and reliability.
One limitation is the narrow device testing scope (only X100VI). While the protocol is expected to be compatible with other X-series models, variations or firmware updates could break assumptions. Also, the project does not accept pull requests, limiting community contributions to bug reports and compatibility data submissions.
quick start with browser and udev setup
FilmKit requires a Chromium-based browser that supports WebUSB. On Linux systems, an appropriate udev rule is necessary if running the browser in Flatpak or sandboxed environments to allow USB device access.
The README provides this example udev rule:
SUBSYSTEM=="usb", ATTR{idVendor}=="04cb", MODE="0666"
No additional installation commands or server setups are necessary since FilmKit runs entirely in the browser.
verdict: a niche but instructive tool for Fujifilm X-series enthusiasts and protocol hackers
FilmKit is a specialized tool aimed at Fujifilm X-series camera users who want fine-grained control over presets and RAW conversion without relying on official desktop software. It’s a solid example of reverse engineering a proprietary protocol and delivering an in-browser USB communication solution.
The patch-based profile editing shows attention to the delicate balance between flexibility and safety when dealing with device firmware data. The code’s careful handling of edge cases and binary profile structures is worth studying for anyone interested in USB protocol hacking or camera software internals.
That said, its narrow testing on X100VI and no-PR policy limit its immediate applicability and community-driven evolution. Users should consider it experimental and verify compatibility thoroughly.
Overall, FilmKit solves a real problem with a clever architecture and a practitioner’s eye for detail and tradeoffs. It’s worth exploring for developers interested in WebUSB, camera protocols, or reverse engineering.
→ GitHub Repo: eggricesoy/filmkit ⭐ 395 · TypeScript