{"id":13786694,"url":"https://github.com/unki2aut/go-mpd","last_synced_at":"2025-05-11T22:32:11.942Z","repository":{"id":45898512,"uuid":"155910769","full_name":"unki2aut/go-mpd","owner":"unki2aut","description":"Go library for parsing and generating MPEG-DASH Media Presentation Description (MPD) files","archived":false,"fork":true,"pushed_at":"2023-11-11T09:44:46.000Z","size":34,"stargazers_count":22,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-19T00:17:36.715Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mc2soft/mpd","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unki2aut.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}},"created_at":"2018-11-02T19:09:07.000Z","updated_at":"2024-04-10T17:50:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/unki2aut/go-mpd","commit_stats":null,"previous_names":["unki2aut/mpd"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unki2aut%2Fgo-mpd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unki2aut%2Fgo-mpd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unki2aut%2Fgo-mpd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unki2aut%2Fgo-mpd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unki2aut","download_url":"https://codeload.github.com/unki2aut/go-mpd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213845574,"owners_count":15646795,"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-03T19:01:28.882Z","updated_at":"2024-08-03T19:06:36.854Z","avatar_url":"https://github.com/unki2aut.png","language":"Go","funding_links":[],"categories":["视频","Video","HarmonyOS","Utility","视频`视频和流媒体相关库`"],"sub_categories":["版本控制","实用程序/Miscellaneous","Utility/Miscellaneous","Windows Manager","Fail injection","HTTP Clients","版本控制`版本控制相关库`"],"readme":"[![Build Status](https://github.com/unki2aut/go-mpd/actions/workflows/ci.yml/badge.svg)](https://github.com/unki2aut/go-mpd/actions/workflows/ci.yml) [![Go Coverage](https://github.com/unki2aut/go-mpd/wiki/coverage.svg)](https://raw.githack.com/wiki/unki2aut/go-mpd/coverage.html) [![Go Report Card](https://goreportcard.com/badge/github.com/unki2aut/go-mpd)](https://goreportcard.com/report/github.com/unki2aut/go-mpd) [![GoDoc](https://godoc.org/github.com/unki2aut/go-mpd?status.svg)](https://godoc.org/github.com/unki2aut/go-mpd)\n# go-mpd \n\nGo library for parsing and generating MPEG-DASH Media Presentation Description (MPD) files.\n\nThis project is based on https://github.com/mc2soft/mpd.\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/unki2aut/go-mpd\"\n)\n\nfunc main() {\n\tmpd := new(mpd.MPD)\n\tmpd.Decode([]byte(`\u003cMPD type=\"static\" mediaPresentationDuration=\"PT3M30S\"\u003e\n  \u003cPeriod\u003e\n    \u003cAdaptationSet mimeType=\"video/mp4\" codecs=\"avc1.42c00d\"\u003e\n      \u003cSegmentTemplate media=\"../video/$RepresentationID$/dash/segment_$Number$.m4s\" initialization=\"../video/$RepresentationID$/dash/init.mp4\" duration=\"100000\" startNumber=\"0\" timescale=\"25000\"/\u003e\n      \u003cRepresentation id=\"180_250000\" bandwidth=\"250000\" width=\"320\" height=\"180\" frameRate=\"25\"/\u003e\n      \u003cRepresentation id=\"270_400000\" bandwidth=\"400000\" width=\"480\" height=\"270\" frameRate=\"25\"/\u003e\n      \u003cRepresentation id=\"360_800000\" bandwidth=\"800000\" width=\"640\" height=\"360\" frameRate=\"25\"/\u003e\n      \u003cRepresentation id=\"540_1200000\" bandwidth=\"1200000\" width=\"960\" height=\"540\" frameRate=\"25\"/\u003e\n      \u003cRepresentation id=\"720_2400000\" bandwidth=\"2400000\" width=\"1280\" height=\"720\" frameRate=\"25\"/\u003e\n      \u003cRepresentation id=\"1080_4800000\" bandwidth=\"4800000\" width=\"1920\" height=\"1080\" frameRate=\"25\"/\u003e\n    \u003c/AdaptationSet\u003e\n    \u003cAdaptationSet lang=\"en\" mimeType=\"audio/mp4\" codecs=\"mp4a.40.2\" bitmovin:label=\"English stereo\"\u003e\n      \u003cAudioChannelConfiguration schemeIdUri=\"urn:mpeg:dash:23003:3:audio_channel_configuration:2011\" value=\"2\"/\u003e\n      \u003cSegmentTemplate media=\"../audio/$RepresentationID$/dash/segment_$Number$.m4s\" initialization=\"../audio/$RepresentationID$/dash/init.mp4\" duration=\"191472\" startNumber=\"0\" timescale=\"48000\"/\u003e\n      \u003cRepresentation id=\"1_stereo_128000\" bandwidth=\"128000\" audioSamplingRate=\"48000\"/\u003e\n    \u003c/AdaptationSet\u003e\n  \u003c/Period\u003e\n\u003c/MPD\u003e`))\n\n\tfmt.Println(mpd.MediaPresentationDuration)\n}\n```\n\n## Related links\n* https://en.wikipedia.org/wiki/Dynamic_Adaptive_Streaming_over_HTTP\n* [ISO_IEC_23009-1_2014 Standard](http://standards.iso.org/ittf/PubliclyAvailableStandards/c065274_ISO_IEC_23009-1_2014.zip)\n\n## MPD parsing/generation in other languages\n* Javascript - https://github.com/videojs/mpd-parser\n* Python - https://github.com/sangwonl/python-mpegdash\n* Cpp - https://github.com/bitmovin/libdash\n* Java - https://github.com/carlanton/mpd-tools\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funki2aut%2Fgo-mpd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funki2aut%2Fgo-mpd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funki2aut%2Fgo-mpd/lists"}