Forum Moderators: coopster
If I understood things correctly, the core video is stored as a flash-video in flv-format, but you need an swf-container to show it (otherwise the media player attempts to download the file instead of displaying it within the website. The alternative way is to embed a player via javascript?)
I found that php offers a number of flash-functions coming along with the ming-framework. I find that quite convenient, because I think this bears the chance to add sequences to the video just by modyfying the php code instead of generating a comeletely new video.
However, experimenting with some of the code snippets found here on webmasterwolrd and some other resources I didn't get a single stream displayed properly, yet. So my first question is:
What do I have to do to get ming running? I uncommented the appropriate line in php.ini, and my php-info file (php 5.0.5) shows two rows:
Ming SWF output library enabled
Version 0.3beta1
Does this mean all necessary compontents are installed? Or is any additional graphics-library required? Is ming deliverd with the php 5 bundle or do I have to download anything additional?
Heres my html code:
<object classid="CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000" width="450" height="450"
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=7,0,0,0">
<param name="movie" value="ming2.php">
<param name="quality" value="high">
<param name="scale" value="exactfit">
<param name="menu" value="true">
<param name="bgcolor" value="#000040">
<embed src="ming2.php" quality="high"
bgcolor="#000000" width="450" height="450"
type="application/x-shockwave-flash"
allowscriptaccess="always" allowfullscreen="true"
pluginspage="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">
</embed>
</object>
It is supposed to embed an experimental file named "ming2.php", which currently looks like this:
<?php
$filename = "test1.flv";
ming_useswfversion(6);
$s = new SWFVideoStream();
$s -> __construct ($filename);
$m = new SWFMovie();
$m -> add($s);
header('Content-type: application/x-shockwave-flash');
$m->output();
?>
Which, of course, doesn't work.
1) What are the minimum lines of code necessary to get that file "test.flv" displayed in a flash-player? (this test-file works fine, it is shown in e.g realplayer the way it should).
2) How could I add some seconds of an image-dump-jpeg in the beginning?
3) How can I add some seconds of a "page" containing some text?
4) What do I have to add to get these "play", "rewind" "forward-" etc buttons displayed?
Any help is well appreciated. I know, that the easiest way would probably be to buy adobe products and create the swf-file from that, but I 'd really love to learn more about the way flash videos are created and the elements they may contain.
<embed
src="http://mySite.com/flash/mediaplayer.swf"
width="600"
height="300"
allowscriptaccess="always"
allowfullscreen="true"
flashvars="width=600&height=300&file=http://mySite.com/flash/playlist/myPlaylist.xml&autoscroll=false&shuffle=false&showdownload=false&displaywidth=350"
/>
Yes, I found a number of freely available players on the web. The resource you gave seems very well organized and I'll have a look tomorrow and try to get my application running with this workaround.
Nevertheless, I thought php offered it's own means to develop such a player within all the swf-commands, but it seems this part is highly experimental at the moment, and I think my hoster doesn't support it by default, yet. It would be very nice if one day I'll be able to handle flv-files form within pure php. Keep things simple, so to speak.
After a whole week of experimenting with the php-swf-functions I installed the player you recommended and managed to integrate and ftp the video to my website within a single day.
In contrast to some other resources I came across the past days, this site has a very clear an straightforward usability and documentation, which made it quite easy to install the package. I had some trouble to find the price for a commercial license, which was hidden in a dropdown-menu of the form, though. Could be presented a bit more visible.
I'm not really sure, whether I made everything the best way: I used the recommended pure javascript-installation
a) because it is definitely w3c-conform and
b) I never got anything to work yet with the <object>...<embed>- html syntax. Dunno why, I think I'm a bit stupid here.
However: I almost got a shock when I watched the video on an older computer in my company, which had a lower flash-version installed: This javascript solution does not automatically try to install the newest adobe flash-player. So as a workaround I present some explanatory text and a href-link to adobe.