[vlc] help in h.264 RTP streaming

nazlena mohamad ali nazzlena at gmail.com
Wed Oct 10 11:57:12 CEST 2007


 Hi

This code goes well with play, stop and fullscreen button, the only thing is
the pause button is not there. How to make pause button? I try to make pause
button but when it streams video, when I click pause, it stop but it work
play again when i click at play button.  Is it because of the encode mp4
file setting that I use? I use 320x240 image size, 128kbps audio,350 kbps
video bit rate


Please help me

Newbie

   1. <?php
   2. function printInstructions( ) {
   3.   ?>
   4.   <html>
   5.   <body style="text-align:center;color:#F7EBDE;font-family:Trebuchet
   MS;background-color:#73615A;" >
   6.   <h2>
   7.     <br/></br>To view movie, user need to make an option on the
   left area. User can either play the whole movie or play by events.</br></br>
   Please wait a while before the clips playing.</br>
   8.     </h2>
   9.   </body>
   10.   </html>
   11.   <?php
   12. }
   13. if (!isset ($_GET['playnow']) ){
   14.   printInstructions();
   15.   die();
   16. }
   17. ?>
   18.
   19. <SCRIPT LANGUAGE="JavaScript" >
   20. function getVLC(name )
   21. {
   22.     if (window.document[ name])
   23.     {
   24.           if (navigator.appName.indexOf ("Microsoft Internet")==-1
   )
   25.                 {
   26.                     if (document.embeds && document.embeds [name])
   27.                         return document.embeds[name ];
   28.                 }
   29.             return window.document[name ];
   30.     }
   31.     if (navigator.appName.indexOf ("Microsoft Internet")==-1)
   32.     {
   33.         if (document.embeds && document.embeds [name])
   34.             return document.embeds[name ];
   35.     }
   36.     else // if (navigator.appName.indexOf("Microsoft
   Internet")!=-1)
   37.     {
   38.         return document.getElementById(name ) ;
   39.     }
   40. }
   41.
   42. </script>
   43.
   44. <html>
   45. <body style="margin:0;padding:0;background-color:#73615A;">
   46. <?php
   47. require_once "../vlc.php";
   48. include_once('../ez_sql.php' );
   49. $movieID = $_GET[ 'movieID'];
   50. $movie = $db->get_row ("select filmFile from Movie where
   movieID=$movieID" );
   51. if(isset ($_GET['stopTime']) ) {
   52.   $stopTime = $_GET[ 'stopTime'];
   53. }
   54. else {
   55.   $stopTime = 99999999;
   56. }
   57. $filmName = setupShot($movie ->filmFile, $_GET['movieID'], $_GET[
   'startTime'], $stopTime );
   58. if(isset ($_GET['eventID']) ) {
   59.     $eventID = $_GET[ 'eventID'];
   60. }
   61. else {
   62.   $eventID = "0";
   63. }
   64. ?>
   65.
   66.  <object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921"
   67.     codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab
   "
   68.        width="460" height="400" events= "True" name="vlc">
   69.  <param name="Src" value="rtsp://<?php echo
   $_SERVER['SERVER_ADDR']?>:554/<?php echo $filmName?>" />
   70.  <param name="ShowDisplay" value="True" />
   71.  <param name="AutoLoop" value="False" />
   72.  <param name="AutoPlay" value="True" />
   73.
   74.  <EMBED pluginspage="http://www.videolan.org"
   75.        type="application/x-vlc-plugin"
   76.        progid= "VideoLAN.VLCPlugin.2"
   77.        width="460"
   78.        height="400"
   79.        name="vlc"
   80.              autoplay="yes"
   81.              loop="no"
   82.              target="rtsp://<?php echo
   $_SERVER['SERVER_ADDR']?>:554/<?php echo $filmName?>"
   83.              id="vlc"></EMBED></object>
   84. <form name="eventForm">
   85.  <input type="hidden" name="eventID" value="<?php echo $eventID?>"/>
   86.  </form>
   87.    <table>
   88.    <tr>
   89.    <td width="460">
   90.    <form>
   91.           <TR><TD>
   92.         <input type="button"  value="Play" name="play"   onClick=
   "getVLC('vlc').playlist.play()">
   93.         <input type="button"  value="Stop" name="stop"   onClick=
   "getVLC('vlc').playlist.stop()">
   94. <input type="button"  value="Pause" name= "pause"   onClick=
   "getVLC('vlc').playlist.togglePause()">
   95.         <input type="button"  value="Fullscreen" name="fullscreen"
    onClick="getVLC('vlc').video.toggleFullscreen();">
   96.
   97.    </form>
   98.      </td>
   99.    </tr>
   100.  </table>
   101. </body>
   102. </html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc/attachments/20071010/67377a0d/attachment.html>


More information about the vlc mailing list