Wish Tutorial about how to make app with live video streams from the net

Sandman

Well-Known Member
Licensed User
In a recent thread it surfaced that we have two experts (*) in the forum when it comes to putting live video streams in apps: @Syd Wright and @drgottjr . (The working theory is that they are twins, separated at birth. The results of the DNA tests are not in yet, I'll update this post once they are.)

It sure would be nice if we had a small tutorial on how to solve things related to this quite specific area. We do get questions in the forum now and then on how to do this, and a small tutorial would go a long way in helping the community. It could be as simple as a series of one-liners with "do-things-like-this" and another series of one-liners with "never-ever-do-things-like-this".

(And to be super clear, I'm not really talking about the user interface surrounding this, we have lots to read in the forum about that. I'm talking about things like how to find urls to the streams, how to handle if the urls change over time, what to do with the urls once you have them, how to actually show the stream to the user, etc.)

So my wish is that either @Syd Wright or @drgottjr, or preferably both together, write such a tutorial. :)

* I'm sure we have more experts on this topic, but I don't know of them, feel free to give a shout in this thread if you are one, or know of one - the more the merrier
 

Syd Wright

Well-Known Member
Licensed User
In a recent thread it surfaced that we have two experts (*) in the forum when it comes to putting live video streams in apps: @Syd Wright and @drgottjr . (The working theory is that they are twins, separated at birth. The results of the DNA tests are not in yet, I'll update this post once they are.)

It sure would be nice if we had a small tutorial on how to solve things related to this quite specific area. We do get questions in the forum now and then on how to do this, and a small tutorial would go a long way in helping the community. It could be as simple as a series of one-liners with "do-things-like-this" and another series of one-liners with "never-ever-do-things-like-this".

(And to be super clear, I'm not really talking about the user interface surrounding this, we have lots to read in the forum about that. I'm talking about things like how to find urls to the streams, how to handle if the urls change over time, what to do with the urls once you have them, how to actually show the stream to the user, etc.)

So my wish is that either @Syd Wright or @drgottjr, or preferably both together, write such a tutorial. :)

* I'm sure we have more experts on this topic, but I don't know of them, feel free to give a shout in this thread if you are one, or know of one - the more the merrier
Good idea! Over the years I have developed quite a number of tricks to find the streams of video and radio stations. I guess you also saw my final solution to finding the streams on the Dutch birds website. By the way, a good way to quickly find streams is to search for "Hans Settings" on Google. Every month he issues updated lists of thousands of TV & radio stations as wel as webcams.
PS: I have always been curious who the guy on your avatar is. Using Google image search I have discovered that it must be the French-American painter, sculptor, chess player, and writer: young Marcel Duchamp, ha ha. I guess you are a fan of his :)
 

Sandman

Well-Known Member
Licensed User
PS: I have always been curious who the guy on your avatar is. Using Google image search I have discovered that it must be the French-American painter, sculptor, chess player, and writer: young Marcel Duchamp, ha ha. I guess you are a fan of his :)
Please start a new thread for this. ;) (But you are absolutely correct.)
 

Syd Wright

Well-Known Member
Licensed User
To make a start with fulfilling this wish, here are some tips on how to find an online video stream on a webpage:

1. Open the relevant webpage in your browser and make sure the video can be viewed there.
It does not really matter whether the browser can actually play the stream.

2. Search in the page html source:
- Click right in your browser and select the page source.
- Search with the phrase: "m3u8". If you find it then copy the whole stream that starts with "http" upto "m3u8" and try it in VLC player (see 4).
- If you don't find "m3u8" then search for "rtmp", "rtsp", "stream" or "player". Over time you will learn to recognize valid streams by examining the html source.

3. If step 2 fails then try this:
- Open the webpage in Firefox.
- Click right on the webpage and select "Inspect Element".
- Select the "Inspector" tab and do the same search as described under 2.
- If that fails, select the "Network" tab and do a similar search. Sometimes it is necessary to ensure that the video is playing. Also frequently press F5 to refresh!
- Under the "File" column you should see texts like "chunklist.m3u8" or "playlist.m3u8"
- Double-click on these entries and Firefox should open a new page. At the top you should see the full stream URL.
- Copy it and paste this stream URL in VLC player.

4. Use VLC placer to test the found streams:
- Start VLC player, press CTRL+N and enter the stream URL.
- If the stream contains the characters "%3a" then replace each of them with ":"
- Sometimes a stream URL contains a "?". Often everything following this "?" can be deleted (including the "?"), but not always!
- Play the stream.

5. Another possibility is to try to obtain Hans Settings' channel lists. Do a Google search. Among other they can be found on GitHib and Sat4all.com
Don't open other, obscure websites for this purpose because they might contain malware.

6. Downloading the video's webpage with httpjob and then examining the thus retrieved page source text is another possiblity.
See for example this thread: https://www.b4x.com/android/forum/t...stream-on-a-website.117026/page-2#post-731965
 
Last edited:

FrankDev

Active Member
Licensed User
Hi

what about FB Videos ?

regards frank

B4X:
https://www.facebook.com/StrombergSerie/videos/10157312469728119/
 

Syd Wright

Well-Known Member
Licensed User
Good question. I have never tried that. What I do read on Google is that it is recommended to change "https://www.facebook" into "https://m/.facebook" before reading the source code. I do see the mp4 file name multiple times there, but it won't play in VLC and in a browser it gives a need to login warning.
I'll take a closer look later.
However, you can use: https://www.getfvid.com/ to get a Facebook video.

Youtube video's are even more complicated nowadays. Google has made it extremely complicated. Informatix has made a library for Youtube (search the forum), but my experience is that it won't play more than half of the streams.
 
Top