6

I'm using ffmpeg to create a streaming. It works fine. I have a server and with ffplay I can watch my stream. My only (big) constraint is real time.

I have to embed it into an HTML page accessible from mobile devices. I tried with HTML5 video tag but I can't include sdp files into it.

With ffmpeg I create a stream from my webcam. I have also created the sdp file but in HTML5 doesn't work.

The code is here:

ffmpeg server:

sudo ffmpeg -re -f video4linux2 -i /dev/video0 -fflags no buffer rtp://224.10.20.30:20000

file.sdp

v=0
o=- 0 0 IN IP4 127.0.0.1
s=No Name
c=IN IP4 224.10.20.30
t=0 0
a=tool:libavformat 55.7.100
m=video 20000 RTP/AVP 96
b=AS:200
a=rtpmap:96 MP4V-ES/90000
a=fmtp:96 profile-level-id=1

ffplay: (It works)

ffplay file.sdp

How can I view the stream in a browser?

double-beep
  • 3,889
  • 12
  • 24
  • 35
Marco Peca
  • 81
  • 1
  • 6
  • Judging from http://stackoverflow.com/questions/1735933/streaming-via-rtsp-or-rtp-in-html5 my guess is you'd need/want to stream it via some intermediate server: https://trac.ffmpeg.org/wiki/StreamingGuide – rogerdpack Jan 28 '14 at 20:59

0 Answers0