Giter VIP home page Giter VIP logo

m3u8-cpp's Introduction

m3u8-cpp

This is a pure header files library used to parse M3U8. Spec depends on Apple's HTTP Live Streaming protocol.

I converted the node-m3u8 from javascript into c++ by using Github Copilot then made some adjustments.

All the test-cases passed (yes, I deleted some of them) but I am still not sure if everything works as expected.

TODO: Add serialize back for download function to save a local m3u8 file. But I am not sure if unserialize is necessary or not.

Build

sudo apt install nlohmann-json3-dev libcurl4-openssl-dev
mkdir build && cd build
cmake .. && make -j && make install

Test

./test/m3u8-test

Examples

Check local file.

./example/m3u8-file ../test/fixtures/variant.m3u8

Check online playlist.

./example/m3u8-url https://muiplayer.js.org/media/media.m3u8

Download m3u8 into one single file.

./example/m3u8-download https://muiplayer.js.org/media/media.m3u8 ~/Downloads/media.ts

Play m3u8 media.

./example/m3u8-player https://muiplayer.js.org/media/media.m3u8

Code Style

Need clang-format-12 at least.

find . -name "*.h" | xargs clang-format -i
find . -name "*.cpp" | xargs clang-format -i

m3u8-cpp's People

Contributors

jhurliman avatar zeerd avatar chriswiggins avatar astroza avatar eirikurn avatar bog avatar eladbenedict avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.