A media packaging and development framework for VOD and Live DASH and HLS applications, supporting Common Encryption for Widevine and other DRM Systems.
Go to file
Joey Parrish af98d48726
fix: Fix flush/close semantics for HTTP files, improve testing (#1232)
All HTTP-based tests now use an embedded test server instead of
httpbin.org, which makes them much faster and more reliable.

These more reliable tests also exposed some issues that began recently
with PR #1201.  HttpFile's Flush() semantics were different than those
documented for files in general.  Flush() used to close the file for
uploading, so that no further writes were allowed, but the documentation
stated that it would only flush data to its destination.  PR #1201
brought HttpFile's Flush() in line with the docs, but gave us no way to
terminate a chunked upload.

This adds a new method to File called CloseForWriting(), which
terminates a chunked upload for HttpFile.  The only other implementation
that does anything is UdpFile, which uses the socket library function
shutdown() to terminate writes while allowing reads.

This also tweaks HttpFile::CloseWithStatus() so that it will not
generate an error if the file is closed before the HTTP response is
written to the download cache.

This modifies the test HttpFileTest.MultipleWrites so that the file is
Flushed after each chunk.  This adds test coverage for the changes
introduced in PR #1201.

Fixes #1224 (missing test coverage for HttpFile::Flush)
2023-07-13 18:55:48 -07:00
.github fix: Fix protoc linking on macOS w/ update to fork (#1132) 2022-11-04 08:33:01 -07:00
docs Merge remote-tracking branch 'upstream/main' into cmake 2023-07-05 19:51:52 -07:00
npm chore: Update URLs after moving projects (#1042) 2022-03-07 11:56:34 -08:00
packager fix: Fix flush/close semantics for HTTP files, improve testing (#1232) 2023-07-13 18:55:48 -07:00
.clang-format Use Chromium style for clang-format 2014-07-02 22:49:46 +00:00
.dockerignore Reduce Docker image size 2018-12-20 13:31:03 -08:00
.gitignore test: Add Mongoose embedded HTTP server (#1231) 2023-07-13 16:36:42 -07:00
.gitmodules test: Add Mongoose embedded HTTP server (#1231) 2023-07-13 16:36:42 -07:00
AUTHORS Merge remote-tracking branch 'upstream/main' into cmake 2023-07-05 19:51:52 -07:00
CHANGELOG.md chore: Update URLs after moving projects (#1042) 2022-03-07 11:56:34 -08:00
CMakeLists.txt feat: CMake port media/trick_play (#1146) 2023-05-01 14:57:40 -07:00
CONTRIBUTING.md Add AUTHORS, CONTRIBUTORS, CONTRIBUTING.md, and README.md 2014-04-19 00:05:38 +00:00
CONTRIBUTORS docs: Update CONTRIBUTORS (#1190) 2023-07-05 14:32:24 -07:00
Dockerfile feat: First phase of CMake build system implementation (#1072) 2022-08-16 11:34:51 -07:00
LICENSE chore: Mass-update copyright headers (#1086) 2022-08-26 08:44:59 -07:00
README.md docs: Deprecate the mailing list for releases (#1071) 2022-06-28 09:58:17 -07:00
chromium-LICENSE chore: Mass-update copyright headers (#1086) 2022-08-26 08:44:59 -07:00

README.md

Shaka Packager

Shaka Packager is a tool and a media packaging SDK for DASH and HLS packaging and encryption. It can prepare and package media content for online streaming.

Shaka Packager supports:

  • Both Video-On-Demand and Live.

  • Streaming formats:

  • Key systems:

  • Encryption standards:

  • Media Containers and codecs

    Codecs ISO-BMFF WebM MPEG2-TS WVM Packed Audio²
    H264 (AVC) I / O - I / O I -
    H265 (HEVC) I / O - I - -
    VP8 I / O I / O - - -
    VP9 I / O I / O - - -
    AV1 I / O I / O - - -
    AAC I / O - I / O I O
    MP3 O - I / O - O
    Dolby AC3 I / O - I / O - O
    Dolby EAC3 I / O - O - O
    MPEG-H Audio I / O - - - -
    Dolby AC4 I / O - - - -
    DTS I / O - - - -
    FLAC I / O - - - -
    Opus I / O³ I / O - - -
    Vorbis - I / O - - -

    NOTES:

  • Subtitles

    Format Input Output
    Text WebVTT Y Y
    WebVTT in MP4 #405 Y
    Text TTML Y
    TTML in MP4 - Y
    DVB-SUB Y -
    Teletext #272 -
    • ⁴: TTML input is only supported with TTML output (pass-through, DASH only), see also #584.
  • Platforms
    • Linux
    • Mac
    • Windows
    • Cross compiling for ARM is also supported.

1: Limited support

Getting Shaka Packager

There are several ways you can get Shaka Packager.

Useful Links

Contributing

If you have improvements or fixes, we would love to have your contributions. See https://github.com/shaka-project/shaka-packager/blob/main/CONTRIBUTING.md for details.