- Parse and extract transfer_characteristics from H264/H265 VUI
parameters.
- Set VIDEO-RANGE attribute in HLS according to HLS specification:
https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-02#section-4.4.4.2
- Also added an end to end test.
Fixes#632.
Change-Id: Iadf557d967b42ade321fb0b152e8e7b64fe9ff3e
Latest version of FFmpeg encodes non standard channel layout, e.g. 5.1(side), in AAC using PCE.
This is now supported with the below changes:
- Allow channel_configuration in ADTS header to be 0, as the cctual channel layout is specified
in PCE.
- Add GetFrameSizeWithoutParsing to determine the frame size before actually parsing the frame.
- Skip and resume later if not the whole frame is available.
- Also ensure that the next frame starts with a proper sync word.
Fixes#598.
VLC seems to generate access units with extra AUDs. In #526, the below
sequence is seen:
AUD | SPS | PPS | SPS | PPS | AUD | SEI | SEI | SEI | IDR_SLICE
Previously we exit early when seeing AUD, which results in delayed
processing of the access unit.
The behavior is changed to continue processing the following NAL units
to workaround the content issue.
Closes#526.
Change-Id: I80f571c0711c6db1337eb393fce36fae5432b6c5
kFrameSizeCodeTable rows are ordered by 32kHz, 44.1kHz and 48kHz,
which is the reverse of fscod (48kHz, 44.1kHz and 32kHz).
Also updated unittests.
Fixes#487.
Change-Id: Icb0afb8bb895afde0028eee05b403bc85bf7b538
Negative duration is not allowed, so set the duration of that sample to
an arbitrary small value in case it is needed to decode future samples.
Issue #451.
Change-Id: I9250d71d163f769ea2657d56e108b6dbd583de67
Configurable with --transport_stream_offset_ms.
This is needed to compensate for possible negative timestamps in
inputs, which could happen on ISO-BMFF with EditLists.
Issue #112.
Change-Id: I0fce8766c9df2911b9bb859c1e54052a8ed2abfb
Seeing some failures on some platforms when compiled with clang
disabled:
GYP_DEFINES="clang=0" gclient runhooks
Several changes to make it work:
1. Mark packager code with packager_code=1 in GYP definitions.
2. Disable a few checks in non-packager code, which we do not have
direct control: dangling-else, deprecated-declarations,
unused-function
3. Fix the relevant errors in packager code.
4. Revert HAVE_STROPTS_H in curl config which is not available in
all linux distributions.
Fixes#286Fixes#293
Change-Id: I729b41f99403c5ad9487c6cc4a7dc06f6323cef8
The error is logged only once to avoid log spamming.
Added definitions for the unsupported stream types for easy look up.
Change-Id: I097e2f05759bc84ef03f264cfabd2fb20da7c711
Implemented E-AC3 MPEG-2 Stream Encryption Format for HTTP Live
Streaming specified in https://goo.gl/1sgcwY
Issue #279
Change-Id: I36c1a05e3d0529ff810eaf52bdca45414baa93eb
Audio samples per frame for AC3 was not specified correctly earlier.
Also the number of channels is not correct if LFE channel is on.
Issue #165
Change-Id: Ibf20aa4c7aec43c07ec7cd394d631c537cb387dd
Implemented MPEG-2 Stream Encryption Format for HTTP Live Streaming
specified in https://goo.gl/N7Tvqi.
This change also moved ProgramMapTableWriter creation from TsWriter
to TsSegment.
Issue #165
Change-Id: Ia89dd16a5e6405706dd3d85ec6b6de580f7b13a7
In prep for changes to Trick Play, we want to make all messages
copy on write so that if the same message is sent to multiple
handlers, it is not possible for one handler to change the data
another handler is using.
Change-Id: I554166ca11c532412e4dfced5603972ca24dc2bb
Derive file size from media ranges instead.
Also fix subsegment range reporting for WebM (internal variable,
no output affected).
Change-Id: I5f8152dff4c2cd5fbae5550992b86a669e278f7b
- Changed OnMediaEnd() to take (sub)segment ranges.
- Define a structure to pass the ranges.
- This requires muxers to "cache" the segment ranges but in most cases,
they already do it, e.g. 'sidx' for mp4.
Change-Id: I16b974c1f0f54ca658cc6dbe605efff84a3f52eb
- Remove the TS key rotation not supported check as there is nothing
to be done for key rotation in TS for SAMPLE-AES.
- Fix IV updated problem in new segments even if crypto period does
not change.
- Avoid duplicate EXT-X-KEY tags if it does not change.
- Make EXT-X-DISCONTINUITY-SEQUENCE match with number of removed
EXT-X-DISCONTINUITY.
- Added end to end test for HLS with key rotation.
Change-Id: I73cb82e9f5575fcdf63ee643228efe78e6766302
Added a flag --strip_parameter_set_nalus. When enabled, parameter
set NAL units, SPS/PPS for H264 and SPS/PPS/VPS for H265, are stripped
from frames when converting NAL byte stream (AnnexB stream) to NAL
unit stream, which generates avc1/hvc1; otherwise they are not
stripped, and avc3/hev1 is generated.
Parameter set NAL units should not be stripped if they are varying
in the frames otherwise the frames may fail to be decoded.
The flag is enabled by default as we don't usually see varying
SPS/PPS/VPS and it is more space efficient with them stripped.
Set --strip_parameter_set_nalus=false to disable the flag if there
are varying SPS/PPS/VPS in the frames. This addresses #206.
Change-Id: I34bde6f33069f9f77d51a510b39f58a0f0e141aa
Also moved MediaHandler output validation to Initialize instead.
This CL also addresses #122 with consistent chunking.
Change-Id: I60c0da6d1b33421d7828bcb827d18899e71884ce
- WebVttMediaParser uses WebVttSampleConverter to generate non
overlapping media samples.
- The media samples contains ISO BMFF boxes.
- Add kCodecWebVtt to signal that the media is webvtt and
the samples will be in ISO BMFF boxes.
Change-Id: I639902cdba7b04af75428bc20622e26b8203cfb2
- Also sets up the packaging and verify it works.
Some of the changes are temporary to get the integration going.
Change-Id: I0cf6c379d185e157808acabb9ef58ff93d4a39ae
The spec actually requires all NAL units to be escaped, so there
is no need to escape it again.
NAL byte stream is one demarcation method; NAL unit stream is another
demarcation method. Regardless of the demarcation method used, the
requirement for NAL unit is the same. See the last paragraph of
7.4.1 NAL unit semantics on the requirement on emulation prevention bytes.
Change-Id: Icc63fcc5cf965632e331f5af5f673164c7c1663a
CENCv3 recommends only encrypting video data in slice NALs. Slice
data partition NALs should not be encrypted.
In the code, differentiate is_vcl and is_video_slice. They are the
same for H265; for H264, vcl NALs include slice data partition NALs
but video_slice NALs do not.
Change-Id: I91f4bdd76d25f0eac50e39aed350ebce3f667121
1. Replace STLDeleter with unique_ptr in container, which is
supported in C++11
2. Replace string_as_array with &string[0] which is guaranteed
to work in C++11
Change-Id: I7f39c0e51fc8a3fcbb41313094a0ca6b33db7bf3
In H264, there may be multiple consecutive video slice NAL units
in the same frame. The original code assigns a new access unit
for every video slice NAL unit, which is incorrect.
Fixes#134.
Change-Id: I4d44271df48cb08867ddd02f7494fb3573af3356