{"id":20256572,"url":"https://github.com/interdigitalinc/gsth266enc","last_synced_at":"2025-04-11T00:22:18.336Z","repository":{"id":184505710,"uuid":"599245744","full_name":"InterDigitalInc/GstH266Enc","owner":"InterDigitalInc","description":"An open-source custom Gstreamer plugin for Versatile Video Coding (VVC) encoder.","archived":false,"fork":false,"pushed_at":"2023-02-08T22:18:39.000Z","size":106,"stargazers_count":10,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T21:11:12.288Z","etag":null,"topics":["compression","gstreamer-plugins","versatile-video-coding","video-compression"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause-clear","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/InterDigitalInc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-02-08T18:48:16.000Z","updated_at":"2025-02-12T19:06:07.000Z","dependencies_parsed_at":"2023-07-28T18:49:31.307Z","dependency_job_id":null,"html_url":"https://github.com/InterDigitalInc/GstH266Enc","commit_stats":null,"previous_names":["interdigitalinc/gsth266enc"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InterDigitalInc%2FGstH266Enc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InterDigitalInc%2FGstH266Enc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InterDigitalInc%2FGstH266Enc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InterDigitalInc%2FGstH266Enc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InterDigitalInc","download_url":"https://codeload.github.com/InterDigitalInc/GstH266Enc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248318929,"owners_count":21083751,"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":["compression","gstreamer-plugins","versatile-video-coding","video-compression"],"created_at":"2024-11-14T10:47:15.954Z","updated_at":"2025-04-11T00:22:18.314Z","avatar_url":"https://github.com/InterDigitalInc.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## GSTH266Enc: A Gstreamer Plugin for VVC Encoder\nAn open-source GStreamer Plugin for VVC encoder (h266enc)\n\nThis plugin is still under development and will continue to improve by:\n\n1. extending the API layer to support other known or future VVC encoder implementations\n2. exposing additional encoder properties \n3. extending support to other platforms (e.g. linux)\n4. ... \n\n## Plugin Architecture \nFollowing is a pictorial representation of the Gstreamer plugin architecture\n\n![architecture diagram](/images/architecture.png)\n\n## Prerequisites\n\nPrerequisites for building the Gstreamer plugin on Windows are:\n\n- Visual Studio 19 (for MSVC compiler (version 19.29.30038.1))\n- meson (version 0.59.0)\n- Gstreamer (version 1.20.1)\n- VVC encoder library \n\nVVC encoder libraries currently supported by the plugin are:\n  - VVenC v1.4.0 - https://github.com/fraunhoferhhi/vvenc\n  - UVG266 v0.4.1 - https://github.com/ultravideo/uvg266\n\n\n## Installation\n\n### MSVC compiler\nThe MSVC compiler is available as part of the visual studio for windows installation. A different C/C++ compiler for windows can be used but is not tested.  \n\n### Meson\n\nTo install Meson, follow the instructions on https://mesonbuild.com/Getting-meson.html\n\nPython 3.7 or up is required for meson. \n\n### GStreamer\n1. Download the Runtime and Development installer. The installers are available under the following [link](https://gstreamer.freedesktop.org/data/pkg/windows/). In this project we are using x64.\n\n    - We are developing this project against Gstreamer 1.20.1. To download the installers for Gstreamer 1.20.1 show the [link](https://gstreamer.freedesktop.org/data/pkg/windows/1.20.1/msvc/)\n\n    - More information on installation of Gstreamer on Windows is available on the [official website](https://gstreamer.freedesktop.org/documentation/installing/on-windows.html#download-and-install-gstreamer-binaries)\n\n\n2. Run the installers. You will be prompted with details on where to install `gstreamer`, usually it is in `C:\\`\n\n    - running the devel package will prompt you with three options ie. `Typical`, `Custom`, `Complete` \n\n    - choose the complete installation to install pkgconfig files \n\n\n3. Setting the environment varibles: (assuming gstreamer is installed in C:\\)\n\n    - Add `C:\\gstreamer\\1.0\\msvc_x86_64\\bin` to PATH\n\n    - Set `PKG_CONFIG_PATH` to `C:\\gstreamer\\1.0\\msvc_x86_64\\lib\\pkgconfig` \n\n    - Set `GSTREAMER_ROOT_X86_64` to `C:\\gstreamer\\1.0\\msvc_x86_64`\n\n\n4. Reboot your system\n\n5. Open terminal and check `gst-launch-1.0`\n\n### VVC encoder library\n\n#### VVenC\n- Checkout the latest code from [here](https://github.com/fraunhoferhhi/vvenc). \n- Follow the [build](https://github.com/fraunhoferhhi/vvenc/wiki/Build) process to generate the shared library (vvenc.dll)\n- install the vvenc.dll to the GStreamer install directory under `C:\\gstreamer\\1.0\\msvc_x86_64\\bin\\`\n\n#### UVG266\n- Checkout the latest code from [here](https://github.com/ultravideo/uvg266)\n- Follow the [build](https://github.com/ultravideo/uvg266#compiling-uvg266) process to generate the shared library (uvg266.dll)\n- install the generated uvg266.dll to the Gstreamer install directory under `C:\\gstreamer\\1.0\\msvc_x86_64\\bin\\`\n\n\n## Compiling the GSTH266enc plugin\n\nPlugin is compiled using meson build system. The plugin is only tested on a 64-bit windows machine. \n\nRun the following commands in the root directory to generate the plugin and API libraries\n\n```\n    mkdir builddir\n    cd builddir\n    meson ../. \n        -DENCODER_TYPE=\u003cVVENC or UVG\u003e\n        -DENCODER_LIB_PATH=\u003cpath to encoder lib directory\u003e\n        -DENCODER_INCLUDE_PATH=\u003cpath to encoder include directory\u003e\n        \n    meson compile -C .\n```\n\nFor example, to configure the meson to compile the plugin with VVenC library: \n```\nmeson ../. -DENCODER_TYPE=VVENC -DENCODER_LIB_PATH=\u003cpath to VVenC lib folder\u003e -DENCODER_INCLUDE_PATH=\u003cpath to VVenC include folder\u003e\n```\n\nSimilarly, to configure the meson to compile the plugin with UVG266 library: \n```\nmeson ../. -DENCODER_TYPE=UVG -DENCODER_LIB_PATH=\u003cpath to UVG266 lib folder\u003e -DENCODER_INCLUDE_PATH=\u003cpath to UVG266 include folder\u003e\n```\n\nAfter successful compilation, following shared libraries are generated that need to be copied to the Gstreamer installation directory:\n- gsth266enc.dll (under builddir/plugin/ directory)\n    - This is copied to the GStreamer-1.0 lib directory at `C:\\gstreamer\\1.0\\msvc_x86_64\\lib\\gstreamer-1.0\\`\n- \u003cencoder_type\u003e_lib.dll depending on the encoder type (under builddir/encoders/\u003cencoder_type\u003e_utils/) where encoder_type={vvenc or uvg}\n    - This is copied to the GStreamer-1.0 bin directory at `C:\\gstreamer\\1.0\\msvc_x86_64\\bin\\`\n\nIn the next section, we demonstrate the usage of the plugin\n\n## Usage of the plugin\n\nOne can inspect the h266enc element using the `gst-inspect-1.0` utility provided by Gstreamer as follows\n\n```\n    gst-inspect-1.0 h266enc\n```\nFollowing are the pad templates supported by the plugin:\n\n```\nPad Templates:\n  SINK template: 'sink'\n    Availability: Always\n    Capabilities:\n      video/x-raw\n              framerate: [ 0/1, 2147483647/1 ]\n                  width: [ 1, 2147483647 ]\n                 height: [ 1, 2147483647 ]\n                 format: { (string)I420, (string)I420_10LE }\n\n  SRC template: 'src'\n    Availability: Always\n    Capabilities:\n      video/x-h266\n              framerate: [ 0/1, 2147483647/1 ]\n                  width: [ 16, 2147483647 ]\n                 height: [ 16, 2147483647 ]\n          stream-format: byte-stream\n              alignment: au\n                profile: { (string)main-10 }\n\n```\n\nFollowing are the supported element properties:\n```\n    Element Properties:\n        bitrate             : Bitrate in kbit/sec\n                                flags: readable, writable, changeable in NULL, READY, PAUSED or PLAYING state\n                                Unsigned Integer. Range: 1 - 102400000 Default: 10000000\n        min-force-key-unit-interval: Minimum interval between force-keyunit requests in nanoseconds\n                                flags: readable, writable\n                                Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 0\n        name                : The name of the object\n                                flags: readable, writable, 0x2000\n                                String. Default: \"h266enc0\"\n        parent              : The parent of the object\n                                flags: readable, writable, 0x2000\n                                Object of type \"GstObject\"\n        qos                 : Handle Quality-of-Service events from downstream\n                                flags: readable, writable\n                                Boolean. Default: false\n        qp                  : QP for P slices in (implied) CQP mode (-1 = disabled)\n                                flags: readable, writable\n                                Integer. Range: -1 - 51 Default: 32\n\n```\n\n\nTo test the element, a GStreamer tool named ‘gst-launch’ can be used to test a simple pipeline as shown in figure below. \n\n![example pipeline](/images/example-pipeline.png)\n\nNote that in the above case the GST plugin is configured to use the VVenC encoder. The above pipeline can be tested using the following command:\n\n```\n    gst-launch-1.0 videotestsrc ! video/x-raw,format=I420_10LE, width=256,height=256 ! h266enc bitrate=1000000 ! filesink   location=videotestsrc.266\n```\n\n\n## License\nGstH266Enc is licensed under the BSD 3-Clause Clear License\n\n## Citations\nIf you use this project, please cite the relevant original publications, and cite this project as:\n\n```\n@inproceedings{rajjvaed2022gsth266enc,\n  title={GSTH266enc: A GStreamer Plugin for VVC Encoder},\n  author={Rajjvaed, Advaiit and Puri, Saurabh and Bhullar, Gurdeep and Martin-Cocher, Ga{\\\"e}lle},\n  booktitle={Proceedings of the 4th ACM International Conference on Multimedia in Asia},\n  pages={1--3},\n  year={2022}\n}\n```\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterdigitalinc%2Fgsth266enc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterdigitalinc%2Fgsth266enc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterdigitalinc%2Fgsth266enc/lists"}