[FFmpeg-user] Live RTMP stream to HLS
Paulo Miguel Almeida Rodenas
paulo.rodenas at agenciaclickisobar.com.br
Sat Nov 16 12:27:45 CET 2013
I've faced a similar situation in a project of mine and here is what worked for me:
1 - Recompile your ffmpeg adding --enable-libx264 --enable-gpl parameters
2 - Execute ffmpeg -v verbose -i rtmp://<host>:<port>/<stream> -c:v libx264 -c:a aac -ac 1 -strict -2 -crf 18 -profile:v baseline -maxrate 400k -bufsize 1835k -pix_fmt yuv420p -flags -global_header -hls_time 10 -hls_list_size 6 -hls_wrap 10 -start_number 1 <pathToFolderYouWantTo>/<streamName>.m3u8
3 - Install a http server such as apache/jetty/nginx or any other.
4 - Make that folder you just mentioned on ffmpeg command (<pathToFolderYouWantTo>) to be accessible by an http url
5 - Create a simple html page like this:
<video controls width="480" height="270" src="<streamName>.m3u8"/
6 - Access it from any Apple device.
Although it worked for me, it had a huge delay due to conversion process and so on. In my case it was around about 1:40 secs.
Hope this works for you
Paulo Miguel Almeida
From: ffmpeg-user-bounces at ffmpeg.org [ffmpeg-user-bounces at ffmpeg.org] on behalf of btpoole [tpoole at mail.com]
Sent: Thursday, November 14, 2013 8:26 PM
To: ffmpeg-user at ffmpeg.org
Subject: [FFmpeg-user] Live RTMP stream to HLS
I have seen several topics but no final solution. I am able to download a
live stream using rtmpdump. I can save the file but don't wish to do so. I
want to "push" the stream into ffmpeg to convert it to HLS if possible. I
can't save the the file in mp4 format because it can not be viewed until the
download is complete. This will be a live stream so there might not be an
end. I have seen some stuff on listen but have not been able to get the
syntax right. It took a while to get rtmpdump formatted correctly. Is ffmpeg
able to take the live stream and transcode, encode, convert to HLS? If so
can I get some advice or a point in the right direction.
Thanks for the help.
View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Live-RTMP-stream-to-HLS-tp4662357.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
More information about the ffmpeg-user