{"id":15022042,"url":"https://github.com/abhitronix/deffcode","last_synced_at":"2025-04-05T14:05:28.592Z","repository":{"id":43066577,"uuid":"466983374","full_name":"abhiTronix/deffcode","owner":"abhiTronix","description":"A cross-platform High-performance FFmpeg based Real-time Video Frames Decoder in Pure Python 🎞️⚡","archived":false,"fork":false,"pushed_at":"2024-07-08T18:44:57.000Z","size":92893,"stargazers_count":197,"open_issues_count":2,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T14:04:43.761Z","etag":null,"topics":["computer-vision","cross-platform","decoder","decoders","ffmpeg","ffmpeg-decoder","framework","opencv-python","python","python3","realtime","video","video-processing","wrapper"],"latest_commit_sha":null,"homepage":"https://abhitronix.github.io/deffcode","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abhiTronix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"abhitronix","github":"abhiTronix"}},"created_at":"2022-03-07T07:14:21.000Z","updated_at":"2025-04-04T06:46:29.000Z","dependencies_parsed_at":"2025-02-10T16:56:30.080Z","dependency_job_id":null,"html_url":"https://github.com/abhiTronix/deffcode","commit_stats":{"total_commits":284,"total_committers":1,"mean_commits":284.0,"dds":0.0,"last_synced_commit":"d462c5fc078d20064d45f738fb2a33a24920007c"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhiTronix%2Fdeffcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhiTronix%2Fdeffcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhiTronix%2Fdeffcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhiTronix%2Fdeffcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhiTronix","download_url":"https://codeload.github.com/abhiTronix/deffcode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345852,"owners_count":20924102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","cross-platform","decoder","decoders","ffmpeg","ffmpeg-decoder","framework","opencv-python","python","python3","realtime","video","video-processing","wrapper"],"created_at":"2024-09-24T19:57:22.755Z","updated_at":"2025-04-05T14:05:28.563Z","avatar_url":"https://github.com/abhiTronix.png","language":"Python","funding_links":["https://ko-fi.com/abhitronix","https://github.com/sponsors/abhiTronix","https://ko-fi.com/W7W8WTYO'","https://www.buymeacoffee.com/2twOXFvlA","https://ko-fi.com/W7W8WTYO"],"categories":[],"sub_categories":[],"readme":"\u003c!--\n\nDeFFcode library source-code is deployed under the Apache 2.0 License:\n\nCopyright (c) 2021 Abhishek Thakur(@abhiTronix) \u003cabhi.una12@gmail.com\u003e\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n===============================================\n--\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n  ![DeFFcode](https://user-images.githubusercontent.com/34266896/211494454-a16fe5b1-e7d2-44dd-84ba-67b0578611cb.png#gh-light-mode-only)\n  ![DeFFcode](https://user-images.githubusercontent.com/34266896/211494463-a63a03d2-72a6-46bb-b40a-ab485a63674b.png#gh-dark-mode-only)\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![Build Status][github-cli]][github-flow] [![Codecov branch][codecov]][code] [![Azure DevOps builds (branch)][azure-badge]][azure-pipeline]\n\n[![Glitter chat][gitter-bagde]][gitter] [![Build Status][appveyor]][app] [![PyPi version][pypi-badge]][pypi]\n\n[![Code Style][black-badge]][black]\n\n---\n\n[Releases][release]\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;[Recipes][recipes]\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;[Documentation][docs]\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;[Installation][installation-notes]\u0026nbsp;\u0026nbsp;\u0026nbsp;|\u0026nbsp;\u0026nbsp;\u0026nbsp;[License](#copyright)\n\n---\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\nDeFFcode - A cross-platform **High-performance Video Frames Decoder** that flexibly executes \u003cbr\u003eFFmpeg pipeline inside a subprocess pipe for generating real-time, low-overhead, \u003cbr\u003elightning fast video frames with robust error-handling \u003cbr\u003ein just a few lines of python code ⚡\n\n\u003c/div\u003e\n\n\u0026thinsp;\n\n**\u003cins\u003eHighly Adaptive\u003c/ins\u003e -** _DeFFcode APIs implements a **standalone highly-extensible wrapper around [FFmpeg][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][decoding-video-files], [screen recordings][capturing-and-previewing-frames-from-your-desktop], [image sequences][decoding-image-sequences], [network URL schemes][decoding-network-streams] (such as HTTP(s), RTP/RSTP, etc.), so on and so forth._\n\n**\u003cins\u003eHighly Flexible\u003c/ins\u003e -** _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**._\n\n**\u003cins\u003eHighly Convenient\u003c/ins\u003e -** _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**][decoding-camera-devices-using-indexes] and the **same standard [OpenCV-Python](https://docs.opencv.org/4.x/d6/d00/tutorial_py_root.html) (Python API for OpenCV) coding syntax for its APIs**, thereby making it even **easier to learn, create, and develop FFmpeg based apps** in Python._\n\n\u0026nbsp;\n\n### Key features of DeFFcode\n\nHere are some key features that stand out:\n\n- High-performance, low-overhead video frames decoding with robust error-handling.\n- Flexible API with access to almost any FFmpeg specification thinkable.\n- Supports a wide-range of media streams/devices/protocols as input source.\n- Curated list of well-documented recipes ranging from [**Basic**][basic-recipes] to [**Advanced**][advanced-recipes] skill levels.\n- Hands down the easiest [**Index based Camera Device Capturing**][decoding-camera-devices-using-indexes], similar to OpenCV.\n- Easy to code **Real-time [Simple][transcoding-live-simple-filtergraphs] \u0026 [Complex][transcoding-live-complex-filtergraphs] Filtergraphs**. _(Yes, You read it correctly \"Real-time\"!)_\n- Lightning fast dedicated **GPU-Accelerated Video [Decoding][hardware-accelerated-video-decoding] \u0026 [Transcoding][hardware-accelerated-video-transcoding]**.\n- Enables precise FFmpeg [**Key-frame Seeking**][extracting-key-frames-as-png-image] with pinpoint accuracy.\n- Effortless [**Metadata Extraction**][extracting-video-metadata] from all streams available in the source.\n- Maintains the standard easy to learn [**OpenCV-Python**](https://docs.opencv.org/4.x/d6/d00/tutorial_py_root.html) coding syntax.\n- Out-of-the-box support for all prominent Computer Vision libraries.\n- Cross-platform, runs on Python 3.7+, and easy to install.\n\n\u003c!--\n- [x] Lossless Transcoding support with [WriteGear](https://abhitronix.github.io/deffcode/latest/gears/writegear/introduction/). #TODO\n--\u003e\n\n\u0026nbsp;\n\n\u0026nbsp;\n\n# Getting Started\n\n---\n\n**📚 Documentation: https://abhitronix.github.io/deffcode**\n\n---\n\n## Installation:\n\nIf this is your first time using DeFFcode, head straight to the **[Installation Notes][installation-notes] to install DeFFcode on your machine**.\n\n\u003cbr\u003e\n\n\u003cbr\u003e\n\n### Recipes _a.k.a_ Examples:\n\nOnce you have DeFFcode installed, checkout our Well-Documented **[Recipes 🍱][basic-recipes] for usage examples**:\n\n\u003e **Note** In case you're run into any problems, consult our [Help section][help].\n\n### A. [**Basic Recipes 🍰**][basic-recipes]: _Recipes for beginners of any skill level to get started._\n\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://abhitronix.github.io/deffcode/latest/recipes/basic/transcode-live-frames-simplegraphs/#transcoding-trimmed-and-reversed-video\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/34266896/211499038-46cc246d-843b-4c89-8e9a-5536395da9e7.gif\" title=\"Click to view source code\" width=\"70%\" /\u003e \u003c/a\u003e\n  \u003cbr\u003e\n  \u003csub\u003e\u003ci\u003eBig Buck Bunny Reversed using Live Simple Filtergraph\u003c/i\u003e\u003c/sub\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eBasic Decoding Recipes\u003c/b\u003e\u003c/summary\u003e\n\n- [Accessing RGB frames from a video file][accessing-rgb-frames-from-a-video-file]\n- [Capturing and Previewing BGR frames from a video file][capturing-and-previewing-bgr-frames-from-a-video-file] _(OpenCV Support)_\n- [Playing with any other FFmpeg pixel formats][playing-with-any-other-ffmpeg-pixel-formats]\n- [Capturing and Previewing frames from a Looping Video][capturing-and-previewing-frames-from-a-looping-video]\n- [Enumerating all Camera Devices with Indexes][enumerating-all-camera-devices-with-indexes]\n- [Capturing and Previewing frames from a Camera using Indexes][capturing-and-previewing-frames-from-a-camera-using-indexes]\n- [Capturing and Previewing frames from a HTTPs Stream][capturing-and-previewing-frames-from-a-https-stream]\n- [Capturing and Previewing frames from a RTSP/RTP Stream][capturing-and-previewing-frames-from-a-rtsprtp-stream]\n- [Capturing and Previewing frames from Sequence of images][capturing-and-previewing-frames-from-sequence-of-images]\n- [Capturing and Previewing frames from Single looping image][capturing-and-previewing-frames-from-single-looping-image]\n\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eBasic Transcoding Recipes\u003c/b\u003e\u003c/summary\u003e\n\n- [Transcoding video using OpenCV VideoWriter API][transcoding-video-using-opencv-videowriter-api]\n- [Transcoding lossless video using WriteGear API][transcoding-lossless-video-using-writegear-api]\n- [Transcoding Trimmed and Reversed video][transcoding-trimmed-and-reversed-video]\n- [Transcoding Cropped video][transcoding-cropped-video]\n- [Transcoding Rotated video (with `rotate` filter)][transcoding-rotated-video-with-rotate-filter]\n- [Transcoding Rotated video (with `transpose` filter)][transcoding-rotated-video-with-transpose-filter]\n- [Transcoding Horizontally flipped and Scaled video][transcoding-horizontally-flipped-and-scaled-video]\n- [Extracting Key-frames as PNG image][extracting-key-frames-as-png-image]\n- [Generating Thumbnail with a Fancy filter][generating-thumbnail-with-a-fancy-filter]\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eBasic Metadata Recipes\u003c/b\u003e\u003c/summary\u003e\n\n- [Extracting video metadata using Sourcer API][extracting-video-metadata-using-sourcer-api]\n- [Extracting video metadata using FFdecoder API][extracting-video-metadata-using-ffdecoder-api]\n\n\u003c/details\u003e\n\n\u003cbr\u003e\n\n### B. [**Advanced Recipes 🥐**][advanced-recipes]: _Recipes to take your skills to the next level._\n\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://abhitronix.github.io/deffcode/latest/recipes/advanced/decode-live-virtual-sources/#generate-and-decode-frames-from-mandelbrot-test-pattern-with-vectorscope-waveforms\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/34266896/211498819-13fe0487-e843-4315-b4f3-c881de6c8c4a.gif\" alt=\"mandelbrot test pattern\" title=\"Click to view source code\" width=\"70%\" /\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  \u003csub\u003e\u003ci\u003eLive Mandelbrot pattern with a Vectorscope \u0026 two Waveforms\u003c/i\u003e\u003c/sub\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eAdvanced Decoding Recipes\u003c/b\u003e\u003c/summary\u003e\n\n- [Generate and Decode frames from Sierpinski pattern][generate-and-decode-frames-from-sierpinski-pattern]\n- [Generate and Decode frames from Test Source pattern][generate-and-decode-frames-from-test-source-pattern]\n- [Generate and Decode frames from Gradients with custom Text effect][generate-and-decode-frames-from-gradients-with-custom-text-effect]\n- [Generate and Decode frames from Mandelbrot test pattern with vectorscope \u0026 waveforms][generate-and-decode-frames-from-mandelbrot-test-pattern-with-vectorscope-waveforms]\n- [Generate and Decode frames from Game of Life Visualization][generate-and-decode-frames-from-game-of-life-visualization]\n- [Capturing and Previewing frames from a Webcam using Custom Demuxer][capturing-and-previewing-frames-from-a-webcam-using-custom-demuxer]\n- [Capturing and Previewing frames from your Desktop][capturing-and-previewing-frames-from-your-desktop] _(Screen Recording)_\n- [CUVID-accelerated Hardware-based Video Decoding and Previewing][cuvid-accelerated-hardware-based-video-decoding-and-previewing]\n- [CUDA-accelerated Hardware-based Video Decoding and Previewing][cuda-accelerated-hardware-based-video-decoding-and-previewing]\n\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eAdvanced Transcoding Recipes\u003c/b\u003e\u003c/summary\u003e\n\n- [Transcoding video with Live Custom watermark image overlay][transcoding-video-with-live-custom-watermark-image-overlay]\n- [Transcoding video from sequence of Images with additional filtering][transcoding-video-from-sequence-of-images-with-additional-filtering]\n- [Transcoding video art with YUV Bitplane Visualization][transcoding-video-art-with-yuv-bitplane-visualization]\n- [Transcoding video art with Jetcolor effect][transcoding-video-art-with-jetcolor-effect]\n- [Transcoding video art with Ghosting effect][transcoding-video-art-with-ghosting-effect]\n- [Transcoding video art with Pixelation effect][transcoding-video-art-with-pixelation-effect]\n- [CUDA-accelerated Video Transcoding with OpenCV's VideoWriter API][cuda-accelerated-video-transcoding-with-opencvs-videowriter-api]\n- [CUDA-NVENC-accelerated Video Transcoding with WriteGear API][cuda-nvenc-accelerated-video-transcoding-with-writegear-api]\n- [CUDA-NVENC-accelerated End-to-end Lossless Video Transcoding with WriteGear API][cuda-nvenc-accelerated-end-to-end-lossless-video-transcoding-with-writegear-api]\n\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n  \u003csummary\u003e\u003cb\u003eAdvanced Metadata Recipes\u003c/b\u003e\u003c/summary\u003e\n\n- [Added new attributes to metadata in FFdecoder API][added-new-attributes-to-metadata-in-ffdecoder-api]\n- [Overriding source video metadata in FFdecoder API][overriding-source-video-metadata-in-ffdecoder-api]\n\n\u003c/details\u003e\n\n\u003cbr\u003e\n\n\u003cbr\u003e\n\n## API in a nutshell:\n\nAs a user, you just have to remember only two DeFFcode APIs, namely:\n\n### A. FFdecoder API\n\nThe primary function of [**FFdecoder API**][ffdecoder-api] is to **decode 24-bit RGB video frames** from the given source:\n\n\u003e **Note** See [API Reference][ffdecoder-api] for more in-depth information.\n\n```py\n# import the necessary packages\nfrom deffcode import FFdecoder\n\n# formulate the decoder with suitable source\ndecoder = FFdecoder(\"https://abhitronix.github.io/html/Big_Buck_Bunny_1080_10s_1MB.mp4\").formulate()\n\n# grab RGB24(default) 3D frames from decoder\nfor frame in decoder.generateFrame():\n\n    # lets print its shape\n    print(frame.shape) # (1080, 1920, 3)\n\n# terminate the decoder\ndecoder.terminate()\n```\n\n### B. Sourcer API\n\nThe primary function of [**Sourcer API**][sourcer-api] is to **gather metadata information from all multimedia streams available** in the given source:\n\n```python\n# import the necessary packages\nfrom deffcode import Sourcer\n\n# initialize and formulate the decoder using suitable source\nsourcer = Sourcer(\"https://abhitronix.github.io/html/Big_Buck_Bunny_1080_10s_1MB.mp4\").probe_stream()\n\n# print metadata as `json.dump`\nprint(sourcer.retrieve_metadata(pretty_json=True))\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eThe resultant Terminal Output will look something as following on Windows machine\u003c/b\u003e\u003c/summary\u003e\n\n```json\n{\n  \"ffmpeg_binary_path\": \"C:\\\\Users\\\\foo\\\\AppData\\\\Local\\\\Temp\\\\ffmpeg-static-win64-gpl/bin/ffmpeg.exe\",\n  \"source\": \"https://abhitronix.github.io/html/Big_Buck_Bunny_1080_10s_1MB.mp4\",\n  \"source_extension\": \".mp4\",\n  \"source_video_resolution\": [1920, 1080],\n  \"source_video_framerate\": 60.0,\n  \"source_video_pixfmt\": \"yuv420p\",\n  \"source_video_decoder\": \"h264\",\n  \"source_duration_sec\": 10.0,\n  \"approx_video_nframes\": 600,\n  \"source_video_bitrate\": \"832k\",\n  \"source_audio_bitrate\": \"\",\n  \"source_audio_samplerate\": \"\",\n  \"source_has_video\": true,\n  \"source_has_audio\": false,\n  \"source_has_image_sequence\": false\n}\n```\n\n\u003c/details\u003e\n\n\u0026nbsp;\n\n\u0026nbsp;\n\n# Contributions\n\n\u003e We're happy to meet new contributors💗\n\nWe welcome your contributions to help us improve and extend this project. If you want to get involved with DeFFcode development, checkout the **[Contribution Guidelines ▶️][contribute]**\n\nWe're offering support for DeFFcode on [**Gitter Community Channel**][gitter]. Come and join the conversation over there!\n\n\u0026nbsp;\n\n\u0026nbsp;\n\n# Donations\n\n\u003cdiv align=\"center\"\u003e\n   \u003cimg src=\"https://abhitronix.github.io/deffcode/latest/assets/images/help_us.png\" alt=\"Donation\" width=\"50%\" /\u003e\n   \u003cp\u003e\u003ci\u003eDeFFcode is free and open source and will always remain so. ❤️\u003c/i\u003e\u003c/p\u003e\n\u003c/div\u003e\n\nIt 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 🙂\n\n\u003ca href='https://ko-fi.com/W7W8WTYO' target='_blank'\u003e\u003cimg height='36' style='border:0px;height:36px;' src='https://cdn.ko-fi.com/cdn/kofi1.png?v=4' border='0' alt='Buy Me a Coffee at ko-fi.com' /\u003e\u003c/a\u003e\n\n\u0026nbsp;\n\n\u0026nbsp;\n\n# Citation\n\nHere is a Bibtex entry you can use to cite this project in a publication:\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7523792.svg)](https://doi.org/10.5281/zenodo.7523792)\n\n```BibTeX\n@software{deffcode,\n  author       = {Abhishek Thakur},\n  title        = {abhiTronix/deffcode: v0.2.5},\n  month        = jan,\n  year         = 2023,\n  publisher    = {Zenodo},\n  version      = {v0.2.5},\n  doi          = {10.5281/zenodo.7523792},\n  url          = {https://doi.org/10.5281/zenodo.7523792}\n}\n```\n\n\u0026nbsp;\n\n\u0026nbsp;\n\n# Copyright\n\n**Copyright © abhiTronix 2021**\n\nThis library is released under the **[Apache 2.0 License][license]**.\n\n\u003c!--\nCI Badges\n--\u003e\n\n[appveyor]: https://img.shields.io/appveyor/ci/abhitronix/deffcode.svg?style=for-the-badge\u0026logo=appveyor\n[codecov]: https://img.shields.io/codecov/c/gh/abhiTronix/deffcode?logo=codecov\u0026style=for-the-badge\u0026token=zrES4mwVKe\n[github-cli]: https://img.shields.io/github/actions/workflow/status/abhiTronix/deffcode/.github/workflows/CIlinux.yml?style=for-the-badge\u0026logo=data:image/svg%2bxml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNMTAgMWE5IDkgMCAwMTkgOSA5IDkgMCAwMS05IDkgOSA5IDAgMDEtOS05IDkgOSAwIDAxO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Fya2V0aW5nLWljb24tc2Vjb25kYXJ5LCAjNzlCOEZGKSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiLz48L3N2Zz4=\n[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABC0lEQVRYhdWVPQoCMRCFX6HY2ghaiZUXsLW0EDyBrbWtN/EUHsHTWFnYyCL4gxibVZZlZzKTnWz0QZpk5r0vIdkF/kBPAMOKeddE+CQPKoc5Yt5cTjBMdQSwDQToWgBJAn3jmhqgltapAV6E6b5U17MGGAUaUj07TficMfIBZDV6vxowBm1BP9WbSQE4o5h9IjPJmy73TEPDDxVmoZdQrQ5jRhly9Q8tgMUXkIIWn0oG4GYQfAXQzz1PGoCiQndM7b4RgJay/h7zBLT3hASgoKjamQJMreKf0gfuAGyYtXEIAKcL/Dss15iq6ohXghozLYiAMxPuACwtIT4yeQUxAaLrZwAoqGRKGk7qDSYTfYQ8LuYnAAAAAElFTkSuQmCC\n[azure-badge]: https://img.shields.io/azure-devops/build/abhiuna12/942b3b13-d745-49e9-8d7d-b3918ff43ac2/3/master?logo=azure-pipelines\u0026style=for-the-badge\n[pypi-badge]: https://img.shields.io/pypi/v/deffcode.svg?style=for-the-badge\u0026logo=pypi\n[gitter-bagde]: https://img.shields.io/badge/Chat-Gitter-blueviolet.svg?style=for-the-badge\u0026logo=gitter\n[coffee-badge]: https://abhitronix.github.io/img/deffcode/orange_img.png\n[kofi-badge]: https://www.ko-fi.com/img/githubbutton_sm.svg\n[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge\u0026logo=github\n\n\u003c!--\nInternal URLs\n--\u003e\n\n[docs]: https://abhitronix.github.io/deffcode/latest/\n[release]: https://github.com/abhiTronix/deffcode/releases/latest\n[recipes]: https://abhitronix.github.io/deffcode/latest/recipes/basic/\n[license]: https://github.com/abhiTronix/deffcode/blob/master/LICENSE\n[help]: https://abhitronix.github.io/deffcode/latest/help/get_help\n[installation-notes]: https://abhitronix.github.io/deffcode/latest/installation/#installation-notes\n[ffdecoder-api]: https://abhitronix.github.io/deffcode/latest/reference/ffdecoder/#ffdecoder-api\n[sourcer-api]: https://abhitronix.github.io/deffcode/latest/reference/sourcer/#sourcer-api\n[contribute]: https://abhitronix.github.io/deffcode/latest/contribution/\n\n\u003c!--\nBasic Recipes\n--\u003e\n\n[basic-recipes]: https://abhitronix.github.io/deffcode/latest/recipes/basic/\n[decoding-video-files]: https://abhitronix.github.io/deffcode/latest/recipes/basic/decode-video-files/#decoding-video-files\n[decoding-camera-devices-using-indexes]: https://abhitronix.github.io/deffcode/latest/recipes/basic/decode-camera-devices/#decoding-camera-devices-using-indexes\n[decoding-network-streams]: https://abhitronix.github.io/deffcode/latest/recipes/basic/decode-network-streams/#decoding-network-streams\n[decoding-image-sequences]: https://abhitronix.github.io/deffcode/latest/recipes/basic/decode-image-sequences/#decoding-image-sequences\n[transcode-live-frames]: https://abhitronix.github.io/deffcode/latest/recipes/basic/transcode-live-frames/\n[transcoding-live-simple-filtergraphs]: https://abhitronix.github.io/deffcode/latest/recipes/basic/transcode-live-frames-simplegraphs/#transcoding-live-simple-filtergraphs\n[saving-key-frames-as-image]: https://abhitronix.github.io/deffcode/latest/recipes/basic/save-keyframe-image/#saving-key-frames-as-image\n[extracting-video-metadata]: https://abhitronix.github.io/deffcode/latest/recipes/basic/extract-video-metadata/#extracting-video-metadata\n[accessing-rgb-frames-from-a-video-file]: https://abhitronix.github.io/deffcode/latest/recipes/basic/decode-video-files/#accessing-rgb-frames-from-a-video-file\n[capturing-and-previewing-bgr-frames-from-a-video-file]: https://abhitronix.github.io/deffcode/latest/recipes/basic/decode-video-files/#capturing-and-previewing-bgr-frames-from-a-video-file\n[playing-with-any-other-ffmpeg-pixel-formats]: https://abhitronix.github.io/deffcode/latest/recipes/basic/decode-video-files/#playing-with-any-other-ffmpeg-pixel-formats\n[capturing-and-previewing-frames-from-a-looping-video]: https://abhitronix.github.io/deffcode/latest/recipes/basic/decode-video-files/#capturing-and-previewing-frames-from-a-looping-video\n[enumerating-all-camera-devices-with-indexes]: https://abhitronix.github.io/deffcode/latest/recipes/basic/decode-camera-devices/#enumerating-all-camera-devices-with-indexes\n[capturing-and-previewing-frames-from-a-camera-using-indexes]: https://abhitronix.github.io/deffcode/latest/recipes/basic/decode-camera-devices/#capturing-and-previewing-frames-from-a-camera-using-indexes\n[capturing-and-previewing-frames-from-a-https-stream]: https://abhitronix.github.io/deffcode/latest/recipes/basic/decode-network-streams/#capturing-and-previewing-frames-from-a-https-stream\n[capturing-and-previewing-frames-from-a-rtsprtp-stream]: https://abhitronix.github.io/deffcode/latest/recipes/basic/decode-network-streams/#capturing-and-previewing-frames-from-a-rtsprtp-stream\n[capturing-and-previewing-frames-from-sequence-of-images]: https://abhitronix.github.io/deffcode/latest/recipes/basic/decode-image-sequences/#capturing-and-previewing-frames-from-sequence-of-images\n[capturing-and-previewing-frames-from-single-looping-image]: https://abhitronix.github.io/deffcode/latest/recipes/basic/decode-image-sequences/#capturing-and-previewing-frames-from-single-looping-image\n[transcoding-video-using-opencv-videowriter-api]: https://abhitronix.github.io/deffcode/latest/recipes/basic/transcode-live-frames/#transcoding-video-using-opencv-videowriter-api\n[transcoding-lossless-video-using-writegear-api]: https://abhitronix.github.io/deffcode/latest/recipes/basic/transcode-live-frames/#transcoding-lossless-video-using-writegear-api\n[transcoding-trimmed-and-reversed-video]: https://abhitronix.github.io/deffcode/latest/recipes/basic/transcode-live-frames-simplegraphs/#transcoding-trimmed-and-reversed-video\n[transcoding-cropped-video]: https://abhitronix.github.io/deffcode/latest/recipes/basic/transcode-live-frames-simplegraphs/#transcoding-cropped-video\n[transcoding-rotated-video-with-rotate-filter]: https://abhitronix.github.io/deffcode/latest/recipes/basic/transcode-live-frames-simplegraphs/#transcoding-rotated-video-with-rotate-filter\n[transcoding-rotated-video-with-transpose-filter]: https://abhitronix.github.io/deffcode/latest/recipes/basic/transcode-live-frames-simplegraphs/#transcoding-rotated-video-with-transpose-filter\n[transcoding-horizontally-flipped-and-scaled-video]: https://abhitronix.github.io/deffcode/latest/recipes/basic/transcode-live-frames-simplegraphs/#transcoding-horizontally-flipped-and-scaled-video\n[extracting-key-frames-as-png-image]: https://abhitronix.github.io/deffcode/latest/recipes/basic/save-keyframe-image/#extracting-key-frames-as-png-image\n[generating-thumbnail-with-a-fancy-filter]: https://abhitronix.github.io/deffcode/latest/recipes/basic/save-keyframe-image/#generating-thumbnail-with-a-fancy-filter\n[extracting-video-metadata-using-sourcer-api]: https://abhitronix.github.io/deffcode/latest/recipes/basic/extract-video-metadata/#extracting-video-metadata-using-sourcer-api\n[extracting-video-metadata-using-ffdecoder-api]: https://abhitronix.github.io/deffcode/latest/recipes/basic/extract-video-metadata/#extracting-video-metadata-using-ffdecoder-api\n\n\u003c!--\nAdvanced Recipes\n--\u003e\n\n[advanced-recipes]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/\n[decoding-live-virtual-sources]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/decode-live-virtual-sources/#decoding-live-virtual-sources\n[decoding-live-feed-devices]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/decode-live-feed-devices/#decoding-live-feed-devices\n[hardware-accelerated-video-decoding]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/decode-hw-acceleration/#hardware-accelerated-video-decoding\n[transcoding-live-complex-filtergraphs]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/transcode-live-frames-complexgraphs/#transcoding-live-complex-filtergraphs\n[transcoding-video-art-with-filtergraphs]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/transcode-art-filtergraphs/#transcoding-video-art-with-filtergraphs\n[hardware-accelerated-video-transcoding]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/transcode-hw-acceleration/#hardware-accelerated-video-transcoding\n[updating-video-metadata]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/update-metadata/#updating-video-metadata\n[generate-and-decode-frames-from-sierpinski-pattern]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/decode-live-virtual-sources/#generate-and-decode-frames-from-sierpinski-pattern\n[generate-and-decode-frames-from-test-source-pattern]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/decode-live-virtual-sources/#generate-and-decode-frames-from-test-source-pattern\n[generate-and-decode-frames-from-gradients-with-custom-text-effect]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/decode-live-virtual-sources/#generate-and-decode-frames-from-gradients-with-custom-text-effect\n[generate-and-decode-frames-from-mandelbrot-test-pattern-with-vectorscope-waveforms]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/decode-live-virtual-sources/#generate-and-decode-frames-from-mandelbrot-test-pattern-with-vectorscope-waveforms\n[generate-and-decode-frames-from-game-of-life-visualization]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/decode-live-virtual-sources/#generate-and-decode-frames-from-game-of-life-visualization\n[cuvid-accelerated-hardware-based-video-decoding-and-previewing]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/decode-hw-acceleration/#cuvid-accelerated-hardware-based-video-decoding-and-previewing\n[cuda-accelerated-hardware-based-video-decoding-and-previewing]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/decode-hw-acceleration/#cuda-accelerated-hardware-based-video-decoding-and-previewing\n[transcoding-video-with-live-custom-watermark-image-overlay]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/transcode-live-frames-complexgraphs/#transcoding-video-with-live-custom-watermark-image-overlay\n[transcoding-video-from-sequence-of-images-with-additional-filtering]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/transcode-live-frames-complexgraphs/#transcoding-video-from-sequence-of-images-with-additional-filtering\n[transcoding-video-art-with-jetcolor-effect]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/transcode-art-filtergraphs/#transcoding-video-art-with-jetcolor-effect\n[transcoding-video-art-with-yuv-bitplane-visualization]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/transcode-art-filtergraphs/#transcoding-video-art-with-yuv-bitplane-visualization\n[transcoding-video-art-with-ghosting-effect]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/transcode-art-filtergraphs/#transcoding-video-art-with-ghosting-effect\n[transcoding-video-art-with-pixelation-effect]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/transcode-art-filtergraphs/#transcoding-video-art-with-pixelation-effect\n[capturing-and-previewing-frames-from-a-webcam-using-custom-demuxer]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/decode-live-feed-devices/#capturing-and-previewing-frames-from-a-webcam-using-custom-demuxer\n[capturing-and-previewing-frames-from-your-desktop]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/decode-live-feed-devices/#capturing-and-previewing-frames-from-your-desktop\n[cuda-accelerated-video-transcoding-with-opencvs-videowriter-api]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/transcode-hw-acceleration/#cuda-accelerated-video-transcoding-with-opencvs-videowriter-api\n[cuda-nvenc-accelerated-video-transcoding-with-writegear-api]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/transcode-hw-acceleration/#cuda-nvenc-accelerated-video-transcoding-with-writegear-api\n[cuda-nvenc-accelerated-end-to-end-lossless-video-transcoding-with-writegear-api]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/transcode-hw-acceleration/#cuda-nvenc-accelerated-end-to-end-lossless-video-transcoding-with-writegear-api\n[added-new-attributes-to-metadata-in-ffdecoder-api]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/update-metadata/#added-new-attributes-to-metadata-in-ffdecoder-api\n[overriding-source-video-metadata-in-ffdecoder-api]: https://abhitronix.github.io/deffcode/latest/recipes/advanced/update-metadata/#overriding-source-video-metadata-in-ffdecoder-api\n\n\u003c!--\nCI Apps URLs\n--\u003e\n\n[github-flow]: https://github.com/abhiTronix/deffcode/actions/workflows/CIlinux.yml\n[azure-pipeline]: https://dev.azure.com/abhiuna12/public/_build?definitionId=3\n[app]: https://ci.appveyor.com/project/abhiTronix/deffcode\n[code]: https://codecov.io/gh/abhiTronix/deffcode\n[black]: https://github.com/psf/black\n\n\u003c!--\nExternal URLs\n--\u003e\n\n[opencv-py]: https://docs.opencv.org/4.x/d6/d00/tutorial_py_root.html\n[ffmpeg]: https://www.ffmpeg.org/\n[pypi]: https://pypi.org/project/deffcode/\n[gitter]: https://gitter.im/deffcode-python/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\n[coffee]: https://www.buymeacoffee.com/2twOXFvlA\n[kofi]: https://ko-fi.com/W7W8WTYO\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhitronix%2Fdeffcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhitronix%2Fdeffcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhitronix%2Fdeffcode/lists"}