j-gif
Screen recording to GIF for Python, implemented in Rust.
Frames are captured through Win32 GDI (BitBlt), compressed to JPEG and kept in a native frame store, then encoded to GIF -- all on native threads, so the GIL is never held during recording or export.
FrameStore-- accepts BGRA/RGB frames, stores them JPEG-compressed, exports GIFFrameDecoder-- background decoding for playback over a bounded channelRecordSession-- recording state machine (recording / paused / stopped)
The distribution is j-gif; the module imports as gifrecorder.
import gifrecorder
store = gifrecorder.FrameStore(width, height, fps, jpeg_quality=90)
store.push_bgra(bgra_bytes, elapsed_ms) # once per captured frame
store.export_gif("out.gif", repeat=0)
Playback can start directly at a frame without decoding earlier JPEGs:
decoder = store.start_decoder(display_w=640, display_h=360, start_frame=100)
try:
frame = decoder.next_frame() # (RGB bytes, original elapsed_ms), or None
finally:
decoder.stop()
start_frame defaults to zero. An index at or beyond the end produces an empty
decoder. total_frames counts frames from the chosen start to the end, and
fetched_count starts at zero. Timestamps remain relative to the original recording.
This parameter is available in j-gif 0.3.1 and later.
Windows x86_64 or ARM64, CPython 3.11+ (abi3). Part of jietuba. MIT licensed.
Release files for j-gif 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| j_gif-0.3.1-cp311-abi3-win_arm64.whl | CPython 3.11 | abi3 | Windows ARM64 | Details |
| j_gif-0.3.1-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details |
Total release size:860.1 kB
Release files / j_gif-0.3.1-cp311-abi3-win_arm64.whl
| Download URL | j_gif-0.3.1-cp311-abi3-win_arm64.whl |
|---|---|
| Size | 394.3 kB |
| Tags | CPython 3.11 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
c3f76c74a266dfa4bdbbdacfc484f50a42861aa99307edaafb4d8d9ebf72497a
|
|
BLAKE2b-256 checksum How to use checksums |
7b97795aaf4ba5b0f70ce4cce35b43ace53ad2ca2d65a003d1c3df3658244da2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / j_gif-0.3.1-cp311-abi3-win_amd64.whl
| Download URL | j_gif-0.3.1-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 465.8 kB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
8efc7b18281670523d2f4297cd791547d103b7266bb7ba9af73d979459f11300
|
|
BLAKE2b-256 checksum How to use checksums |
bce053cd96c11a070912d9571605d706db939459d4a36f6128c77929dfb97b20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|