Creating signed URL for private HLS and DASH playlist in cloudfront - amazon-cloudfront

We have video like S3/category/guid/HLS and DASH playlists and its files. It works if I don't restrict Viewer Access. If I restrict and use signed URL the player just loads and never plays. I think it is because it can't access to hls different bitrate files. So do I have to give signed URL for entire folder of that video?

you will have to use Signed cookies to support HLS streaming via Cloudfront.

Related

Azure Media Services HLS Stream Url Change Resolution No Audio

Below is the manifest file get from Azure Media Services HLS Url.
The default HLS provided have Video and Audio, but when we try to change the resolution, it became only have Video but no Audio.
#EXTM3U
#EXT-X-VERSION:7
#EXT-X-SESSION-KEY:METHOD=SAMPLE-AES,KEYFORMAT="com.apple.streamingkeydelivery",KEYFORMATVERSIONS="1",URI="skd://petronastownhallmedia.keydelivery.southeastasia.media.azure.net/FairPlay/?kid=4881e415-fb2d-45e4-a8dd-505a405cf93d"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",NAME="audio_und",LANGUAGE="und",DEFAULT=YES,AUTOSELECT=YES,CHANNELS="2",URI="QualityLevels(128000)/Manifest(audio_und,format=m3u8-aapl)"
#EXT-X-STREAM-INF:BANDWIDTH=351536,RESOLUTION=340x192,CODECS="avc1.64000d,mp4a.40.5",AUDIO="audio"
QualityLevels(200000)/Manifest(video,format=m3u8-aapl)
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=351536,RESOLUTION=340x192,CODECS="avc1.64000d",URI="QualityLevels(200000)/Manifest(video,format=m3u8-aapl,type=keyframes)"
#EXT-X-STREAM-INF:BANDWIDTH=709236,RESOLUTION=384x216,CODECS="avc1.640015,mp4a.40.5",AUDIO="audio"
QualityLevels(550000)/Manifest(video,format=m3u8-aapl)
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=709236,RESOLUTION=384x216,CODECS="avc1.640015",URI="QualityLevels(550000)/Manifest(video,format=m3u8-aapl,type=keyframes)"
#EXT-X-STREAM-INF:BANDWIDTH=1015836,RESOLUTION=512x288,CODECS="avc1.640015,mp4a.40.5",AUDIO="audio"
QualityLevels(850000)/Manifest(video,format=m3u8-aapl)
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=1015836,RESOLUTION=512x288,CODECS="avc1.640015",URI="QualityLevels(850000)/Manifest(video,format=m3u8-aapl,type=keyframes)"
#EXT-X-STREAM-INF:BANDWIDTH=1526836,RESOLUTION=704x396,CODECS="avc1.64001e,mp4a.40.5",AUDIO="audio"
QualityLevels(1350000)/Manifest(video,format=m3u8-aapl)
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=1526836,RESOLUTION=704x396,CODECS="avc1.64001e",URI="QualityLevels(1350000)/Manifest(video,format=m3u8-aapl,type=keyframes)"
#EXT-X-STREAM-INF:BANDWIDTH=2395536,RESOLUTION=960x540,CODECS="avc1.64001f,mp4a.40.5",AUDIO="audio"
QualityLevels(2200000)/Manifest(video,format=m3u8-aapl)
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=2395536,RESOLUTION=960x540,CODECS="avc1.64001f",URI="QualityLevels(2200000)/Manifest(video,format=m3u8-aapl,type=keyframes)"
#EXT-X-STREAM-INF:BANDWIDTH=3724136,RESOLUTION=1280x720,CODECS="avc1.64001f,mp4a.40.5",AUDIO="audio"
QualityLevels(3500000)/Manifest(video,format=m3u8-aapl)
#EXT-X-I-FRAME-STREAM-INF:BANDWIDTH=3724136,RESOLUTION=1280x720,CODECS="avc1.64001f",URI="QualityLevels(3500000)/Manifest(video,format=m3u8-aapl,type=keyframes)"
#EXT-X-STREAM-INF:BANDWIDTH=138976,CODECS="mp4a.40.5",AUDIO="audio"
QualityLevels(128000)/Manifest(audio_und,format=m3u8-aapl)
We have tried using / modified into following URL:
Have Audio but no video
https://xxxx/c13459a8-065e-4d86-a2aa-c95f5ededafc/365a25ee-df07-4d1f-8679-0a029fccd397.ism/QualityLevels(128000)/Manifest(audio_und,format=m3u8-aapl)
No Audio no video
https://xxxx/c13459a8-065e-4d86-a2aa-c95f5ededafc/365a25ee-df07-4d1f-8679-0a029fccd397.ism/QualityLevels(128000)/Manifest(video,audio_und,format=m3u8-aapl)
https://xxxx/c13459a8-065e-4d86-a2aa-c95f5ededafc/365a25ee-df07-4d1f-8679-0a029fccd397.ism/QualityLevels(850000)/Manifest(video,format=m3u8-aapl,audiotrack=audio)
Any idea or suggestion regarding this issue?
Thanks
What player framework are you using? Are you seeing this issue in HLS.js, Shaka player or in the Native iOS AVPlayer?
That is pointing to the audio only AAC track at 128Kbps.
The other tracks appear to include video and audio, so I'm not sure without testing those on my own. Which I can't do unless you submit a support ticket through the Azure portal and include the details on your account and streaming endpoint. I suggest that path for faster support.

Loop through same set of .ts files to imitate a live stream?

We have a video stream coming to a CDN from an origin which is a TV stream. We need to switch the origin from CDN to a pre-rendered set of static video m3u8 package. The CDN supports switching origin. How do I sync my static hls package with video stream, like media stream sequence number? How to seamlessly make this switch possible?

Nest Camera Video Streaming in VLC player

I have got a public share nest camera address from my friend.
Instead of using a web browser for seeing the video, I want to use a VLC player to video stream. This way allows me to use many other features of VLC to do video analytics on the video.
How to do it?
I was able to do this in these steps:
Go to the public video share URL. It should be something like this:http://video.nest.com/live/pSgnOZ0s4t
If you use developer tool on chrome and see network traffic ....look for a URL with .m3u8 in the end... it will be something like this:https://stream-delta.dropcam.com/nexus_aac/37451e60aeac457f9800704f1662147e/playlist.m3u8
Once you get that open that file in a text editor....you will get something like this inside the file
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:BANDWIDTH=400816,CODECS="avc1.77.31,mp4a.40.2",RESOLUTION=1280x720
chunklist_w391480529.m3u8
The stream URL is then
https://stream-delta.dropcam.com/nexus_aac/37451e60aeac457f9800704f1662047e/chunklist_w391480529.m3u8
Once you have this then install livestreamer to extract video like this:
livestreamer "hls://https://stream-delta.dropcam.com/nexus_aac/37451e60aeac457f9800704f1662047e/chunklist_w391480509.m3u8" best -o nest_video.ts
This will save the file to your disk.
I used this to avoid nest aware subscription. Unfortunately, they charge so much for that service. When someone can just save the video to a disk and upload to a cheap cloud option...
I wrote a page that takes a public Nest video url and returns an HLS media .m3u8 streaming url
get media url for nest/ dropcam cameras

How do I stream an uploaded video on Azure Media Services

I uploaded a video to Azure Media Services, and clicked the "publish" button. That gave me a publish URL.
I then used the Azure Media Player (http://amp.azure.net/libs/amp/latest/docs/samples.html) to embed my video content on a page.
The problem I'm having is that the video is choppy to start. Perhaps it's the encoding of the video, but I want to make sure, if I want to stream a video, using the media player or anything else, do I just use the "Publish URL"? OR is there a different way of requesting video content to "smooth stream"?
Yes. You use the publish URL for VOD and you have a few url parameters to change the type of streaming if needed. Default is smooth streaming.
Smooth Streaming
{streaming endpoint name-media services account name}.streaming.mediaservices.windows.net/{locator ID}/{filename}.ism/Manifest
HLS Streaming
{streaming endpoint name-media services account name}.streaming.mediaservices.windows.net/{locator ID}/{filename}.ism/Manifest(format=m3u8-aapl)
MPEG Dash Streaming
{streaming endpoint name-media services account name}.streaming.mediaservices.windows.net/{locator ID}/{filename}.ism/Manifest(format=mpd-time-csf)
See what works best for you
You can also test on this page and try the advanced settings
http://amsplayer.azurewebsites.net/azuremediaplayer.html
The Azure Media Services test page has changed since the last post. The new URL is:
https://ampdemo.azureedge.net/azuremediaplayer.html

Will the chromecast play media segment files (.ts) from an m3u8 playlist?

I've noticed a lot of websites use m3u8 playlists on their html5 video tags, and those segment files inside the playlist appear to be h264 encoded, so I'm guessing the container is the only thing that the chromecast doesn't support in this case although I know very little about video containers and codecs so I'm probably just making no sense. So with all this in mind, is there any chance the chromecast will one day play those files?
Here is an example http://stream.gravlab.net/003119/sparse/v1d30/posts/2014/barcelona/barcelona.m3u8
Thanks.
Yes - You can using either the default Receiver, a Styled Receiver, or in a Custom Receiver and using the Media Player Library. Of course, you (the owner of the data) must turn on CORS headers for the m3u8 manifest, any sub-manifests, and for the segments and any keys on your server / CDN to support this. This requirement is due to our player being written in JavaScript and running in Chrome on the Chromecast device.
Note - for the Default Receiver & Styled Receiver, the URL to allow CORS from is www.gstatic.com. For your Custom Receiver, it will be the URL where you host your Receiver.

Resources