How to get proper M3U8 URL for live RTSP stream

Hello,

I am re-streaming RTSP as RTMP (on Desktop) and HLS (on iOS). The files I am serving from are in my content dir, and they are in the format file.stream and contain the direct RTPS stream to source.

I am trying to get re-stream to iOS, and trying to get the m3u8 file. However, the content of the file I am getting is:

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=250000
chunklist.m3u8?wowzasessionid=1189537797

And this does not play. The above strikes me as missing crucial information (codec, resolution, etc)

I am getting the m3u8 file at the following url:

<wowza_address>//source_a.stream/playlist.m3u8

Is this the correct URL to grab the m3u8 file from?

You might try the following:

http://[wowza-ip]:[port]/[application]/_definst_/source_a.stream/playlist.m3u8

What you show is what you would expect in a browser from a playlist.m3u8 url. You can also look at the chunklist.m3u8

To play a HLS stream you need to put the playlist.m3u8 url in a browser on the device. You can also use VLC to test.

For iOS playback, it is best to use the playlist.m3u8 url in a HTML5 video tag:

<html>
<head> 
  <title>cupertinostreaming</title>
</head>
<body>
<video controls src="http://[wowza-address]:1935/vod/sample.mp4/playlist.m3u8">
</video>
</body>
</html>

Richard

What you show is what you would expect in a browser from a playlist.m3u8 url. You can also look at the chunklist.m3u8

To play a HLS stream you need to put the playlist.m3u8 url in a browser on the device. You can also use VLC to test.

For iOS playback, it is best to use the playlist.m3u8 url in a HTML5 video tag:

Hmmm, but if I open apple’s test m3u8 (http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8) I do see more information. More, if I hit a “wrong” URL on my wowza server (one that points to content that does not exists), I get the same file.

In any case, I got the issue resolved. There were two issues:

  1. The m3u8 was not publishing the codec information. Adding the cupertinoCalculateCodecs and cupertinoCalculateResolution properties resolved this. Thanks for that pointer!

  2. Since this is a live stream (re-stream from RTSP source), the stream itself needs to be running first, before there will be anything in the m3u8 file. I had to manually start the stream first, then the m3u8 would have the correct information, and it will work in iOS.

You can add codec and metadata to the IOS stream like this:

How to add resolution and codec metadata to iOS streams

Salvadore

I need an answer to the same question. If you put the URL in VLC it will work. But if you put the URL in the browser and it open the playlist.m3u8 file with VLC then VLC fails because it doesn’t know the server information. Codec and metadata are not the issue.

John

1 Like

hey i just want to convert rtsp to m3u8.

can you help me, this is the url i want to convert to m3u8

rtsp://85.25.199.31:1935/rtp-live/starcric.stream

hello can someone tell me how can i add my m3u or m3u8 to wowza engine and then embed the code into my website?

i have m3u/m3u8 channels as url in my pc…

i want to stream into my worldpress website