Skip to content
This repository

ofQuickTimePlayer.createMovieFromURL fails on streaming video #897

Closed
4pcbr opened this Issue February 06, 2012 · 10 comments

5 participants

4pcbr Theodore Watson Christoph Buchner Benjamin Knofe Phil Worthington
4pcbr

Hi.

I've been trying to load stream video ( mpeg2 .ts and hls .m3u8 ) using OF on MacOS 10.7.2.

Both cases causes error -2048 in the line below: ( l:89, ofQuickTimePlayer.cpp )

err = NewMovieFromDataRef(&movie, newMovieAsyncOK,nil, urlDataRef, URLDataHandlerSubType);

Loading remote .mp4 works perect. Loading same streams in QuickTime player(v10.1) works without any troubles.

So, it seems the trouble happens just when no videofile size info returned from server.

Is it a bug? Or I've missed smthng?

4pcbr

Same sketches works good with rtsp streams. Issue is in hls streams transported by http

4pcbr

It seems this issue is in hls stream content-type header. My one has no content-type header, so NewMovieFromDataRef has not enough meta info. Should experiment with content-type headers.

Christoph Buchner
Owner

thanks for the continuing analysis. :-)

4pcbr

Unfortunately it wasn't content-type header

I've tried to use apple test hls stream:
http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8
which contains Content-Type: audio/x-mpegurl response header (which is strange enough while apple recomends to set content-type header to application/x-mpegURL or vnd.apple.mpegURL )

No "movie not loaded"( == err2048 ) log this time but infinite debug log:

Feb  9 18:34:12 4pcbrs-MacBook-Air.local emptyExampleDebug[32856] <Error>: kCGErrorIllegalArgument: CGSGetWindowType: Invalid (NULL) window
Feb  9 18:34:12 4pcbrs-MacBook-Air.local emptyExampleDebug[32856] <Error>: kCGErrorIllegalArgument: CGSGetWindowType: Invalid (NULL) window
Feb  9 18:34:12 4pcbrs-MacBook-Air.local emptyExampleDebug[32856] <Error>: kCGErrorIllegalArgument: CGSGetWindowType: Invalid (NULL) window

Next I've tried to load hls stream with "right" content-type: Content-Type: application/vnd.apple.mpegurl but catched 2048 err again.

At last I've wrote a Quartz Composer sketch ( which uses same Quick Time api I suppose ) and get surprised: no video has rendered ( more details here )

Isuue reproduces on my second laptop with MacOS 10.6.8 aboard and Quick Time player 10.0.

Quick Time components couldn't open native macOS video format -- very unexpectedly o_O

What do you think could it be a Quick Time API issue?

Benjamin Knofe
benben commented June 19, 2012

hi @4pcbr! thanks for your work. did you made any progress on this?

Phil Worthington

Hi guys. Was this ever figured out? Is it possible to stream m3u8 to OpenFrameworks? I tried but failed :( (v73)
For ref, also posted to a new thread incase that helps (apologies if that's just making a mess): #1844

Theodore Watson
Owner

hmm - I can't load http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8
with Quicktime Player 7 File -> Open Url....

I think typically ofQuicktimePlayer should be able to play files that Quicktime Player 7 can play.

Phil Worthington

Thanks Theo.
So ofQuicktimePlayer is not using the same core as Quicktime 10.x (which does play that m3u8) ?
Do you know if there are any alternate video libraries that will support m3u8 live streams? (these are pretty standard now across OSX and iOS video apps).
As a footnote, I tried in Cinder too with no joy :(

4pcbr

@philworthy finally I decided to use VLC. Current builds are able to play m3u8 with no problem.

Unfortunately( relate to this issue ) I've switched to processing and vlcj, so couldn't recommend you any good binding( libvlc is low level lib itself ).

Theodore Watson
Owner

I'm closing this issue as ofQuicktimeVideoPlayer will never support m3u8 ( As QuickTime 7 Player doesn't support it either ).

Lets move the discussion over to #1844 as there are much more likely to be solutions in QTKit and AVFoundation.

Theodore Watson ofTheo closed this January 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.