Skip to content

ERROR - Error processing song: 2 when decrypting ec3 songs #122

@nav-rblx

Description

@nav-rblx

whenever i try ripping an ec3 codec of a song, it downloads and right after it finishes when its time for decryption, the wrapper fails

``Traceback` (most recent call last):

File "/root/AppleMusicDecrypt/main.py", line 23, in
loop.run_until_complete(cmd.start())
│ │ │ └ <function InteractiveShell.start at 0x7d6648f81bc0>
│ │ └ <src.cmd.InteractiveShell object at 0x7d664cf544a0>
│ └ <function BaseEventLoop.run_until_complete at 0x7d664d1f20c0>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>

File "/usr/lib/python3.12/asyncio/base_events.py", line 674, in run_until_complete
self.run_forever()
│ └ <function BaseEventLoop.run_forever at 0x7d664d1f2020>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/usr/lib/python3.12/asyncio/base_events.py", line 641, in run_forever
self._run_once()
│ └ <function BaseEventLoop._run_once at 0x7d664d1f3e20>
└ <_UnixSelectorEventLoop running=True closed=False debug=False>
File "/usr/lib/python3.12/asyncio/base_events.py", line 1987, in _run_once
handle._run()
│ └ <function Handle._run at 0x7d664d13e340>
└ <Handle Task.task_wakeup()>
File "/usr/lib/python3.12/asyncio/events.py", line 88, in _run
self._context.run(self._callback, *self._args)
│ │ │ │ │ └ <member '_args' of 'Handle' objects>
│ │ │ │ └ <Handle Task.task_wakeup()>
│ │ │ └ <member '_callback' of 'Handle' objects>
│ │ └ <Handle Task.task_wakeup()>
│ └ <member '_context' of 'Handle' objects>
└ <Handle Task.task_wakeup()>

File "/root/AppleMusicDecrypt/src/rip.py", line 215, in rip_song
await _phase2()
└ <function Ripper.rip_song.._phase2 at 0x7d664901a2a0>

File "/root/AppleMusicDecrypt/src/rip.py", line 157, in _phase2
task.info = await run_sync(extract_song, raw_song, get_codec_from_codec_id(task.m3u8Info.codec_id))
│ │ │ │ │ │ │ │ └ 'audio-atmos-2768'
│ │ │ │ │ │ │ └ M3U8Info(uri='https://aod.itunes.apple.com/itunes-assets/HLSMusic221/v4/2d/ec/52/2dec5295-bb9d-84ff-68d6-f1a4b8ccf1e8/P133672...
│ │ │ │ │ │ └ Task(adamId='1590368456', parentDone=None, playlist=None, status=<Status.DECRYPTING: 'DECRYPTING'>, info=None, m3u8Info=M3U8I...
│ │ │ │ │ └ <function get_codec_from_codec_id at 0x7d6649545c60>
│ │ │ │ └ b'\x00\x00\x00$ftypiso5\x00\x00\x00\x01isomiso5hlsfcmfcccea\x00\x00\x03\xfemoov\x00\x00\x00lmvhd\x00\x00\x00\x00\xe6\x04\xd9...
│ │ │ └ <function extract_song at 0x7d6648f80540>
│ │ └ <function run_sync at 0x7d6649546480>
│ └ None
└ Task(adamId='1590368456', parentDone=None, playlist=None, status=<Status.DECRYPTING: 'DECRYPTING'>, info=None, m3u8Info=M3U8I...

File "/root/AppleMusicDecrypt/src/utils.py", line 284, in run_sync
return await it(AbstractEventLoop).run_in_executor(executor_pool, task, *args)
│ │ │ │ └ (b'\x00\x00\x00$ftypiso5\x00\x00\x00\x01isomiso5hlsfcmfcccea\x00\x00\x03\xfemoov\x00\x00\x00lmvhd\x00\x00\x00\x00\xe6\x04\xd9...
│ │ │ └ <function extract_song at 0x7d6648f80540>
│ │ └ <concurrent.futures.thread.ThreadPoolExecutor object at 0x7d664a16a150>
│ └ <class 'asyncio.events.AbstractEventLoop'>
└ <function create at 0x7d664cfb4ea0>

File "/usr/lib/python3.12/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
│ │ └ None
│ └ None
└ None

File "/root/AppleMusicDecrypt/src/mp4.py", line 140, in extract_song
raise e

File "/root/AppleMusicDecrypt/src/mp4.py", line 132, in extract_song
nhnt_sample = nhnt_samples[nhnt_sample_number]
│ └ 2
└ {1: <NHNTSample CENC_SAI="0x0001000000000C00" CTSOffset="0" DTS="0" dataLength="3072" duration="1536" isRAP="yes" mediaOffset...

KeyError: 2```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions