I've basically picked up my RTMP streaming plugin again, and then realised in a proper 'doh' moment that the site works on iOS as well so therefore must have HLS streams, which it does.
I've successfully converted my code to use the HLS streams, but I'm still getting an error when trying to play on iOS/Apple TV etc. Weirdly, I get the same error in Chrome as well, but the stream plays (although it pauses and then plays back like it's on fast forward, pauses, plays back like ff, whilst the audio is fine). PHT works as expected, and I can play streams directly in VLC and Quicktime via my constructed URL (for reference the site uses a randomised pool of IP addresses, I assume to spread load).
I've currently got this:
CHANNEL_OBJECT = VideoClipObject(
key = Callback(CreateChannelEpisodeObject,QUALITY=QUALITY,TITLE=TITLE,SUMMARY=SUMMARY,NUMBER=NUMBER,THUMB=THUMB,INCLUDE_CONTAINER=True),
rating_key = NUMBER,
title = TITLE,
summary = SUMMARY,
thumb = R(THUMB),
items = [
MediaObject(
video_codec = VideoCodec.H264,
video_resolution = HEIGHT,
audio_codec = AudioCodec.AAC,
audio_channels = 2,
protocol = 'HTTPLiveStreaming',
optimized_for_streaming = True,
height = HEIGHT,
width = WIDTH,
parts = [
PartObject(
key = HTTPLiveStreamURL(
url = URL
)
)
]
)
]
)
if INCLUDE_CONTAINER:
return ObjectContainer(objects=[CHANNEL_OBJECT])
else:
return CHANNEL_OBJECT
And was just about to hack that down a bit to see if less detail made it work on iOS
The error I get (via iOS devices, and Chrome, despite it playing the url) is:
ERROR - [Transcoder] Failed to open bitstream filter h264_mp4toannexb for stream 0 with codec cop
ERROR - [Transcoder] : Invalid argument
And it basically constantly spits that out for the duration of the time you try to access the stream on an iOS device.