Kasher / apple-http-osmf

Automatically exported from code.google.com/p/apple-http-osmf
0 stars 0 forks source link

Refactored for multi bitrate support including example #24

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
http://static.electroteque.org.s3.amazonaws.com/download/apple-osmf.zip

Here is the refactored code as a library now with a working example of the m3u8 
parsing and multi bitrate setup. I'm not submitting patches because it should 
go into this common repository instead of people ripping it off and forking it 
on their own. 

there is support for discontinuity, encryption keys but this needs to be 
plugged in and make the key decryption overridable for different methods. Some 
of the information in the index feed might be good to have sent back to players 
also as this doesn't get parsed in the parser, so perhaps it can be sent back 
in the metadata object. 

It's not tied into OSMF / StrobeMediaPlayback yet as I don't use that bloaty 
code, so its a simple Flash Builder project implementing the functions 
directly. It will obviously need a new loader similar to f4m to add to the  
osmf players. 

Let me know. 

Original issue reported on code.google.com by electrot...@gmail.com on 5 Nov 2012 at 6:21

GoogleCodeExporter commented 8 years ago
http://www.overdigital.com/2012/04/17/the-hidden-licensing-costs-of-hls-video-pl
ayback/ FYI, I think i've just wasted my time on this. mpegts is dead ! 

Original comment by electrot...@gmail.com on 7 Nov 2012 at 9:06

GoogleCodeExporter commented 8 years ago
you are not playing mpegts in flash, you are playing mpegts to flv, which make 
a different, cause its transmuxing not decoding. you can´t play ts native in 
flash.

the overdigital.com article is only speculative and sounds more then an DASH 
marketing for the DASH format, where the fragments of dash are similiar to ts.

we are an mpegLA member and we also report every license that we sold of our 
commercial version of our hls transmuxer, same for h.264, aac as well mp3. 

gary

Original comment by twentyfo...@googlemail.com on 7 Nov 2012 at 5:37

GoogleCodeExporter commented 8 years ago
Well it is a current solution. I did do some research and everyone recommends 
HDS which I do as well. Dash will eventually take both of them over hopefully 
if Apple and Adobe want to make progress ;)

Thanks for the clarification. However you just said you have to report to them ?

Original comment by electrot...@gmail.com on 8 Nov 2012 at 12:01

GoogleCodeExporter commented 8 years ago
Anyway from my refactoring here is whats left

- dyn switching support I need to check the HDS rules will work or new ones 
need to be made up
- aes decryption support
- alternate audio support, it's parsing it correctly and has been setup.
- disconinuinity, there is a particular event on HttpNetStream which will be 
useful to reset for this case and may not need modifications. If it does it 
doesn't need to use an entire osmf codebase, you can override particular 
classes by just copying them to the project sources and the compiler will 
override them ;)
- throwing some of the muxing to an alchemy backend, or sending the bytearrays 
to an alchemy memory management. I think apparat might help here also, I'm 
currently playing with it for mkv muxing to see how it works first. 

I think alchemy + stage video support might make things improved here, in fact 
just using stage video alone is far better performance than html5 ;)

Original comment by electrot...@gmail.com on 8 Nov 2012 at 12:07

GoogleCodeExporter commented 8 years ago
I've just dropped in the default HDS switching metrics and seems to work 
perfect. So the httpstreaming metrics has improved vastly in 2.0 over 1.6 which 
wasn't working at all. Bare in mind the m3u8 parsing needs to recalculate the 
bitrate values ;)

Original comment by electrot...@gmail.com on 8 Nov 2012 at 8:30

GoogleCodeExporter commented 8 years ago
On some research the aes decryption might help hopefully ?? using the openssl 
library wrapper in alchemy. Alchemy is now flascc so needs to be ported to 
that, but no information how to port the Crypto wrapper as yet. Hopefully there 
is no lag doing it this way. 

Original comment by electrot...@gmail.com on 8 Nov 2012 at 2:10

GoogleCodeExporter commented 8 years ago
It might have to be done from scratch getting the openssl library into a swc. 

Original comment by electrot...@gmail.com on 8 Nov 2012 at 2:13

GoogleCodeExporter commented 8 years ago
Flascc , steep learning curve with g++ compiler flag hacking, but oh my it's 
great. The wrapper stuff gets generated for you. 

Original comment by electrot...@gmail.com on 9 Nov 2012 at 5:19

GoogleCodeExporter commented 8 years ago
Looks like for now as3crypto will have to do though I think whats more 
important is streaming from ffmpeg encoded files not via mediafilesegmenter, 
there is an obvious incompatibility with ffmpeg. 

Original comment by electrot...@gmail.com on 10 Nov 2012 at 6:46

GoogleCodeExporter commented 8 years ago
i finshed a shader gpu aes decoder with the help of stage3d, a first demo is 
released on our site, http://onlinelib.de/Streaming_Solutions.html. the 
jwplayer demo has included the aes decryptor stuff.

when you start to implement aes, dont use native as3, its toooooooo slow for 
aes decrypting in realtime.

Original comment by twentyfo...@googlemail.com on 20 Nov 2012 at 4:39

GoogleCodeExporter commented 8 years ago
when you want to use crypto library from as3crypto, make sure to modify it for 
padding7 aes, currently its only support pad5.

Original comment by twentyfo...@googlemail.com on 20 Nov 2012 at 4:42

GoogleCodeExporter commented 8 years ago
umm its only for demonstation purposes of course to find where to hook it in ;) 
no tine at the moment been on other things but great work. my current demo with 
mbr switching in flowplayer is here though its a wowza feed and the higher 
bitrate flashes something funky briefly 
http://flowplayer.electroteque.org/httpstreaminghls. i was actually going to 
try using an aes ssl library via flashcc to see if that improved anything. 
Amazing feat but no chance i'll be doing anything in assembly any time soon , 
is there much information about that ?

Original comment by electrot...@gmail.com on 20 Nov 2012 at 7:47

GoogleCodeExporter commented 8 years ago
http://www.adobe.com/devnet/flashplayer/articles/premium-features.html take 
note of the stage3d licensing i believe its using the same area as flascc right 
? So if i used a c++ library it might still be good, but you are right gpu 
decoding anything is much faster, hence why stage video is good :) The premium 
features they are talking about though is domain memory management as in 
passing the decoding bytearray around in memory management though there is a 
feature in apparat for this. 

Original comment by electrot...@gmail.com on 20 Nov 2012 at 8:39

GoogleCodeExporter commented 8 years ago
Is it c++ or assembler in agal or pixel bender ? 

Original comment by electrot...@gmail.com on 20 Nov 2012 at 8:40

GoogleCodeExporter commented 8 years ago
Is the latest version of the plugin using HDS's dynamic switching values from 
OSMF 2.0 or is it using former FP bwcheck directly?

Original comment by net...@fortscan.net on 16 Dec 2012 at 11:45

GoogleCodeExporter commented 8 years ago
Hi you implement that stuff around it. I've tested it and the HDS dynamic 
switching rules works on this ;) And no its not in the plugin only manual 
switching , but might need to be implemented internally yes as bwcheck cant be 
updated to 2.0 because it needs completely refactoring there and needs the ok 
to do so by them ;)

Original comment by dani...@electroteque.org on 17 Dec 2012 at 4:46

GoogleCodeExporter commented 8 years ago
Hi, the link: 
http://static.electroteque.org.s3.amazonaws.com/download/apple-osmf.zip is not 
working anymore...

Original comment by marko.re...@gmail.com on 16 Jan 2013 at 3:55

GoogleCodeExporter commented 8 years ago
https://static-electroteque-org.s3.amazonaws.com/download/apple-osmf.zip

Hi its available here. The example has been updated with dynamic switching code 
tests and a redirect url workaround for akamai HD network. 

Original comment by electrot...@gmail.com on 2 Mar 2013 at 2:03

GoogleCodeExporter commented 8 years ago
FYI I buggered up the manifest refresh for live streams during the refactor, it 
has been low priority but am still looking into it. The original source code 
still works fine but needed improvements obviously. 

Original comment by electrot...@gmail.com on 10 Mar 2013 at 5:16

GoogleCodeExporter commented 8 years ago
http://static-electroteque-org.s3.amazonaws.com/download/apple-osmf.zip changes 
for live streaming available here. It's been decided to provide the flowplayer 
integration via my site now 

http://flowplayer.electroteque.org/httpstreaming-hls

to recover development and support costs and I see now way to commit this code 
so it will stay as a library if possible ;) I've made some extra tweaks that I 
can handle for now in terms of looping improvements in the muxing code as there 
is faster ways of doing something over another.  The live stream changes needs 
a timer to update the manifest at a certain interval. The index handler has 
been refactored considerably now. Ive yet to test if it even works with ffmpeg, 
apart from that it "seems" to function ok. 

There is still no encryption support that part is complex to integrate for now 
as it needs to use shaders or flashcc ;)

Original comment by electrot...@gmail.com on 11 Mar 2013 at 4:48

GoogleCodeExporter commented 8 years ago
now works with wowza 2 funky playlist setup. it now configures some metadata 
like width and height if set in the playlist files. it could be possible to 
include all the data parsed. it now doesn't set durations for live streams. 

Original comment by electrot...@gmail.com on 23 Mar 2013 at 1:50

GoogleCodeExporter commented 8 years ago
The download link isn't working? Thanks for all the hard work mate. 

Original comment by radiore...@gmail.com on 26 Mar 2013 at 11:34

GoogleCodeExporter commented 8 years ago
S3 permissions try now. 

Original comment by electrot...@gmail.com on 26 Mar 2013 at 11:36

GoogleCodeExporter commented 8 years ago
working on discontinuity right now. 

Original comment by electrot...@gmail.com on 26 Mar 2013 at 11:37

GoogleCodeExporter commented 8 years ago
It won't work when contains subpath like "gear1/prog_index.m3u8" in the 
playlist file?

Original comment by sky84...@gmail.com on 3 Apr 2013 at 9:48

GoogleCodeExporter commented 8 years ago
whats your master playlist file ?

Original comment by electrot...@gmail.com on 3 Apr 2013 at 9:50

GoogleCodeExporter commented 8 years ago
http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8

Original comment by sky84...@gmail.com on 3 Apr 2013 at 9:52

GoogleCodeExporter commented 8 years ago
I see the debug info “downloader.open 
http://devimages.apple.com/iphone/samples/bipbop/fileSequence0.ts” , but it 
should be 
"http://devimages.apple.com/iphone/samples/bipbop/gear1/fileSequence0.ts".

Original comment by sky84...@gmail.com on 3 Apr 2013 at 9:59

GoogleCodeExporter commented 8 years ago
please try now. mind you im in the middle of more changes and have to override 
some osmf classes to make discontinuity work which makes making a library 
complicated as it has to include the osmf classes now instead of making them 
external. ill look at that later now. 

Original comment by electrot...@gmail.com on 3 Apr 2013 at 11:43

GoogleCodeExporter commented 8 years ago
http://static-electroteque-org.s3.amazonaws.com/download/apple-osmf.zip

Original comment by electrot...@gmail.com on 3 Apr 2013 at 11:43

GoogleCodeExporter commented 8 years ago
Thanks,it works now.

Original comment by sky84...@gmail.com on 7 Apr 2013 at 2:52

GoogleCodeExporter commented 8 years ago
Is there a way to get the duration of the video?

Original comment by sky84...@gmail.com on 9 Apr 2013 at 8:00

GoogleCodeExporter commented 8 years ago
It should be triggered on the metadata event for vod streams. 

Original comment by dani...@electroteque.org on 9 Apr 2013 at 8:03

GoogleCodeExporter commented 8 years ago
I just add a fullsceen button and when I exit the fullscreen model, the video 
will be reload?

Original comment by RickyJ...@gmail.com on 17 Apr 2013 at 9:00