Streaming mp4 video using oflaDemo (or otherwise) on Red5

1,072 views
Skip to first unread message

Subhayan Mukerjee

unread,
Nov 5, 2013, 7:17:23 AM11/5/13
to red5in...@googlegroups.com

The default oflaDemo application in Red5 uses JWplayer to play flv/mp4 videos. The code (as in the index.html file) is :


<center>
<b>RTMP</b>
<div id='mediaspace'>This text will be replaced</div>
<script type='text/javascript'>
  jwplayer('mediaspace').setup({
    'flashplayer': 'player.swf',
    'file': 'hobbit_vp6.mp4',
    'streamer': 'rtmp://localhost/oflaDemo',
    'controlbar': 'bottom',
    'width': '848',
    'height': '360'
  });
</script>
<br />
<div>

However, this page in the JW Player website states that it is possible to use the HTML5 video tag instead of flash to stream the videos. But then, from what I know, the video tag does not support RTML streaming. How do I incorporate the video tag into the above code in the oflaDemo  index.html page?

Can anyone help? Thanks.


--
Subhayan Mukerjee

Dominick Accattato

unread,
Nov 5, 2013, 12:34:58 PM11/5/13
to red5in...@googlegroups.com
Hello Subhayan,

Red5 has native support for RTMP. The HTML video tag does not support RTMP so the video would  need to be transcoded into a different video container and then sent down over a separate transport. However, based on your example code, it appears you're just looking to play the file "hobbit_vp6.mp4" as a progressive video (on demand, not live). In that case, you could simply move the file "hobbit_vp6.mp4" from the subdirectory into the web accessible directory. For instance, it is probably located:

$RED5_HOME/webapps/oflaDemo/streams/hobbit_vp6.mp4

You could move it to:

$RED5_HOME/webapps/oflaDemo/hobbit_vp6.mp4

Then you could use your video tag:

<video width="320" height="240" controls>
  <source src="hobbit_vp6.mp4" type="video/mp4">
  Your browser does not support the video tag.
</video>

Given that your HTML file is in the same directory and the file format is supported by the video tag, you would see the video.

Now if you were trying to do live streaming, that's whole new problem; one which would require stream transcoding and some custom segmentation support. Too much to go into right now.


--
 
---
You received this message because you are subscribed to the Google Groups "red5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to red5interest...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Dominick Accattato
Red5 Co-Project Manager & Developer
---

Subhayan Mukerjee

unread,
Nov 6, 2013, 12:42:42 AM11/6/13
to red5in...@googlegroups.com
Thanks.

So it's not possible to do "pseudo-streaming" as they call it (http://www.longtailvideo.com/support/jw-player/28855/pseudo-streaming-in-flash) to view mp4 videos using the video tag, is it?

The whole video needs to be downloaded before the user can seek to a later part of the video, am I right?
Reply all
Reply to author
Forward
0 new messages