Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Contributor
Posts: 6
Registered: ‎06-05-2012
My Device: Z10
My Carrier: Wind

Can't stream HLS properly

[ Edited ]

I'm building a native app for hockeystreams.com.

 

There are 2 types of streams that I'm trying to stream.

1. HLS live streams for live hockey games

2. f4f (progressive) for on demand streams of archived games

 

My first approach was to create a ForeignWindow and a MediaPlayer object and do my own overlay.  I did all that and tested with another service on another work related project and that worked fine for streaming archived videos.  

 

This same player worked ok for the on demand streams, however, they take about 45 seconds before they start playing, but after that, the stream perfectly.

 

For the HLS live streams, the audio and video start but the video is VERY choppy and actually just freezes after about 5 seconds.  This is the same resolution and bitrate as the on demand streams.

 

I also tried playing the videos by invoking the mediaplayer card and get the same results.

 

void VideoPlayer::playMedia(const QString& url, QString title)
{
	InvokeRequest cardRequest;
	cardRequest.setTarget("sys.mediaplayer.previewer");
	QUrl qUrl = QUrl(url, QUrl::TolerantMode);
	QLOG_DEBUG() << TAG << "Title=" + title + " url=" + qUrl.toString();
	cardRequest.setUri(qUrl);
	QVariantMap map;
	map.insert("contentTitle", title);
	QByteArray requestData = PpsObject::encode(map, NULL);
	cardRequest.setData(requestData);
	InvokeManager invokeManager;
	invokeManager.invoke(cardRequest);
}

 Here is a sample of the contents of the m3u8 file for a live stream

#EXTM3U #EXT-X-MEDIA-SEQUENCE:0 #EXT-X-TARGETDURATION:10 #EXTINF:10, http://174.127.101.97/hls-live/streams/publishing/events/PREMIUM_HSTV_2/liveevent/livestream2Num1.ts #EXTINF:10, http://174.127.101.97/hls-live/streams/publishing/events/PREMIUM_HSTV_2/liveevent/livestream2Num2.ts #EXTINF:10, http://174.127.101.97/hls-live/streams/publishing/events/PREMIUM_HSTV_2/liveevent/livestream2Num3.ts #EXTINF:10, http://174.127.101.97/hls-live/streams/publishing/events/PREMIUM_HSTV_2/liveevent/livestream2Num4.ts #EXTINF:10, http://174.127.101.97/hls-live/streams/publishing/events/PREMIUM_HSTV_2/liveevent/livestream2Num5.ts #EXTINF:10, http://174.127.101.97/hls-live/streams/publishing/events/PREMIUM_HSTV_2/liveevent/livestream2Num6.ts

 Finally, hockeystreams.com has a mobile site, if I go there in the BB10 browser, I can play the live stream in both HD and SD perfectly.  I've confirmed with the guy at hockeystreams responsible for the streams that it's using the same stream that I'm trying to play back with MediaPlayer.

 

This project is an open source project so you can get the code from my bitbucket repo here https://bitbucket.org/brockoli/hockeystreams-bb10/overview

 

If someone from Blackberry can have a look, please contact me and I can provide you with an account that will give you access to the streams.  I can also get the guy at hockeystreams to turn on a live stream during the day for testing, but he can't leave it running 24/7 so I'll need to know when to turn it on.

 

Any help you can provide would be great, The app is still in early alpha stage, but already is showing a lot of promise and some of the UI elements are very cool.

 

Rob W.

Highlighted
New Contributor
Posts: 6
Registered: ‎06-05-2012
My Device: Z10
My Carrier: Wind

Re: Can't stream HLS properly

Ok, I have some more information.  I was able to test my video player with another live stream of the same format today.  Here are the codec details for both the working stream and the non working stream.

 

Working:
 
Video: H264 MPEG-4 AVC (Part 10) (h264)
Resolution: 960x540
Frame rate: 59.940060
Decoded: Planar 4:2:0 YUV
 
Audio: Mpeg AAC (mp4a)
Channels: Stereo
Rate: 44100 Hz
 
Not working:
 
Video: H264 MPEG-4 AVC (Part 10) (h264)
Resolution: 1280x720
Frame rate: 119.880120
Decoded: Planar 4:2:0 YUV
 
Audio: Mpeg AAC (mp4a)
Channels: Stereo
Rate: 44100 Hz
 
Looks like the only difference between the 2 are the resolution and the frame rate.  I suspect the resolution is fine at 1280x720, but I'm curious if there is an issue with streaming HLS video with a set frame rate of ~120 fps.
 
Rob W.
Retired
Posts: 749
Registered: ‎12-16-2008
My Device: BlackBerry Z30
My Carrier: Bell

Re: Can't stream HLS properly

This sounds like a bug, can you please log the issue in the Developer Issue Tracker:

DIT

 

Also, please include which bundle you are testing on, and the actual device version (STL-000?).

Paul Bernhardt
Application Development Consultant
BlackBerry
@PBernhardt

Did this answer your question? Please accept this post as the solution.
Found a bug? Report it to the Developer Issue Tracker
New Contributor
Posts: 6
Registered: ‎06-05-2012
My Device: Z10
My Carrier: Wind

Re: Can't stream HLS properly

Developer
Posts: 52
Registered: ‎04-22-2012
My Device: Z10
My Carrier: Mobilicity

Re: Can't stream HLS properly

Have you gotten HLS streaming working yet ?  I saw your issue.. also made one of my own..

 

https://www.blackberry.com/jira/browse/BBTEN-1483

 

 

New Member
Posts: 2
Registered: ‎08-08-2013
My Device: Z10
My Carrier: fido and wind

Re: Can't stream HLS properly

Hi there just wondering if you managed to get hockeystreams working.. just switched to z10 and was hoping it would work on it.