Skip to content

Instantly share code, notes, and snippets.

@isaacgr
Created June 2, 2019 22:09
Show Gist options
  • Save isaacgr/b4b5ad45741ceb00681e4b26d3c5f9de to your computer and use it in GitHub Desktop.
Save isaacgr/b4b5ad45741ceb00681e4b26d3c5f9de to your computer and use it in GitHub Desktop.
Use FFMPEG to convert an rtsp stream to hls and write output to m3u8 file.
#!/bin/sh
# Convert rtsp stream to hls and write to file
ffmpeg -i "rtsp://admin:admin@192.168.2.77:554/cam/realmonitor?channel=1&subtype=0" -c copy -hls_time 2 -hls_wrap 10 "/var/www/html/streaming.m3u8"
@okwindart
Copy link

I get the following error:
image

I am using the latest Windows build from ffmpeg

@erickythierry
Copy link

I searched a lot on the internet until I found a solution like this. I managed to solve my problem. I have a url that streams video through chunked data in mp2t format and I couldn't find a way to convert it to m3u8. now i managed to do it. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment