Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: Unknown segment type! AAC file #120

Open
dr4mohamed opened this issue Mar 2, 2022 · 3 comments
Open

Warning: Unknown segment type! AAC file #120

dr4mohamed opened this issue Mar 2, 2022 · 3 comments

Comments

@dr4mohamed
Copy link

Hi,
i'm python developer, i need to decrypt sample-aes ,
i read this article
https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/HLS_Sample_Encryption/Encryption/Encryption.html
after same tests i can't get it work
but after testing your script i get this problem :

i have m3u8 playlist ( 3 video quality and 3 audio )
the problem when i select video and audio ( no audio output)
when i select only the audio i get Unknown segment type
can you help me please ??
the problem with TS_SYNC_BYTE (in live stream) + AAC segment
if possible to make ACC decypt and AVC decrypt only on sgement with CLI stdin stdout ?

thanks.

@dr4mohamed
Copy link
Author

dr4mohamed commented Mar 2, 2022

AAC segment key : 0f2c901630a0f85cf1864227a38bccfc

Encrypted_AAC_Frame () {
--
ADTS_Header                        // 7 or 9 bytes
unencrypted_leader                 // 16 bytes
while (bytes_remaining() >= 16) {
encrypted_block                // 16 bytes
}
unencrypted_trailer                // 0-15 bytes
}

1.zip

@dr4mohamed
Copy link
Author

dr4mohamed commented Mar 2, 2022

AAC packet first bytes..

[mohamed@l0c4lh0st vod]$ xxd -b 1.aac  |head
00000000: 01001001 01000100 00110011 00000100 00000000 00000000  ID3...
00000006: 00000000 00000000 00000000 01111000 01010000 01010010  ...xPR
0000000c: 01001001 01010110 00000000 00000000 00000000 00110101  IV...5
00000012: 00000000 00000000 01100011 01101111 01101101 00101110  ..com.
00000018: 01100001 01110000 01110000 01101100 01100101 00101110  apple.
0000001e: 01110011 01110100 01110010 01100101 01100001 01101101  stream
00000024: 01101001 01101110 01100111 00101110 01110100 01110010  ing.tr
0000002a: 01100001 01101110 01110011 01110000 01101111 01110010  anspor
00000030: 01110100 01010011 01110100 01110010 01100101 01100001  tStrea
00000036: 01101101 01010100 01101001 01101101 01100101 01110011  mTimes
```
`

@selsta
Copy link
Owner

selsta commented Mar 4, 2022

That sample-aes code part was merged back upstream from a fork years ago and I'm honestly not familiar with it anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants