diff --git a/CHANGELOG.md b/CHANGELOG.md index 7848c7161c..9f3a041921 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +## [1.5.0] - 2016-07-12 +### Added +- Added TS (output) and HLS (output) with SAMPLE-AES encryption support. + Note that only H.264 and AAC are supported right now. +- Added support for CENCv3, i.e. 'cbcs', 'cbc1', 'cens' protection schemes. +- Added H.265 support in TS (input) and iso-bmff (input / output). +- Added experimental Opus in iso-bmff support. + +### Changed +- Change project name from edash-packager to shaka-packager. Also replaces + various references of edash in the code accordingly. + ## [1.4.1] - 2016-06-23 ### Fixed - [VP9] VPCodecConfiguration box should inherit from FullBox instead of Box. @@ -161,6 +173,7 @@ First public release. - Added mpd_generator driver program to generate mpd file from packager generated intermediate files. +[1.5.0]: https://github.com/google/shaka-packager/compare/v1.4.0...v1.5.0 [1.4.1]: https://github.com/google/shaka-packager/compare/v1.4.0...v1.4.1 [1.4.0]: https://github.com/google/shaka-packager/compare/v1.3.1...v1.4.0 [1.3.1]: https://github.com/google/shaka-packager/compare/v1.3.0...v1.3.1 diff --git a/README.md b/README.md index df2c774c1d..9b32491b9e 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ -![Shaka Packager](docs/shaka-packager.png) +# ![Shaka Packager](docs/shaka-packager.png) [![Build Status](https://travis-ci.org/google/shaka-packager.svg?branch=master)](https://travis-ci.org/google/shaka-packager) -Media packaging SDK intended for C++ programmers writing DASH packager applications with common encryption support, Widevine DRM support, Live, and Video-On-Demand. +Media packaging SDK intended for C++ programmers writing DASH/HLS packager applications with common encryption support, Widevine DRM support, Live, and Video-On-Demand. -This document provides the information needed to create a DASH packager that is able to remux and encrypt a video into fragmented ISO BMFF format with common encryption (CENC) support. The DASH packaging API is also designed in such a way for easy extension to more source and destination formats. +This document provides the information needed to create a DASH/HLS packager that is able to remux and encrypt a video into fragmented ISO BMFF format with common encryption (CENC) support. The DASH/HLS packaging API is also designed in such a way for easy extension to more source and destination formats. Current supported codecs: @@ -12,15 +12,15 @@ Current supported codecs: |:-----------------:|:------------:|:------------:|:------------:|:-----------:| | H264 (AVC) | I / O | - | I / O | I | | H265 (HEVC) | I / O | - | I | - | -| VP8 | I / O | I / O | - | - | -| VP9 | I / O | I / O | - | - | +| VP8 | *I / O* | I / O | - | - | +| VP9 | *I / O* | I / O | - | - | | AAC | I / O | - | I / O | I | | Dolby AC3/EAC3 | I / O | - | - | - | | DTS | I / O | - | - | - | -| Opus | - | I / O | - | - | +| Opus | *I / O* | I / O | - | - | | Vorbis | - | I / O | - | - | ** I for input and O for output. -** We will update this table once new formats are supported. +** VP8/VP9/Opus support in ISO-BMFF is experimental. Right now this project is supported directly on Linux and MacOSX platforms only. One option to run shaka-packager on other platforms is using [docker] (#Using docker for testing /development). @@ -268,16 +268,16 @@ mpd_generator \ Output MPEG2-TS video. ```Shell packager \ - 'input=bear-1280x720.mp4,stream=video,segment_template=bear$Number$.ts,output_format=ts' + 'input=bear-1280x720.mp4,stream=video,segment_template=bear$Number$.ts' ``` Output HLS playlists with MPEG2-TS video. The following outputs a Master Playlist as `master.m3u8`. And the Media Playlist for the video as -`playlist.m3u8`. `--hls_base_url` specifies the prefix for the +`playlist.m3u8`. The optional `--hls_base_url` specifies the prefix for the generated TS segments. ```Shell packager \ - 'input=bear-1280x720.mp4,stream=video,segment_template=bear$Number$.ts,output_format=ts,playlist_name=playlist.m3u8' \ + 'input=bear-1280x720.mp4,stream=video,segment_template=bear$Number$.ts,playlist_name=playlist.m3u8' \ --single_segment=false \ --hls_master_playlist_output="master.m3u8" \ --hls_base_url="http://localhost:10000/" @@ -287,8 +287,8 @@ For audio Media Playlists, the name and group for EXT-X-MEDIA tag must be specified. ```Shell packager \ - 'input=input.mp4,stream=video,output_format=ts,segment_template=output$Number$.ts,playlist_name=video_playlist.m3u8' \ - 'input=input.mp4,stream=audio,output_format=ts,segment_template=output_audio$Number$.ts,playlist_name=audio_playlist.m3u8,hls_group_id=audio,hls_name=ENGLISH' \ + 'input=input.mp4,stream=video,segment_template=output$Number$.ts,playlist_name=video_playlist.m3u8' \ + 'input=input.mp4,stream=audio,segment_template=output_audio$Number$.ts,playlist_name=audio_playlist.m3u8,hls_group_id=audio,hls_name=ENGLISH' \ --single_segment=false \ --hls_master_playlist_output="master_playlist.m3u8" \ --hls_base_url="http://localhost:10000/" diff --git a/packager/media/formats/mp2t/program_map_table_writer.cc b/packager/media/formats/mp2t/program_map_table_writer.cc index e91ef28d13..b5c56e264e 100644 --- a/packager/media/formats/mp2t/program_map_table_writer.cc +++ b/packager/media/formats/mp2t/program_map_table_writer.cc @@ -193,8 +193,8 @@ void WritePmtToBuffer(const uint8_t* pmt, void WritePrivateDataIndicatorDescriptor(FourCC fourcc, BufferWriter* output) { const uint8_t kPrivateDataIndicatorDescriptor = 15; output->AppendInt(kPrivateDataIndicatorDescriptor); - output->AppendInt(static_cast(sizeof(FOURCC_aacd))); - output->AppendInt(FOURCC_aacd); + output->AppendInt(static_cast(sizeof(fourcc))); + output->AppendInt(fourcc); } bool WriteAacAudioSetupInformation(const uint8_t* aac_audio_specific_config, @@ -376,7 +376,7 @@ bool AacProgramMapTableWriter::EncryptedSegmentPmtWithParameters( int current_next_indicator, BufferWriter* writer) { // -12 because there are 12 bytes between 'descriptor_length' in - // registartion_descriptor and 'setup_data_length' in audio_setup_information. + // registration_descriptor and 'setup_data_length' in audio_setup_information. if (aac_audio_specific_config_.size() > std::numeric_limits::max() - 12) { LOG(ERROR) << "AACAudioSpecificConfig of size: " diff --git a/packager/media/formats/mp2t/ts_segmenter.cc b/packager/media/formats/mp2t/ts_segmenter.cc index 458c2c3989..fa1be6d98c 100644 --- a/packager/media/formats/mp2t/ts_segmenter.cc +++ b/packager/media/formats/mp2t/ts_segmenter.cc @@ -189,7 +189,7 @@ Status TsSegmenter::NotifyEncrypted() { if (!pes_packet_generator_->SetEncryptionKey(encryption_key_.Pass())) return Status(error::INTERNAL_ERROR, "Failed to set encryption key."); - ts_writer_->SignalEncypted(); + ts_writer_->SignalEncrypted(); } return Status::OK; } diff --git a/packager/media/formats/mp2t/ts_segmenter_unittest.cc b/packager/media/formats/mp2t/ts_segmenter_unittest.cc index 07acf20cb9..9595190d28 100644 --- a/packager/media/formats/mp2t/ts_segmenter_unittest.cc +++ b/packager/media/formats/mp2t/ts_segmenter_unittest.cc @@ -75,7 +75,7 @@ class MockTsWriter : public TsWriter { public: MOCK_METHOD1(Initialize, bool(const StreamInfo& stream_info)); MOCK_METHOD1(NewSegment, bool(const std::string& file_name)); - MOCK_METHOD0(SignalEncypted, void()); + MOCK_METHOD0(SignalEncrypted, void()); MOCK_METHOD0(FinalizeSegment, bool()); // Similar to the hack above but takes a scoped_ptr. @@ -457,7 +457,7 @@ TEST_F(TsSegmenterTest, WithEncryptionNoClearLead) { TsSegmenter segmenter(options, &mock_listener); EXPECT_CALL(*mock_ts_writer_, Initialize(_)).WillOnce(Return(true)); - EXPECT_CALL(*mock_ts_writer_, SignalEncypted()); + EXPECT_CALL(*mock_ts_writer_, SignalEncrypted()); EXPECT_CALL(*mock_pes_packet_generator_, Initialize(_)) .WillOnce(Return(true)); @@ -495,7 +495,7 @@ TEST_F(TsSegmenterTest, WithEncryptionNoClearLeadNoMuxerListener) { TsSegmenter segmenter(options, nullptr); EXPECT_CALL(*mock_ts_writer_, Initialize(_)).WillOnce(Return(true)); - EXPECT_CALL(*mock_ts_writer_, SignalEncypted()); + EXPECT_CALL(*mock_ts_writer_, SignalEncrypted()); EXPECT_CALL(*mock_pes_packet_generator_, Initialize(_)) .WillOnce(Return(true)); @@ -616,7 +616,7 @@ TEST_F(TsSegmenterTest, WithEncryptionWithClearLead) { EXPECT_CALL(mock_listener, OnEncryptionStart()); EXPECT_CALL(*mock_pes_packet_generator_raw, SetEncryptionKeyMock(_)) .WillOnce(Return(true)); - EXPECT_CALL(*mock_ts_writer_raw, SignalEncypted()); + EXPECT_CALL(*mock_ts_writer_raw, SignalEncrypted()); EXPECT_OK(segmenter.AddSample(sample2)); } diff --git a/packager/media/formats/mp2t/ts_writer.cc b/packager/media/formats/mp2t/ts_writer.cc index 79f16267a8..250c7014a1 100644 --- a/packager/media/formats/mp2t/ts_writer.cc +++ b/packager/media/formats/mp2t/ts_writer.cc @@ -227,7 +227,7 @@ bool TsWriter::NewSegment(const std::string& file_name) { return true; } -void TsWriter::SignalEncypted() { +void TsWriter::SignalEncrypted() { encrypted_ = true; } diff --git a/packager/media/formats/mp2t/ts_writer.h b/packager/media/formats/mp2t/ts_writer.h index 8811507c16..b46a0b7aa6 100644 --- a/packager/media/formats/mp2t/ts_writer.h +++ b/packager/media/formats/mp2t/ts_writer.h @@ -42,7 +42,7 @@ class TsWriter { virtual bool NewSegment(const std::string& file_name); /// Signals the writer that the rest of the segments are encrypted. - virtual void SignalEncypted(); + virtual void SignalEncrypted(); /// Flush all the pending PesPackets that have not been written to file and /// close the file. diff --git a/packager/media/formats/mp2t/ts_writer_unittest.cc b/packager/media/formats/mp2t/ts_writer_unittest.cc index cc547f6e43..f5c7e83811 100644 --- a/packager/media/formats/mp2t/ts_writer_unittest.cc +++ b/packager/media/formats/mp2t/ts_writer_unittest.cc @@ -319,7 +319,7 @@ TEST_F(TsWriterTest, EncryptedSegmentsH264Pmt) { EXPECT_TRUE(ts_writer_.FinalizeSegment()); // Overwrite the file but as encrypted segment. - ts_writer_.SignalEncypted(); + ts_writer_.SignalEncrypted(); EXPECT_TRUE(ts_writer_.NewSegment(test_file_name_)); EXPECT_TRUE(ts_writer_.FinalizeSegment()); @@ -381,7 +381,7 @@ TEST_F(TsWriterTest, EncryptedSegmentsAacPmt) { EXPECT_TRUE(ts_writer_.FinalizeSegment()); // Overwrite the file but as encrypted segment. - ts_writer_.SignalEncypted(); + ts_writer_.SignalEncrypted(); EXPECT_TRUE(ts_writer_.NewSegment(test_file_name_)); EXPECT_TRUE(ts_writer_.FinalizeSegment());