Join the Stack Overflow Community
Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.
Join them; it only takes a minute:
Sign up

I am developing a website using HTML5 and need sample HLS Streaming video URLs for my testing purposes. Could someone provide sample HLS Streaming URLs? My target is IE9, iPad, Chrome and Android devices.

I am fully new to media and I would like to know if we can create streaming video format as per our needs like .ogg, .mp4, .WebM.

share|improve this question
1  
I use Wowza wowza.com to provide test stream – onmyway133 Nov 24 '14 at 13:28
    
up vote 7 down vote accepted

HLS isn't supported by all the clients you listed. It is supported by iPad and android >= 3.0, but not supported by IE9 or Chrome. For HLS, you need a MPEG2TS with MPEG4-AVC(h.264) and AAC as the video and audio codecs. The ts stream needs to be segmented with a tool like this.

You might want to look into providing just a progressive stream instead of HLS. That should be supported by html5 in IE9 and Chrome. As for video format, you'll need and MPEG4 container with AVC(h.264) and AAC.

share|improve this answer
    
Just want to add that, although stock Android has no HLS support, it is supported in Google TV – Dmitry Pashkevich Jun 27 '12 at 16:02
1  
@DmitryPashkevich Stock Android does have HLS support. It has existed since Android 3.0 -- the quality of the support is very poor, but I assume Google TV is no better in that regard. – vipw Jun 28 '12 at 6:30
    
Didn't know that, thanks! – Dmitry Pashkevich Jun 28 '12 at 7:11

I found a few examples over the internet, enjoy:

Note: See here for detailed and updated data about devices/browsers supporting HLS.

share|improve this answer
6  
Do you know any public m3u8 stream that supports CORS headers?Actually i am try to stream video on chromcast. – piyush Nov 13 '14 at 5:56
1  
playon.tv/online/iphone5/main.m3u8 seems to be dead now – Warren Burton Apr 8 '15 at 13:22
    
Thanks for your comments, I've updated the list now and added a few more m3u8 videos... – Meir Gerenstadt Apr 12 '15 at 9:14
    
Thank you! Very helpful. – Janom Jun 12 '15 at 21:29
1  
content.jwplatform.com/manifests/vM7nH0Kl.m3u8 doesn't seem to be AES encrypted – KDaker Apr 9 at 4:52

These worked for me. I refer to http://www.jwplayer.com/html5/hls/ for supported clients.

share|improve this answer
    
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://purplepillvr.com' is therefore not allowed access. – Csaba Toth Aug 7 at 22:08

Apple has some example HTTP Live Streams:

share|improve this answer

I have verified and tested all of these as of 2/12/2016. Here's a java/android test should you want to copy/paste into your project - along with a brief explanation.

First, create a new class called GetMediaService and copy the code from that class below into your newly created class, being sure to update the package information.

GetMediaService.java:

package com.yourdomain.test.media; // <-- update the package location

import java.util.ArrayList;

public class GetMediaService {

    public ArrayList<VideoItem> getMediaList(){
        ArrayList<VideoItem> videoList = new ArrayList<>();

        videoList.add(new VideoItem(0, "http://esioslive6-i.akamaihd.net/hls/live/202892/AL_P_ESP1_FR_FRA/playlist.m3u8", "Eurosport", "Sports"));
        videoList.add(new VideoItem(1, "http://sample.vodobox.net/skate_phantom_flex_4k/skate_phantom_flex_4k.m3u8", "Skaters", "BrainFarm")); // VOD
        videoList.add(new VideoItem(2, "http://playertest.longtailvideo.com/adaptive/wowzaid3/playlist.m3u8", "Nature", "Wildlife - short")); // has metadata
        videoList.add(new VideoItem(3, "http://cdn-fms.rbs.com.br/vod/hls_sample1_manifest.m3u8", "Wildlife", "Nature - short"));

        videoList.add(new VideoItem(4, "http://nasatv-lh.akamaihd.net/i/NASA_101@319270/index_1000_av-p.m3u8?sd=10&rebase=on", "NASA Tv (LIVE)", "Live Nasa feed"));
        videoList.add(new VideoItem(5, "http://vevoplaylist-live.hls.adaptive.level3.net/vevo/ch3/appleman.m3u8", "Country Music (LIVE)", "Music Video - country")); // LIVE tv
        videoList.add(new VideoItem(6, "http://vevoplaylist-live.hls.adaptive.level3.net/vevo/ch1/appleman.m3u8", "Pop Music (LIVE)", "Music Video - Pop")); // LIVE tv
        videoList.add(new VideoItem(7, "http://vevoplaylist-live.hls.adaptive.level3.net/vevo/ch2/appleman.m3u8", "R&B Music (LIVE)", "Music Video - R&B")); // LIVE tv

        videoList.add(new VideoItem(8, "http://content.jwplatform.com/manifests/vM7nH0Kl.m3u8", "Tears of Steel Trailer", "Short motion picture"));
        videoList.add(new VideoItem(9, "http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes.m3u8", "Disney Oceans Trailer", "Oceans Trailer")); // VOD
        videoList.add(new VideoItem(10, "http://www.nacentapps.com/m3u8/index.m3u8", "Big Buck Bunny Trailer", "Intro - short")); // VOD
        videoList.add(new VideoItem(11, "http://walterebert.com/playground/video/hls/sintel-trailer.m3u8", "Sintel Trailer", "Preview movie clip"));

        videoList.add(new VideoItem(12, "http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8", "The Mac", "Apple Presentation"));
        videoList.add(new VideoItem(13, "http://playertest.longtailvideo.com/adaptive/captions/playlist.m3u8", "CNN", "Special Report")); // has captions
        videoList.add(new VideoItem(14, "https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_4x3/bipbop_4x3_variant.m3u8", "Video Test - 4:3", "4:3 Bip-Bop Sequence"));
        videoList.add(new VideoItem(15, "https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8", "Video Test - 16:9", "16:9 Bip-Bop Sequence"));

        return videoList;
    }

    // Simple data object to pass back the relevant information about the video link
    public class VideoItem{
        public int id;
        public String url;
        public String title;
        public String subTitle;

        public VideoItem(int p_id, String p_url, String p_title, String p_subTitle){
            this.id = p_id;
            this.url = p_url;
            this.title = p_title;
            this.subTitle = p_subTitle;
        }

        @Override
        public String toString(){
            return "id: " + this.id + ", url: " + this.url + ", title: " + this.title + ", subTitle: " + this.subTitle;
        }
    }
}

Second, create a test activity. Then copy the TestGetMediaService code in to your newly created class. Be sure to update the package information. The test simply creates a ScrollView component as well as a LinearLayout component. We set the LinearLayout to "VERTICAL" orientation, set it's LayoutParams to "WRAP_CONTENT" so that the LinearLayout resizes with the content.

Then, we setup a buttonList - we create a button for every videoItem that's returned by GetMediaService.getMediaList(), set it's text as well as its onClickListener.

Finally, when the app is running, and we receive a button click event, we call getVideoItemForButtonClick(Button p_button) and match the index of the button in the buttonList with the button passed in. When we have a match, we now have our corresponding videoItem index and thats what we'll return.

VideoItem has a toString method to test the values. At this point, you can do what you need to with the VideoItem in your application.

TestGetMediaService.java:

package com.yourdomain.test; // <-- update the package location

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ScrollView;

import com.yourdomain.test.GetMediaService;

import java.util.ArrayList;

public class TestGetMediaService extends Activity {
    public static final String TAG = TestGetMediaService.class.getSimpleName();

    protected ArrayList<Button> m_buttonList;
    protected ArrayList<GetMediaService.VideoItem> m_videoList;

    @Override
    protected void onCreate(Bundle p_savedState) {
        super.onCreate(p_savedState);

        // create our content views
        ScrollView view = new ScrollView(this);
        LinearLayout layout = new LinearLayout(this);
        layout.setOrientation(LinearLayout.VERTICAL);
        layout.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,ViewGroup.LayoutParams.WRAP_CONTENT));

        // create our button list
        m_buttonList = new ArrayList<>();

        // get our videoItem list from the service
        GetMediaService gms = new GetMediaService();
        m_videoList =  gms.getMediaList();

        // create a button for every item in the m_videoList
        if( m_videoList.size() > 0 ){
            for(GetMediaService.VideoItem v : m_videoList ){
                Button btn = new Button(this);
                layout.addView(btn); // add button to view
                m_buttonList.add(btn); // add button to buttonList
                btn.setText(v.title); // set the text of the button
                btn.setOnClickListener(new View.OnClickListener() { // set the onClickListener for the button
                    @Override
                    public void onClick(View v) {
                        onButtonClick(v);
                    }
                });
            }
        }

        view.addView(layout);

        this.setContentView(view);
    }

    protected void onButtonClick(View p_view){
        //handle click event:
        GetMediaService.VideoItem videoItem = this.getVideoItemForButtonClick((Button)p_view);
        if( videoItem != null ) {
            Log.d(TAG, "VideoItem: " + videoItem.toString());

            // do something with the VideoItem object
        }
    }

    protected GetMediaService.VideoItem getVideoItemForButtonClick(Button p_button){
        for( int i = 0; i < m_buttonList.size(); i++ ){
            if( m_buttonList.get(i) == p_button && m_videoList.get(i) != null ){ // when we find out matching button, we have our video index
                return m_videoList.get(i);
            }
        }

        return null;
    }
}

Hope this helps!

share|improve this answer
1  
Your post introduces code that contains a object based construction. None of the tags on the question show any signs of object based constructs. Could you expand your answer with explanations how the code can be used in the question of the OP, and how it works? - From review – Ferrybig Feb 14 at 15:49
    
Sure thing - I will add a much better description. I did update the code for how it could be used, but will post a more thorough explanation. Thanks for the heads up – neoRiley Feb 16 at 17:55
    
@Ferrybig : Can you please remove your negative down vote after reviewing my updates please? You asked for it, I gave it. Now please review and remove your down vote. – neoRiley Feb 17 at 16:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.