security - Media Streaming Help AWS Cloudfront HLS RTMP -


would appreciate following have been working aws while try , deliver secure streaming experience seem hit hurdle @ every step. going list them obvious.

take following.

  1. progressive streaming grabbing public urls via amazon s3 , streaming. (hurdle: user can right click on players , download, or open web inspector click network refresh page , grab url).

  2. signing urls 1 of sdks

    $signedurl = $client->getobjecturl($bucket, 'video.mp4', '+10 minutes');

(hurdle: makes no real difference above user can still copy url in web inspector network tab , download)

  1. using cloudfront rtmp , amazon s3 (hurdle: works great browser streaming relying on flash , there no way grab url through inspect element , download, need fallback mobile in mp4 needed provided can open safari web developer tool set user agent iphone refresh , url download)

  2. using hls streaming (hurdle: works great on browser , mobile hear not supported on android devices, after playing around , creating playlist need make segments public download each segment , merge know being super picky now) demo amazon here https://edgereinvent.com/hls understand take ages , not worth best option.

i know possible because other people manage think best way use hls method , make playlist.m3ub8 file signed real short time if can access m3ub8 can paste service http://www.flashls.org/mediaelement/demo/mediaelementplayer-hls.html , view video.

i know there drm going now, need make output files/segments encrypted within web inspect element cannot clicked should solve lot of problems cant find step step tutorials on how this.

can give advise on experiences?

thanks

update picture of netflix's encrypted .ts files need figure out. enter image description here

you need implement aes-128 encryption hls.

http://www.wowza.com/forums/content.php?437-how-to-secure-apple-hls-streaming-using-drm-encryption

actually challenge, try explain in short:

i not know details of project, need make converter script (probably python or bash https://ffmpeg.org/pipermail/ffmpeg-user/2014-june/022049.html use ffmpeg , openssl) convert mp4 hls , make similar playlist.m3u8 , encrypt every converted chunk aes-128:

#extm3u #ext-x-version:3 #ext-x-allow-cache:no #ext-x-targetduration:4 #ext-x-media-sequence:107 #ext-x-key:method=aes-128,uri="https://yoursite.com/api/key/video_id",iv=0xeefb9948c3ce6cd377b897a9547a479d,keyformatversions="1" #extinf:3.069, media-uzfvxf2u9_107.ts #extinf:3.036, media-uzfvxf2u9_108.ts 

where https://yoursite.com/api/key/video_id link read key db , return proper key "video_id" used converter script (so converter must store used key db)

also need implement protection system api manage access read key. here can use either cookie or ip tracking.

also if can set cookie player, possible use more simple solution, amazon announced https://aws.amazon.com/blogs/aws/new-amazon-cloudfront-signed-cookies-for-private-content/

update:

actually way, described, have encrypted .ts files possible replay if have encryption key provided @ playlist.m3u8 via api delivery link https://yoursite.com/api/key/video_id , other way able download digital trash.

you can use either own "converter", shown example, , can see follow line of code:

openssl aes-128-cbc -e -in "$tempdir/$splitfileprefix"$i.ts \ -out "$outdir/$splitfileprefix"$i.ts -nosalt -iv $initializationvector -k $encryptionkey 

so make encrypted .ts chunks

or can easy use aws elastic transcoder, give ready-to-go solution content converting, need pay ещ amazon usage, base on http://aws.amazon.com/ru/elastictranscoder/pricing/


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -