[FFmpeg-user] HTML5 live streaming

Ricardo Kleemann ricardo at americasnet.com
Tue Apr 23 04:19:45 CEST 2013


Hi Jonathan,

This is awesome! It worked! :-)

so my next step... how do I do adaptive bitrate? For example, I want to
have a stream for iPad, a stream for iPhone, Android...

Another question... does m3u8 work for a desktop browser? I do I need an
embedded player like JWPlayer for desktop?

Thanks so much!
Ricardo

On Sun, Apr 21, 2013 at 9:30 PM, Jonathan Isom <jeisom at gmail.com> wrote:

> On Sun, Apr 21, 2013 at 7:43 PM, Ricardo Kleemann
> <ricardo at americasnet.com> wrote:
> > That's great, I didn't realize it.
> >
> > I'm trying to convert the input to h.264 + AAC and output to the
> segmenter
> > but it's not working. Can you help me find the error in the command?
> >
> > ffmpeg -loglevel debug -threads 4 -i "rtmp://server1/live/livestream1"
> > -i_qfactor 0.71 -qcomp 0.6 -qmin 10 -qmax 63 -qdiff 4 -trellis 0 -vcodec
> > libx264 -s 480x270 -b:v 512k -b:a 56k -ar 22050 -map 0 -f segment
> > -segment_time 10 -segment_list live.m3u8 -segment_list_flags +live
> > live_%05d.ts
> >
>
> Here is the command I use which works with my iPad 3rd Gen. I cd into
> the directory that I want the files to load from on the server. My
> case is "/var/www/localhost/htdocs/stream/" which is
> "http://domain/stream/". You probably should lose all the extra
> options. for realtime encoding add "-re" to the command. You will want
> to change RESOLUTION BITRATE & VIDSOURCE to what you need. Also below
> is an example html file.
> This is with ffmpeg git from a week ago. notice the "-hls*" options
> instead of -segment.* options.
>
> ffmpeg  -i VIDSOURCE -y  -c:v libx264 -b:v BITRATE -vprofile baseline
> -preset medium -x264opts level=41 -threads 4 -s RESOLUTION -map 0:v
> -map 0:a:0  -c:a libfaac -b:a 160000 -ac 2   -hls_time 10
> -hls_list_size 6 -hls_wrap 18 -start_number 1 stream.m3u8
>
> index.htm:
> <html>
> <body>
>    <video  height="531"  width="945" autoplay="autoplay"
> controls="controls">
>     <source src="stream.m3u8" />
>    </video>
> </body>
> </html>
>
> Hope this is helpful.
>
> Jonathan
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
>
> ------------------------------------------------------
> Powered by Xeams. Visit xeams.com for more information
> ------------------------------------------------------
>


More information about the ffmpeg-user mailing list