{"id":13509972,"url":"https://github.com/Comcast/gots","last_synced_at":"2025-03-30T15:30:23.613Z","repository":{"id":37484330,"uuid":"63074792","full_name":"Comcast/gots","owner":"Comcast","description":"MPEG Transport Stream handling in Go","archived":false,"fork":false,"pushed_at":"2024-05-28T08:42:26.000Z","size":1564,"stargazers_count":309,"open_issues_count":17,"forks_count":88,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-03-28T11:09:51.985Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Comcast.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":"CONTRIBUTING","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2016-07-11T14:26:42.000Z","updated_at":"2024-12-12T01:44:18.000Z","dependencies_parsed_at":"2023-01-17T15:45:59.956Z","dependency_job_id":"1a69d3e7-c820-41b1-a6f1-6d2fa97ced52","html_url":"https://github.com/Comcast/gots","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comcast%2Fgots","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comcast%2Fgots/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comcast%2Fgots/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Comcast%2Fgots/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Comcast","download_url":"https://codeload.github.com/Comcast/gots/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246017732,"owners_count":20710240,"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":[],"created_at":"2024-08-01T02:01:19.432Z","updated_at":"2025-03-30T15:30:23.036Z","avatar_url":"https://github.com/Comcast.png","language":"Go","funding_links":[],"categories":["Go","HarmonyOS","others","Encoding \u0026 Codecs"],"sub_categories":["Windows Manager","Containerization \u0026 Packaging Tools"],"readme":"[![Go Reference](https://pkg.go.dev/badge/github.com/Comcast/gots/v2.svg)](https://pkg.go.dev/github.com/Comcast/gots/v2)\n[![Build Status](https://travis-ci.org/Comcast/gots.svg?branch=master)](https://travis-ci.org/Comcast/gots)\n[![Go Report Card](https://goreportcard.com/badge/github.com/Comcast/gots)](https://goreportcard.com/report/github.com/Comcast/gots)\n[![Coverage Status](https://coveralls.io/repos/github/Comcast/gots/badge.svg?branch=master)](https://coveralls.io/github/Comcast/gots?branch=master)\n\n\n# goTS (Go Transport Streams)\n\ngots (Go Transport Streams) is a library for working with MPEG transport streams. It provides abstractions for reading packet information and program specific information (psi)\n\n## Bug / Feature Reporting\nAdd requests to Github issues. To submit a PR see [CONTRIBUTING](./CONTRIBUTING)\n## Tests\n```bash\ngo test -race ./...\n```\nTravis-CI will run these tests:\n\n```bash\ngo test -v ./...\n```\n## License \nThis software is licensed under the MIT license. For full text see [LICENSE](./LICENSE)\n\n## Code of Conduct\nWe take our [code of conduct](CODE_OF_CONDUCT.md) very seriously. Please abide by it.\n\n## Examples\nThis is a simple example that extracts all PIDs from a ts file and prints them. [CLI example parser can be found here](cli/parsefile.go)\n```go\nfunc main() {\n\tpidSet := make(map[uint16]bool, 5)\n\tfilename := \"./scenario1.ts\"\n\tfile, err := os.Open(filename)\n\tif err == nil {\n\t\tpkt := make([]byte, packet.PacketSize)\n\t\tfor read, err := file.Read(pkt); read \u003e 0 \u0026\u0026 err == nil; read, err = file.Read(pkt) {\n                        if err != nil {\n                                println(err)\n                                return\n                        }\n\t\t\tpid, err := packet.Pid(pkt)\n\t\t\tif err != nil {\n\t\t\t\tprintln(err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\tpidSet[pid] = true\n\t\t}\n\n        \tfor v := range pidSet {\n\t        \tfmt.Printf(\"Found pid %d\\n\", v)\n\t        }\n\t} else {\n\t\tfmt.Printf(\"Unable to open file [%s] due to [%s]\\n\", filename, err.Error())\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FComcast%2Fgots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FComcast%2Fgots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FComcast%2Fgots/lists"}