{"id":22683495,"url":"https://github.com/notedit/gstreamer-go","last_synced_at":"2025-04-12T18:30:24.405Z","repository":{"id":57483182,"uuid":"160352976","full_name":"notedit/gstreamer-go","owner":"notedit","description":"gstreamer wrap for golang ","archived":false,"fork":false,"pushed_at":"2020-03-21T07:22:30.000Z","size":16,"stargazers_count":65,"open_issues_count":3,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-26T12:47:01.905Z","etag":null,"topics":["golang","gstreamer"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/notedit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-04T12:19:25.000Z","updated_at":"2024-12-22T20:26:05.000Z","dependencies_parsed_at":"2022-08-27T21:02:15.732Z","dependency_job_id":null,"html_url":"https://github.com/notedit/gstreamer-go","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notedit%2Fgstreamer-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notedit%2Fgstreamer-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notedit%2Fgstreamer-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notedit%2Fgstreamer-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/notedit","download_url":"https://codeload.github.com/notedit/gstreamer-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248613051,"owners_count":21133428,"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":["golang","gstreamer"],"created_at":"2024-12-09T21:12:19.194Z","updated_at":"2025-04-12T18:30:24.360Z","avatar_url":"https://github.com/notedit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gstreamer-go\ngstreamer simple wrap for golang\n\n\n## You can also try https://github.com/notedit/gst\n\n## Install \n\n\nUbuntu or Dedian\n\n```sh\napt-get install pkg-config\napt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-ugly gstreamer1.0-libav\n```\n\nMac os\n\n```sh\nbrew install gstreamer\nbrew install gst-plugins-base\nbrew install gst-plugins-good\nbrew install gst-plugins-bad\nbrew install gst-plugins-ugly\n```\n\nThen\n\n```sh\ngo get github.com/notedit/gstreamer-go\n```\n\n\n## How to use\n\n```go\npipeline, err := New(\"videotestsrc  ! capsfilter name=filter ! autovideosink\")\nif err != nil {\n    t.Error(\"pipeline create error\", err)\n    t.FailNow()\n}\n\nfilter := pipeline.FindElement(\"filter\")\n\nif filter == nil {\n    t.Error(\"pipeline find element error \")\n}\n\nfilter.SetCap(\"video/x-raw,width=1280,height=720\")\n\npipeline.Start()\n\n```\n\n\n## Send Media data to pipeline\n\n```go\npipeline, err := New(\"appsrc name=mysource format=time is-live=true do-timestamp=true ! videoconvert ! autovideosink\")\n\nif err != nil {\n    t.Error(\"pipeline create error\", err)\n    t.FailNow()\n}\n\nappsrc := pipeline.FindElement(\"mysource\")\n\nappsrc.SetCap(\"video/x-raw,format=RGB,width=320,height=240,bpp=24,depth=24\")\n\npipeline.Start()\n\nfor {\n    time.Sleep(1 * time.Second)\n    appsrc.Push(make([]byte, 320*240*3))\n}\n\n```\n\npush raw rgb data to the pipeline\n\n\n## Poll Media data from pipeline \n\n```go\npipeline, err := New(\"videotestsrc ! video/x-raw,format=I420,framerate=15/1 ! x264enc bframes=0 speed-preset=veryfast key-int-max=60 ! video/x-h264,stream-format=byte-stream ! appsink name=sink\")\n\nif err != nil {\n    t.Error(\"pipeline create error\", err)\n    t.FailNow()\n}\n\nappsink := pipeline.FindElement(\"sink\")\n\npipeline.Start()\n\nout := appsink.Poll()\n\nfor {\n    buffer := \u003c-out\n    fmt.Println(\"push \", len(buffer))\n}\n```\n\nnow we can get the h264 raw data from the pipeline \n\n\n## Check Plugins does exist\n\n```go\n\t\nplugins := []string{\"videotestsrc\", \"audiotestsrc\", \"rtp\", \"curl\",\"x264\", \"rtmp\"}\n\nerr := CheckPlugins(plugins)\n\nif err != nil {\n    panic(err)\n}\n\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotedit%2Fgstreamer-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotedit%2Fgstreamer-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotedit%2Fgstreamer-go/lists"}