- @width, @height, @frameRate for Representation element will not be
set if the attributes are set at AdaptationSet level.
Issue #55
Change-Id: Ib4e669142874f9e8f0ca773df9f87a3fef01b729
- Box definitions for box type DAC3.
- Parser/muxer changes to support AC3 audio codecs.
- EC3 audio sample entry will come in Part 2.
- MPD signaling will come in Part 3.
Issue #64
Change-Id: I790b46ae8179b933bb8f7da9cdd38591fe8da43d
ThreadedIoFile spawns a new thread for every new file. Thread
information is stored for tracking purpose by base::tracked_objects.
The tracking object remains even if the thread itself is destroyed.
This results in memory usage increased by a couple of bytes for every
new segment created in live mode (new segments spawns new threads).
Use WorkerPool instead to avoid spawning new threads.
Fixes Issue #61.
Change-Id: Id93283903c3ba8ebf172a0d58e19b082a72c6cf0
For mp4 outputs, a metadata box with version information is added to
moov box.
For mpd outputs, a text comment with version information is added in
the beginning of mpd file.
Issue #60
Change-Id: I783ba370781c0a8f77c910ff1172bad2e7edff75
- Another minor change in segmenter_test_base: scoped_refptr can
be passed by value, remove ".Pass".
Change-Id: I31f0cf74c5ad0aba8890d3b1845155d63d7326a0
* Changed Segmenters to accept StreamInfo rather than MediaStream
to help in testing.
* Changed MemoryFile behavior to mirror local file:
* Read non-existent file is an error.
* Write deletes any existing file.
* Fixed a bug in SingleSegmentSegmenter.
Change-Id: I339e35597ca4661b7a26c6fdbbfa2f9f511c7da0
Javascript/JSON does not support int64_t or unsigned numbers. asset_id,
if greater than 0x80000000 will be converted to negative number. Use
double to represent asset_id instead as 32-bit integer can be lossless
represented using double.
Bug: 26309000
Change-Id: I3e800c396a1231375776295154fb0d96156e980b
- Replaced urn:mpeg:DASH:schema:MPD:2011 with
urn:mpeg:dash:schema:mpd:2011. The former is from the old spec.
- Replaced the MPD schema with the latest one.
- Fixed subSegmentAlignment typo with subsegmentAlignment.
Issue #55
Change-Id: Icffa9872ffc462627b81900a48f59e7b76687c11
This can be used for unit tests to reduce the need for temporary
files. A MemoryFile acts the same as any other File object, but
stores the contents in memory. The memory pointer can be accessed
directly. A file with the 'memory://' prefix will be a memory file.
Change-Id: I10ae3ed5391c8fd838e6dfb33106dec959bdc224
- Parse vp9 bitstream to get vpx codec configuration
- Add subsample encryption for vp9
- Also fixed a bug in VP9 parser if segmentation update_map is enabled
Change-Id: I69dc97088aa38c94c6d37fdbcf3d9cfc942a3df6
Profiling can be enabled by setting profiling=1 in gyp, e.g.
GYP_DEFINES="profiling=1" gclient runhooks
To turn on heap profiling, use the HEAPPROFILE environment variable
to specify a filename for the heap profile dump, e.g.
HEAPPROFILE=/tmp/heapprofile out/Release/packager ...
To turn on cpu profiling, use the CPUPROFILE environment variable
to specify a filename for the cpu profile dump, e.g.
CPUPROFILE=/tmp/cpuprofile out/Release/packager ...
Note that profiling may not work for debug builds, so use release
build if possible.
See docs/linux_profiling.md for details.
This change will help identify and resolve problem behind Issue #61.
Change-Id: I6f85a04ed82dd0cb3588e6b38e8ceb68dac6c436
- Add Box::WriteHeader and Box::HeaderSize methods. The concrete
box implementations should not need care about whether it is a
Box or FullBox normally.
- Rename Box::ReadWrite to Box::ReadWriteInternal to make it clear
that it is an internal methods. Make it private so it cannot be
incorrectly called in box implementions.
- Make an internal implementation of ComputeSizeInternal to compute
box size. |atom_size| is updated in ComputeSize, which wraps
ComputeSizeInternal.
Change-Id: I3fbcf8c527581b676d9d13f1ac1dd798da7c4d5f
Added two stream descriptors that are both used to tell the output
format. If it is not given, the packager will use the output file
extension to determine the output format.
Change-Id: Ib8d5dcf52956c2d451e77ea6a90d9502d4a77064
* Added WebM muxer that supports both single and multi-segment modes.
* WebM muxer supports MPD generation.
* Enabled WebM muxer and demuxer in packager.
b/22463220
b/25089245
b/25089714
Change-Id: I9f6e8fc51e08fbb1d685229c5cb54ea60f7bed8f
- Also set --clear_lead to 1 if encryption is enabled to make sure some
of the segments are encrypted.
- Also fixed glint errors.
Change-Id: Ie92ad3ea1a3fd95d059e424a114b863ac393e6bf
- Check whether if it can be parsed by libxml2 and check if the root
element is a 'tt' element.
- Added unit tests for determining TTML and WebVTT.
Change-Id: I4fea1881f0ab70970700601d8d7cea32cc04752c
- Since most use cases use notifier implementations that already uses
locks, removing locks from MpdBuilder.
- Added locks to MpdNotifier::Flush() implementations. Multiple threads
were able to write to the same file.
Issue #45, #49
Change-Id: I6e39824485672f40e6c947da97f1743fac174167
- Added ignores.txt file. When doing a tsan build,
tsan_blacklist gyp flag should point to the file.
Change-Id: Ia69f89f1906f0b386e081a7df5a7c867e411f8fd
Also update the code to generate CompressorName in VideoSampleEntry
for both AVC1 and various VP codecs.
Change-Id: I2355f8008a72806e852aa1ec6c80e9141b97d963
- Added factory methods for creating Representation and AdaptationSet in
tests.
- Since most tests only needed access to the constructors for
Representation and AdaptationSet, instead of using
FRIEND_TEST_ALL_PREFIXES() for each test case, added factory methods
on the test class.
- Check the 'frameRate' attribute in
CommonMpbBuilderTest.SetSampleDuration.
Change-Id: I57bd3a90b397f90c3a3a91de03eb96000f58ef58
Also includes its dependencies, like media/base/text_track_config.*
and media/filters/webvtt_util.h
Change-Id: I5b26245daf004da19b912b7c5b2c21ce4ba85688
Uses EXPECT_NEAR for comparison with an acceptable error bound. Also
increases error bound to 50ms.
Change-Id: I8fc61b3b915a50f8fe33b9ea72e123aefee25a80
- Neither live with or without key rotation did not output the right
result.
- No key rotation: did not produce any ContentProtection element.
- With key rotation: did not have DRM specific ContentProtection.
- To get key rotation working with shaka player, <cenc:pssh> elements
are removed.
Change-Id: I1f34d303ae1f3ea81820e3368ab66b8420498372
- Added --iv to inject iv for fixed key encryption.
- Added support for key rotation in fixed key encryption.
- Added --use_fake_clock_for_muxer to set timestamp to 0 in the output.
Also updates stream info dump message:
- Modified pixel_width: %d\n pixel_height: %d to pixel aspect ratio: %d:%d
- Removed language from video stream info.
These flags should only be used for testing.
Change-Id: Iedf8d6d6492226219f49fe44d932645f557010e4
- ContentProtection elements were missing when using MpdWriter,
therefore mpd_generator also did not generate ContentProtection.
- MpdWriter uses MpdNotifier now, instead of directly using MpdBuiler.
- Add mock_mpd_notifier.{h,cc} to be shared by several tests.
Change-Id: Id0f6213aa0c80e50294cd4193962054b0b5c2492
Cropping is necessary if width/height are not exactly disivible by 16 due
to 16x16 macroblock size.
The width and height fields in VisualSampleEntry must correctly document
the cropped frame dimentions (visual presentation size) of the AVC stream
that is described by that entry.
Also fixes width/height in input mp4 and wvm streams if the values in
VisualSampleEntry / metadata do not match with the values in
AVCDecoderConfigurationRecord (SPS).
Issue: 39
Change-Id: Id55c5acf245bee3f4e66302b2042eb7d9c488c19
- Because MpdBuilder no longer sets ContentProtection, live was broken.
- For key-rotation, <cenc:pssh> element is updated.
Change-Id: I45bb80a12faff39ccf5deb82439c0732ed9cea59
- Without the Flush() method the implementation had to do writes in
almost all methods. Usually the user of the notifier knows when to
write out the MPD.
Change-Id: Ic165d4594f01357a8ac7e8501eefa0f85c08d32f
- SimpleMpdNotifier didn't register the container ID to its map for VOD.
- AddContentProtection() was not implemented.
Change-Id: I5f1412c785ee5ad3d00910755ff283c404dd895c
Quotient reduction to minimal form does not work well in practice due to
rounding of the inputs.
Bug: 23432995
Change-Id: If333ab48accb7f6a3fac6ba4eb48ca7b9cee9826
This fixes a circular dependency of media_base depends on filter and
filter depends on media_base.
Also added code to extract sar in WvmMediaParser if it is not yet
extracted when setting extra_data.
Change-Id: I1b5aef2444e4134c9b6663911ac5e5c4c220404a
- subSegmentAlignment logic assumed that all Representations were
added before calling Representations::AddNewSegment() on any
Representation in an AdaptationSet. It is not a valid assumption
for VOD and is removed.
Change-Id: Ifb7e34ee103ee30027e45a804427baf281f3137c
- Width/Height in tkhd box should be display resolution instead of
coded resolution.
- pasp was not generated earlier.
- Assuming SAR as 1:1 if it failed to be extracted successfully.
- Also update test files for mp4_media_parser_unittest.
This fixes Issue #35.
Change-Id: Iedbe6a44465aac6723b6ea2de30aed180821eccd
- Call NotifyNewSegment() in MpdNotifyMuxerListener::OnMediaEnd() to
notify subsegments.
- This is necessary for MpdBuilder to calculate subsegmentAlignment.
Change-Id: I9359c408da4f616e543a6d9e568b010a90c90185
The segment duration was not reset after segment was finalized. It
was reset after adding one sample. This new sample was added to the
new fragment but was not recorded in the new segment, which resulted
in off-by-one error in the segment generation.
Change-Id: I1f9e00591be6b897773bf6caf94409b4bcd2277f
- Saves sample_duration in the media_info protobuf.
- When MpdNotifyMuxerListener::OnMediaEnd() is called, media_info passed
to MpdNotifier::NotifyNewContainer() should contain the sample
duration.
- Add tests for MpdNotifyMuxerListener.
- Moved common code from vod_media_info_dump_muxer_listener_unittest.cc
and mpd_notify_muxer_listener_unittest.cc to
muxer_listener_test_helper.cc.
Change-Id: Ibf2340076d45828d26f1af54a1ed8e95e5884c23
- AdaptationSet::OnNewSegmentForRepresentation() calculates whether the
Representations are aligned by looking at the start time and duration.
(Except that duration is not used in this implementation).
- Add RepresentationStateChangeListener to callback
AdaptationSet::OnNewSegmentForRepresentation() from Representation.
Change-Id: I3c30bd6652880dabb9d5c619d8a733ffc789eec9
- The tests couldn't run in parallel using gtest-parallel
(https://github.com/google/gtest-parallel) because all the tests
used the same file.
Change-Id: I9a3d2c20c290fbf4bee2a1d79c4ce9bf802aefcf
- ContentProtection elements should be added explicitly by the
AddContentProtection() methods.
- This is because some MPDs should have ContentProtection at
AdaptationSet level instead of Representation.
- Change SimpleMpdNotifier, which uses MpdBuilder, to add
ContentProtectionElements. The logic is moved from MuxerListener.
- Add Element class for specifying subelements for
ContentProtectionElement.
Change-Id: I9bedfb3e5a5ac0b3d5c702f1e6e4a8608c978d1d
- The UUID and DRM name can be fetched from KeySource.
- Add ProtectedContent message to MediaInfo. The message contains basic
information for the protected content, such as the default key ID for
the content.
- The message is required to separate Representations with different
content protection information into different AdaptationSets.
Change-Id: Ib9dc834ae0abf93b7ca0acdf52a865b1394a4816
- Pass pixel_height and pixel_width from VideoStreamInfo to MediaInfo.
- par can only be set if all the Representations have the same
picture aspect ratio. That is the ratio of sar_x*width:sar_y*height
should all be the same.
- If there is a Representation that does not have the sar attribute set,
par is also not set.
Change-Id: Id34c95e4a99da9ce028a9f35737cfe5bca9e5697
- Adding YCM configuration file for edash packager.
- For now the developer has to do a Debug build before YCM starts
working.
- Also PATH must be set to where 'clang' is so that the system headers
are included (e.g. for classes in std namespace).
Change-Id: I934f69fa6d70b930bde3fd684fa5d6a8204c5631
- Added logic to container parsers to extract pixel width and height.
- If the container doesn't contain the pixel width and height of the
stream and the stream is H264, this parses the SPS to get the
sar_width and sar_height.
- If extracted sar_width and sar_height are 0s then they imply 1s.
- Add hb2_v_frag.mp4 for test media. This does not have a
'pasp' box and has sar_width = 8 sar_height = 9.
Change-Id: I4a06ce95582547bec19adb7905e7612c5a1f359e
- The fields used to be repeated but there is no use case at the moment.
- DASH IOP explicitly disallows segments with multiple tracks.
Change-Id: Ia0af2048210c546dfaa178735605a81052ea1123
- DASH IOP requires AdaptationSets with video Representations to have:
@maxWidth (or @width if all the Representations have the same width).
@maxHeight (or @height if all the Representations have the same width).
@maxFrameRate (or @frameRate if all the Representations have the same
frame rate).
Change-Id: I1247b7461237255aeb70b7fb40f78d4439f9c529
- Get the first sample duration in Segmenter.
- Pass the value all the way to Representation thru MuxerListener.
Change-Id: I76fd970f8140d359863363dc347958f680cca5ae
BoringSSL removes the variants that had been used, in which the hash
is given a default value. This change makes the code more compatible
with BoringSSL.
Change-Id: I665084c2e71593db1afd6baf182224fe0d23c944
mp4 code was changed earlier which uses openssl in some way but the
dependency was not updated.
Issue: 15
Change-Id: Icababe00753f739832d61bc6792d95321cc59cf5
The input source may produce inputs with very small sizes. Demuxer
needs to accumulate enough bytes before trying to detect the container
type.
Issue: https://github.com/google/edash-packager/issues/11
Change-Id: Ie25339832a826e78f39b3b25abb98c1ad89e3021
Due to various libraries' inconsistencies with using EoF, this change
will instead continue to read a file until the number of bytes read is
0. It considers bytes_read == 0 to mean end of file.
Change-Id: I90a592d6ae2b9879fe21bd0c4f9e1c9cbc680afe
Find curl_ca_bundle script is used by linux only. Move it out of
gyp and make sure it runs only in linux.
Also make zlib deps generic for all systems, not for linux only.
This is the first step of getting edash_packager builds on Windows
and Mac.
Change-Id: I82d3e5872fd0dd6f57127890bc062490332a1b69
Increases the read/write buffers for packager input and output files to
2MB from 256KB, which helps throughput when using network file systems.
Change-Id: Iff5d1b796ba4648f1436e0559c0ca2d353b6c4b5
CreateTemporaryFileInDir uses mkstemp which works only on local files.
This change enables the use of other types of files, like network file
as temporary directory.
Bug: 19246995
Change-Id: Ic752725e56b65eec2cd10a4e5d760c6f76ba4f18
If a stream has no language metadata, or has the wrong metadata, this
field allows the user to override this on the command-line.
This also maps all specified languages on the command-line to ISO-639-2
tags as required by the MP4 muxer, so that ISO-639-1 tags specified on
the command-line do not cause a DCHECK to fail.
b/18613148
Change-Id: I473baeecbb3d388db5e06d080179ec6a332b4794
Additionally, for XML schema correctness, convert ISO-639-2 language
tags (three-letter codes) to ISO-639-1 tags (two-letter codes) when
possible. This follows BCP-47, which says to always use the shortest
language tag when there are multiple possibilities.
b/18613148
Change-Id: I120fb7b42ac4da5feb4ca046bba93d9e58acd7a9
MSE requires 'base-data-offset-present' not to be set, but FFmpeg may
generate fmp4 files with this flag though it actually uses moof as base.
Log a warning instead of failing directly in this case.
FFmpeg may also generates fmp4 files without tfdt box
(TrackFragmentDecodeTime) box, which is again non-MSE compliant. Handle
this scenario properly.
Bug: 18613712
Also fixes a test failure in SegmentTemplateTest introduced in an earlier
change.
Bug: 19235748
Change-Id: I4bcbb675b22a832a88cd33ee64c3e99a1c6e3a63