[FFmpeg-user] HTML5 live streaming

Ricardo Kleemann ricardo at americasnet.com
Mon Apr 22 02:22:45 CEST 2013


Hi Guys,

Some additional info if someone can help... I'm actually able to play my
m3u8 stream directly using VLC... but in HTML5 video tag it is not working.
The iPad says that it cannot decode.

I must have something in the ts files that doesn't work for iPad, while it
still works for VLC

Any ideas on how to troubleshoot?

thanks
Ricardo


On Sun, Apr 21, 2013 at 2:53 PM, Ricardo Kleemann
<ricardo at americasnet.com>wrote:

> On Sat, Apr 20, 2013 at 10:21 PM, JoelB <onephatcat at earthlink.net> wrote:
>
> > Should work for Roku and anything that supports HLS, I think android
> does,
> > various flash players, QuickTime 7 for Mac, safari(?) supposedly supports
> > it as well. Generally, you want to encode h.264 video with AAC audio.
> >
> > Joel
> >
> > Sent from my iPhone
> >
>
> So that's what I'm doing... I'm encoding to 264 and AAC, and piping to the
> segmenter.
>
> I see the m3u8 file being written as well as all the other ts files.
>
> But if I try to access from an iPad it gives me different errors, sometimes
> it says "cannot decode", sometimes it says cannot find the file.
>
> I'm assuming that the m3u8 file is supposed to be served up by a standard
> web server (apache). Do I need any special configuration in apache for
> this?
>
> Here's my ffmpeg command:
>
> ffmpeg -threads 4 -i "rtmp://server1/live/livestream1" -f mpegts -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 - | m3u8-segmenter -i - -d 10 -p
> cidadeviva/live -m /shared/media/videos/cidadeviva/live.m3u8 -u
> http://web1.americasnet.com/videos/
>
> It succeeds in reading the rtpm stream and does pipe the output to the
> segmenter since I see all of the m3u8 and ts files being written.
>
> I'm able to access the m3u8 file via http, although I see apache often
> complains that it can't find the file. Could that be because the file is
> constantly being written?
>
> Ricardo
>
>
> > On Apr 20, 2013, at 8:56 PM, Ricardo Kleemann <ricardo at americasnet.com>
> > wrote:
> >
> > > Hi Joel,
> > >
> > > Thanks, I'll play around with that.
> > >
> > > Another question... is the segmenter only for iOS? Would other devices
> > also
> > > work with this?
> > >
> > > Ricardo
> > >
> > > On Sat, Apr 20, 2013 at 8:45 PM, JoelB <onephatcat at earthlink.net>
> wrote:
> > >
> > >> Usually a segmented stream URL ends with .m3u8 so for ios, you just
> give
> > >> the user a link to that m3u8 playlist URL and if you have a valid
> > stream,
> > >> the phone will just play it.
> > >>
> > >> http://inodes.org/bigbuck/big_buck.m3u8
> > >>
> > >> Would probably be the res
> > >>
> > >>
> > >> Joel
> > >> Sent from my iPhone
> > >>
> > >> On Apr 20, 2013, at 5:35 PM, Ricardo Kleemann <
> ricardo at americasnet.com>
> > >> wrote:
> > >>
> > >>> Hi,
> > >>>
> > >>> I've been searching around for solutions to use ffmpeg to do live
> > >> streaming
> > >>> to html5.
> > >>>
> > >>> I understand that for iOS I need a segmenter?
> > >>>
> > >>> I've installed the latest ffmpeg and also m3u8-segmenter from git,
> but
> > >> I'm
> > >>> not really sure how to use it. The m3u8-segmenter site has an example
> > >> like
> > >>> this:
> > >>>
> > >>> ffmpeg -loglevel quiet  -i big_buck_bunny.ogv -f mpegts - | \
> > >>> m3u8-segmenter -i - -d 10 -p tmp/big_buck_bunny -m tmp/big_buck.m3u8
> > >>> -u http://inodes.org/bigbuck/
> > >>>
> > >>> But in terms of an HTML5 page source, how would I access the stream
> > that
> > >> is
> > >>> being generated by the segmenter?
> > >>>
> > >>> Is there a simpler way to use ffmpeg for live streaming?
> > >>>
> > >>> thanks
> > >>> Ricardo
> > >>> _______________________________________________
> > >>> ffmpeg-user mailing list
> > >>> ffmpeg-user at ffmpeg.org
> > >>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> > >> _______________________________________________
> > >> 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
> > >> ------------------------------------------------------
> > > _______________________________________________
> > > ffmpeg-user mailing list
> > > ffmpeg-user at ffmpeg.org
> > > http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> > _______________________________________________
> > 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
> > ------------------------------------------------------
> >
> _______________________________________________
> 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