Opened 9 years ago

Closed 7 years ago

#12486 closed Bug Report - General (Won't Fix)

IPTV Recorder HLS AES-128 Problem

Reported by: wnhtr2011@… Owned by: stuartm
Priority: critical Milestone: 0.28.2
Component: MythTV - General Version: 0.27-fixes
Severity: high Keywords: HLS AES
Cc: Ticket locked: no

Description

I am unable to get the IPTV recorder to work with HLS AES-128 encrypted TS streams (such as this one: playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes.m3u8). The IPTV recorder works fine with unencrypted HLS streams.

I have compiled with the "USING_LIBCRYPTO" option and have libcrypto installed. Additional debugging shows that in HLSReader.cpp, the statement on line 1297 "if (segment.HasKeyPath?())" is returning false even though the stream has the #EXT-KEY-KEY manifest entry that was successfully parsed by myth (and logged as an AES stream in mythtvbackend).

Debugging backend logs also shows that the ts segments are downloading fine, but there is no attempt to download the AES keys.

Attachments (2)

backendlog.txt.gz (7.6 KB) - added by wnhtr2011@… 9 years ago.
backend log
hls-aes-decode.patch (2.8 KB) - added by wnhtr2011@… 9 years ago.

Download all attachments as: .zip

Change History (11)

Changed 9 years ago by wnhtr2011@…

Attachment: backendlog.txt.gz added

backend log

comment:1 Changed 9 years ago by wnhtr2011@…

I have fixed this issue and will provide details and patch later after some more testing.

Changed 9 years ago by wnhtr2011@…

Attachment: hls-aes-decode.patch added

comment:2 Changed 9 years ago by wnhtr2011@…

Attached is the patch. This will resolve the issue of myth not downloading the AES-128 Keys on encrypted segments.

comment:3 Changed 9 years ago by stuartm

Milestone: unknown0.28
Owner: set to stuartm
Status: newaccepted

comment:4 Changed 9 years ago by JYA

this seems wrong to me.

With HLS a key can be defined per stream ; per segment or for the entire hls.

While your patch may fix it for you, it likely breaks it where the key is defined per segment

comment:5 Changed 9 years ago by stuartm

Yes, the patch cannot be accepted in it's current form for this reason.

comment:6 in reply to:  4 Changed 9 years ago by wnhtr2011@…

Replying to jyavenard:

this seems wrong to me.

With HLS a key can be defined per stream ; per segment or for the entire hls.

While your patch may fix it for you, it likely breaks it where the key is defined per segment

Actually, I was wondering about that, however, my testing was with streams that rotate keys every 10min and the patch works perfectly. When the key rotates, the playlist (for a given ABR representation) has 2 key entries. Each EXT-X-KEY sets the key for the segments below it (until the next EXT-X-KEY entry). This should be able to handle the worst case where each segment has its own key (designated with its own preceeding EXT-X-KEY entry).

comment:7 Changed 9 years ago by Stuart Auchterlonie

Milestone: 0.280.28.1

Moving unresolved tickets to next point release

comment:8 Changed 8 years ago by Stuart Auchterlonie

Milestone: 0.28.10.28.2

Moving remaining open 0.28.1 tickets to 0.28.2

comment:9 Changed 7 years ago by Stuart Auchterlonie

Resolution: Won't Fix
Status: acceptedclosed

Closing any remaining tickets for 0.28, if the issue persists, feel free to reopen and align to v29 or master

Note: See TracTickets for help on using tickets.