diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-04-12 03:01:20 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-04-12 03:01:20 +0000 |
| commit | 971bf4ddded61c6672c0b51b1c555b709a322936 (patch) | |
| tree | 9c5cbc4dcb1babff262a836f70991093c61427aa /python-mpegdash.spec | |
| parent | 4246c8eeb5183ba89da4a29d6a4910b5182e220d (diff) | |
automatic import of python-mpegdash
Diffstat (limited to 'python-mpegdash.spec')
| -rw-r--r-- | python-mpegdash.spec | 286 |
1 files changed, 286 insertions, 0 deletions
diff --git a/python-mpegdash.spec b/python-mpegdash.spec new file mode 100644 index 0000000..e29fe45 --- /dev/null +++ b/python-mpegdash.spec @@ -0,0 +1,286 @@ +%global _empty_manifest_terminate_build 0 +Name: python-mpegdash +Version: 0.3.1 +Release: 1 +Summary: MPEG-DASH MPD(Media Presentation Description) Parser +License: MIT +URL: https://github.com/sangwonl/python-mpegdash +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/0b/ef/da88735b0284b3dd0125ddb67048a7dfa54005da9e61afdc62b664e7571c/mpegdash-0.3.1.tar.gz +BuildArch: noarch + +Requires: python3-future + +%description + +# python-mpegdash + +MPEG-DASH MPD (Media Presentation Description) Parser compatible with Python 2.6+ and Python 3. + +[](https://github.com/sangwonl/python-mpegdash/actions?query=workflow%3A%22Build+Status%22) +[](https://github.com/sangwonl/python-mpegdash/blob/master/LICENSE) + +* * * + +## Installation + +```bash +$ pip install mpegdash +``` + +* * * + +## Test + +```bash +$ python -m unittest discover +$ python3 -m unittest discover +``` + +* * * + +## Usage + +```py +from mpegdash.parser import MPEGDASHParser + +# Parse from file path +mpd_path = './tests/mpd-samples/sample-001.mpd' +mpd = MPEGDASHParser.parse(mpd_path) + +# Parse from url +mpd_url = 'http://yt-dash-mse-test.commondatastorage.googleapis.com/media/motion-20120802-manifest.mpd' +mpd = MPEGDASHParser.parse(mpd_url) + +# Parse from string +mpd_string = ''' +<MPD xmlns="urn:mpeg:DASH:schema:MPD:2011" mediaPresentationDuration="PT0H1M52.43S" minBufferTime="PT1.5S" +profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" type="static"> + <Period duration="PT0H1M52.43S" start="PT0S"> + <AdaptationSet> + <ContentComponent contentType="video" id="1" /> + <Representation bandwidth="4190760" codecs="avc1.640028" height="1080" id="1" mimeType="video/mp4" width="1920"> + <BaseURL>motion-20120802-89.mp4</BaseURL> + <SegmentBase indexRange="674-981"> + <Initialization range="0-673" /> + </SegmentBase> + </Representation> + </AdaptationSet> + </Period> +</MPD> +''' +mpd = MPEGDASHParser.parse(mpd_string) + +# Write to xml file +MPEGDASHParser.write(mpd, './tests/mpd-samples/output.mpd') +``` + +* * * + +## License + +This project is released under the MIT license. +Please read and agree to the license before use, it can be found in the [LICENSE](LICENSE) file. + + + + +%package -n python3-mpegdash +Summary: MPEG-DASH MPD(Media Presentation Description) Parser +Provides: python-mpegdash +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-mpegdash + +# python-mpegdash + +MPEG-DASH MPD (Media Presentation Description) Parser compatible with Python 2.6+ and Python 3. + +[](https://github.com/sangwonl/python-mpegdash/actions?query=workflow%3A%22Build+Status%22) +[](https://github.com/sangwonl/python-mpegdash/blob/master/LICENSE) + +* * * + +## Installation + +```bash +$ pip install mpegdash +``` + +* * * + +## Test + +```bash +$ python -m unittest discover +$ python3 -m unittest discover +``` + +* * * + +## Usage + +```py +from mpegdash.parser import MPEGDASHParser + +# Parse from file path +mpd_path = './tests/mpd-samples/sample-001.mpd' +mpd = MPEGDASHParser.parse(mpd_path) + +# Parse from url +mpd_url = 'http://yt-dash-mse-test.commondatastorage.googleapis.com/media/motion-20120802-manifest.mpd' +mpd = MPEGDASHParser.parse(mpd_url) + +# Parse from string +mpd_string = ''' +<MPD xmlns="urn:mpeg:DASH:schema:MPD:2011" mediaPresentationDuration="PT0H1M52.43S" minBufferTime="PT1.5S" +profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" type="static"> + <Period duration="PT0H1M52.43S" start="PT0S"> + <AdaptationSet> + <ContentComponent contentType="video" id="1" /> + <Representation bandwidth="4190760" codecs="avc1.640028" height="1080" id="1" mimeType="video/mp4" width="1920"> + <BaseURL>motion-20120802-89.mp4</BaseURL> + <SegmentBase indexRange="674-981"> + <Initialization range="0-673" /> + </SegmentBase> + </Representation> + </AdaptationSet> + </Period> +</MPD> +''' +mpd = MPEGDASHParser.parse(mpd_string) + +# Write to xml file +MPEGDASHParser.write(mpd, './tests/mpd-samples/output.mpd') +``` + +* * * + +## License + +This project is released under the MIT license. +Please read and agree to the license before use, it can be found in the [LICENSE](LICENSE) file. + + + + +%package help +Summary: Development documents and examples for mpegdash +Provides: python3-mpegdash-doc +%description help + +# python-mpegdash + +MPEG-DASH MPD (Media Presentation Description) Parser compatible with Python 2.6+ and Python 3. + +[](https://github.com/sangwonl/python-mpegdash/actions?query=workflow%3A%22Build+Status%22) +[](https://github.com/sangwonl/python-mpegdash/blob/master/LICENSE) + +* * * + +## Installation + +```bash +$ pip install mpegdash +``` + +* * * + +## Test + +```bash +$ python -m unittest discover +$ python3 -m unittest discover +``` + +* * * + +## Usage + +```py +from mpegdash.parser import MPEGDASHParser + +# Parse from file path +mpd_path = './tests/mpd-samples/sample-001.mpd' +mpd = MPEGDASHParser.parse(mpd_path) + +# Parse from url +mpd_url = 'http://yt-dash-mse-test.commondatastorage.googleapis.com/media/motion-20120802-manifest.mpd' +mpd = MPEGDASHParser.parse(mpd_url) + +# Parse from string +mpd_string = ''' +<MPD xmlns="urn:mpeg:DASH:schema:MPD:2011" mediaPresentationDuration="PT0H1M52.43S" minBufferTime="PT1.5S" +profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" type="static"> + <Period duration="PT0H1M52.43S" start="PT0S"> + <AdaptationSet> + <ContentComponent contentType="video" id="1" /> + <Representation bandwidth="4190760" codecs="avc1.640028" height="1080" id="1" mimeType="video/mp4" width="1920"> + <BaseURL>motion-20120802-89.mp4</BaseURL> + <SegmentBase indexRange="674-981"> + <Initialization range="0-673" /> + </SegmentBase> + </Representation> + </AdaptationSet> + </Period> +</MPD> +''' +mpd = MPEGDASHParser.parse(mpd_string) + +# Write to xml file +MPEGDASHParser.write(mpd, './tests/mpd-samples/output.mpd') +``` + +* * * + +## License + +This project is released under the MIT license. +Please read and agree to the license before use, it can be found in the [LICENSE](LICENSE) file. + + + + +%prep +%autosetup -n mpegdash-0.3.1 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-mpegdash -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed Apr 12 2023 Python_Bot <Python_Bot@openeuler.org> - 0.3.1-1 +- Package Spec generated |
