Playing only audio from an HLS video stream when not connected to WiFi using Daily Motion's hls.js - dailymotion-api

This question is in regards to DailyMotion's hls.js API
My goal is to save on data usage when not connected to WiFi by playing only the audio portion of a HLS video stream.
I have looked at similar questions for other APIs but have not found anything relevant to the hls.js API.
Details:
I tested my live stream HLS file on your demo page. It identified 1 audio track and displayed it in the Audio Track Controls. At the bottom of this post I am including the format of my HLS file with identifying info changed.
Question:
Will the hsl.js API allow me to force the playback to only audio once I have identified the lack of a WiFi connection? What setting or command would I use to do that? Alternatively, can I force playback to the lowest resolution?
Thanks,
RKern
HLS File Format:
#EXTM3U
#EXT-X-VERSION:5
#EXT-UPLYNK-LIVE
#EXT-X-START:TIME-OFFSET=0.00
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",NAME="unspecified",LANGUAGE="en",AUTOSELECT=YES,DEFAULT=YES
#UPLYNK-MEDIA0:416x234x30,baseline-13,2x48000
#EXT-X-STREAM-INF:PROGRAM-ID=1,RESOLUTION=416x234,BANDWIDTH=471244,CODECS="mp4a.40.5,avc1.42000d",FRAME-RATE=30.000,AUDIO="aac",AVERAGE-BANDWIDTH=411975
http://content-ause1.uplynk.com/channel/test/d.m3u8?pbs=test
#UPLYNK-MEDIA0:704x396x30,main-30,2x48000
#EXT-X-STREAM-INF:PROGRAM-ID=1,RESOLUTION=704x396,BANDWIDTH=873267,CODECS="mp4a.40.5,avc1.4d001e",FRAME-RATE=30.000,AUDIO="aac",AVERAGE-BANDWIDTH=688830
http://content-ause1.uplynk.com/channel/test/e.m3u8?pbs=test
#UPLYNK-MEDIA0:896x504x30,main-31,2x48000
#EXT-X-STREAM-INF:PROGRAM-ID=1,RESOLUTION=896x504,BANDWIDTH=1554841,CODECS="mp4a.40.5,avc1.4d001f",FRAME-RATE=30.000,AUDIO="aac",AVERAGE-BANDWIDTH=1171051
http://content-ause1.uplynk.com/channel/test/f.m3u8?pbs=test
#UPLYNK-MEDIA0:1280x720x30,main-31,2x48000
#EXT-X-STREAM-INF:PROGRAM-ID=1,RESOLUTION=1280x720,BANDWIDTH=3328000,CODECS="mp4a.40.5,avc1.4d001f",FRAME-RATE=30.000,AUDIO="aac",AVERAGE-BANDWIDTH=2414865
http://content-ause1.uplynk.com/channel/test/g.m3u8?pbs=test
#UPLYNK-MEDIA0:192x108x15,baseline-11,2x48000
#EXT-X-STREAM-INF:PROGRAM-ID=1,RESOLUTION=192x108,BANDWIDTH=136226,CODECS="mp4a.40.5,avc1.42000b",FRAME-RATE=15.000,AUDIO="aac",AVERAGE-BANDWIDTH=120009
http://content-ause1.uplynk.com/channel/test/b.m3u8?pbs=test
#UPLYNK-MEDIA0:256x144x30,baseline-12,2x48000
#EXT-X-STREAM-INF:PROGRAM-ID=1,RESOLUTION=256x144,BANDWIDTH=259601,CODECS="mp4a.40.5,avc1.42000c",FRAME-RATE=30.000,AUDIO="aac",AVERAGE-BANDWIDTH=232565
http://content-ause1.uplynk.com/channel/test/c.m3u8?pbs=test

Related

How to broadcast wowza video from one iPad to multiple iPad devices - swift

I want to broadcast existing videos to multiple users through wowza...
Suppose I want to broadcast any 1 uploaded video (in wowza server) to my multiple users? so how can I do that.. can wowza call any API to start streaming in other users devices? Means when I started streaming video from my application then it should start in other devices also through wowza API.
Are you talking about broadcasting (streaming) an MP4 file as a simulated Live stream (playout) or as Video On Demand (VOD)?
Obviously you cannot force devices to start playing a stream. That'd only work if you develop an App that can listen for commands and trigger playback accordingly. Wowza doesn't have such an App, nor any built-in features that can do this.
If you want devices to access a stream on-demand you can simply upload the file to Wowza's content folder. If you want to have a programmed playout, like a TV channel, then you can check out this article: https://www.wowza.com/docs/how-to-schedule-streaming-with-wowza-streaming-engine-streampublisher
(the source code of the plug-in that is used in that article is available from https://github.com/WowzaMediaSystems/wse-plugin-streampublisher)
As from your Question, You can broadcast stream successfully and you might have used Wowza Go Coder SDK for doing it.
On Broadcasting live stream, broadcasted videos stored in CONTENT directory which is inside of Stream Engine installation directory structure.
You can find all the streamed videos in it.
Now, You want to broadcast particular stored video then you can do it by loading specific URL for that video. Broadcasting for that Video is not possible but, you can play that particular video as below which will be accessible to all your application users :
In IOS, Link or URL for Videos stored in CONTENT directory is as below :
http://[Host Address]:[PORT]/vod/mp4:sample.mp4/playlist.m3u8
rtsp://[Host Address]:[PORT]/vod/sample.mp4 (In Android)
Here, sample is the name of your Stream. You have to broadcast live stream video with different stream names so that all videos are accessible.
In this way, you can play stored live stream videos.

Extract CMSampleBuffer from HLS video stream on iOS

How can I save what AVPlayer is currently playing (both video and audio) from Live HLS stream?
I know how to load and play m3u8 video file using AVPlayer.
Please note that the HLS stream is live and not Video on demand so cannot use AVAggregateAssetDownloadTask In the perfect scenario will get CMSampleBuffer objects which can save to file easily. Also AVPlayerItemOutput is not entirely an option because I am unable to see how will get the audio channel.
Seems not possible with the current SDK. I've implemented it using ffmpeg

Detect when switched to an audio only HLS Stream

In our app, we have an HLS index file which contains multiple HLS streams for different Bandwidths. Our Lowest Badwidth stream is only audio.
We want to show a message to our users when the app has degraded to the Audio Only stream.
Is there a way to detect when we have switched to an audio only stream?
Thanks!

Unable to livestream H.264 Video with FMS

I am having trouble streaming H.264 video to my FMS v.5 server. I am using an iOS app as the stream source; called streamsie.
Whenever I click the play button, it buffers, but never shows content.
Is there a way to resolve this issue, or do you know how to do so?
Thank you.
H.264 video via RTMP is not supported on iOS. You can find many topics in Adobe forums.

Widevine video streaming on iOS and AirPlay

Could you help us please with the following problem related to the DRM (Widevine) encrypted video stream playback and use of the AirPlay?
When we tried to play the video from iPhone with use of the AirPlay on Apple TV, the "failed to load content” error was shown on the TV screen. We are not sure if that is correct behaviour. We think it is, because for encrypted video playback we cannot use the AirPlay as it transports the raw unencrypted stream, right?
So far we found that the only possible solution is showing video on iPhone, while playing audio on the AppleTV, it seems that for audio the DRM restriction does not apply.
Could you confirm the above description? Could you give us some advices?
We found also following (Note that we are not using Brightcove, but the principle should be same) information on the Internet: http://support.brightcove.com/en/video-cloud/docs/widevine-plugin-brightcove-video-cloud-player-sdk-ios
Try WVUseEncryptedLoopback (set it to #1). It enables AirPlay support by securing the AirPlay stream. 1 enables encrypted loopback. 0 by default.
Also, enable WVPlayerDrivenAdaptationKey (set it to #1) (Switch between Apple Native Player Adaption = 1 and Widevine Adaption = 0)
Widevine version: 6.0.0.12792

Resources