![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
A cross-platform High-performance & Flexible Real-time Video Frames Decoder in Python.
DeFFcode - A cross-platform High-performance Video Frames Decoder that flexibly executes
FFmpeg pipeline inside a subprocess pipe for generating real-time, low-overhead,
lightning fast video frames with robust error-handling
in just a few lines of python code ⚡
Highly Adaptive - DeFFcode APIs implements a standalone highly-extensible wrapper around FFmpeg multimedia framework. These APIs supports a wide-ranging media streams as input source such as [live USB/Virtual/IP camera feeds][capturing-and-previewing-frames-from-a-webcam], regular multimedia files, screen recordings, image sequences, network URL schemes (such as HTTP(s), RTP/RSTP, etc.), so on and so forth.
Highly Flexible - DeFFcode APIs gains an edge over other FFmpeg Wrappers by providing complete control over the underline pipeline including access to almost any FFmpeg specification thinkable such as specifying framerate, resolution, hardware decoder(s), filtergraph(s), and pixel-format(s) that are readily supported by all well known Computer Vision libraries.
Highly Convenient - FFmpeg has a steep learning curve especially for users unfamiliar with a command line interface. DeFFcode helps users by providing similar to OpenCV, Index based Camera Device Capturing and the same standard OpenCV-Python (Python API for OpenCV) coding syntax for its APIs, thereby making it even easier to learn, create, and develop FFmpeg based apps in Python.
Here are some key features that stand out:
📚 Documentation: https://abhitronix.github.io/deffcode
If this is your first time using DeFFcode, head straight to the Installation Notes to install DeFFcode on your machine.
Once you have DeFFcode installed, checkout our Well-Documented Recipes 🍱 for usage examples:
Note In case you're run into any problems, consult our Help section.
rotate
filter)transpose
filter)
Live Mandelbrot pattern with a Vectorscope & two Waveforms
As a user, you just have to remember only two DeFFcode APIs, namely:
The primary function of FFdecoder API is to decode 24-bit RGB video frames from the given source:
Note See API Reference for more in-depth information.
# import the necessary packages
from deffcode import FFdecoder
# formulate the decoder with suitable source
decoder = FFdecoder("https://abhitronix.github.io/html/Big_Buck_Bunny_1080_10s_1MB.mp4").formulate()
# grab RGB24(default) 3D frames from decoder
for frame in decoder.generateFrame():
# lets print its shape
print(frame.shape) # (1080, 1920, 3)
# terminate the decoder
decoder.terminate()
The primary function of Sourcer API is to gather metadata information from all multimedia streams available in the given source:
# import the necessary packages
from deffcode import Sourcer
# initialize and formulate the decoder using suitable source
sourcer = Sourcer("https://abhitronix.github.io/html/Big_Buck_Bunny_1080_10s_1MB.mp4").probe_stream()
# print metadata as `json.dump`
print(sourcer.retrieve_metadata(pretty_json=True))
{
"ffmpeg_binary_path": "C:\\Users\\foo\\AppData\\Local\\Temp\\ffmpeg-static-win64-gpl/bin/ffmpeg.exe",
"source": "https://abhitronix.github.io/html/Big_Buck_Bunny_1080_10s_1MB.mp4",
"source_extension": ".mp4",
"source_video_resolution": [1920, 1080],
"source_video_framerate": 60.0,
"source_video_pixfmt": "yuv420p",
"source_video_decoder": "h264",
"source_duration_sec": 10.0,
"approx_video_nframes": 600,
"source_video_bitrate": "832k",
"source_audio_bitrate": "",
"source_audio_samplerate": "",
"source_has_video": true,
"source_has_audio": false,
"source_has_image_sequence": false
}
We're happy to meet new contributors💗
We welcome your contributions to help us improve and extend this project. If you want to get involved with DeFFcode development, checkout the Contribution Guidelines ▶️
We're offering support for DeFFcode on Gitter Community Channel. Come and join the conversation over there!
DeFFcode is free and open source and will always remain so. ❤️
It is something I am doing with my own free time. But so much more needs to be done, and I need your help to do this. For just the price of a cup of coffee, you can make a difference 🙂
Here is a Bibtex entry you can use to cite this project in a publication:
@software{deffcode,
author = {Abhishek Thakur},
title = {abhiTronix/deffcode: v0.2.5},
month = jan,
year = 2023,
publisher = {Zenodo},
version = {v0.2.5},
doi = {10.5281/zenodo.7523792},
url = {https://doi.org/10.5281/zenodo.7523792}
}
Copyright (c) abhiTronix 2021
This library is released under the Apache 2.0 License.
FAQs
A cross-platform High-performance & Flexible Real-time Video Frames Decoder in Python.
We found that deffcode demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.