I am trying to record rtsp stream in HLS format using openRTSP and ffmpeg. openRTSP receives rtsp and pipe to ffmpeg to record,
Here is the command I used and which works fine
openRTSP -D 10 -v -t -c -b 800000 rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov | .././ffmpeg -r 15 -i - -codec copy -hls_list_size 65535 -hls_time 2 "./live.m3u8"
Note in above commnad -v is for video only.
But now I need to record audio also so I removed -v option, but the video is not getting recorded. It's just creating two files named
audio-MPEG4-GENERIC-1
and video-H264-2
no HLS video file. I think some problem with piping. Can anyone help me to solve it.
I know this is an old question, but it came up in a Google search for me today. Since I can answer this I will, for any future Googlers out there.
You don't need to use openRTSP at all. ffmpeg can handle RTSP streams just fine. I recently coded up a livecam streaming site for my security cameras. The command I'm using to generate the HLS stream is this:
This will output
hls.m3u8
and all of thehls.ts
files. You might have to play with some of those parameters for your specific needs. Here is some good documentation for the flags: FFmpeg Formats Documentation