sample_entry_payload += u1616.pack(params['sampling_rate'])
if fourcc == 'AACL':
- smaple_entry_box = box(b'mp4a', sample_entry_payload)
+ sample_entry_box = box(b'mp4a', sample_entry_payload)
else:
sample_entry_payload = sample_entry_payload
sample_entry_payload += u16.pack(0) # pre defined
if fourcc in ('H264', 'AVC1'):
sps, pps = codec_private_data.split(u32.pack(1))[1:]
avcc_payload = u8.pack(1) # configuration version
- avcc_payload += sps[1] # avc profile indication
- avcc_payload += sps[2] # profile compatibility
- avcc_payload += sps[3] # avc level indication
+ avcc_payload += sps[1:4] # avc profile indication + profile compatibility + avc level indication
avcc_payload += u8.pack(0xfc | (params.get('nal_unit_length_field', 4) - 1)) # complete represenation (1) + reserved (11111) + length size minus one
avcc_payload += u8.pack(1) # reserved (0) + number of sps (0000001)
avcc_payload += u16.pack(len(sps))
avcc_payload += u16.pack(len(pps))
avcc_payload += pps
sample_entry_payload += box(b'avcC', avcc_payload) # AVC Decoder Configuration Record
- smaple_entry_box = box(b'avc1', sample_entry_payload) # AVC Simple Entry
- stsd_payload += smaple_entry_box
+ sample_entry_box = box(b'avc1', sample_entry_payload) # AVC Simple Entry
+ stsd_payload += sample_entry_box
stbl_payload = full_box(b'stsd', 0, 0, stsd_payload) # Sample Description Box
count = 0
while count <= fragment_retries:
try:
- success = ctx['dl'].download(target_filename, {'url': segment_url})
+ success = ctx['dl'].download(target_filename, {
+ 'url': segment_url,
+ 'http_headers': info_dict.get('http_headers'),
+ })
if not success:
return False
down, target_sanitized = sanitize_open(target_filename, 'rb')