Reputation: 1
I have a situation and cant find an answer online maybe you could help me.
I am trying to stream an rtsp stream to HTML basically, I converted the stream to his/m3u8 local dir using ffmpeg, my problem is displaying the hls to my web page and get it to work on the main browsers like chrome ,Firefox etc.
the only way i got it to work is by using python command "python -m http.server" to my local dir(where the hls stream was saved) and it works on I.E browser.
and all i did needs to be done on the back end (asp.net app).
i did not write lot of code, i am currently trying to make it work on a simple HTML page once it will work i will make the asp page. that is what i have so far. ffmpeg command ffmpeg -i rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov -y -c:a aac -b:a 160000 -ac 2 -s 854x480 -c:v libx264 -b:v 800000 -hls_time 10 -hls_list_size 10 -start_number 1 Stream/video.m3u8.
python command : python -m http.server, to transport my converted stream "Stream/video.m3u8" to http server local host:8000 for testing)
sample HTML page (it a sample from hls.js posted on GitHub https://github.com/video-dev/hls.js/blob/master/demo/basic-usage.html )
Just edited the video html tag to http://localhost:8000/stream/video.m3u8 as a source.
thank you.
Upvotes: 0
Views: 4987
Reputation: 1
thank you guys, i found a workaround in JonesTwink post. https://gist.github.com/JonesTwink/e4a02cca358ba9b4b36391f31e5bdf32
the simple solution is to run a vlc command to convert your RTSP to MPEG and sends the stream to a desired destination (i.e port number)
and simply add img tag in the HTML file with the server+port address as a source.
Upvotes: 0