PHP& MySQL Video Playlist (JW Player)

Great… Thanks for the comments on the site. It’s really old and I need to update to use CSS layout. I am more of a designer. But I am good looking for stuff around and combining things here or there.

I’ve been learning PHP for like a year. But the thing is I can’t think like programmer… you know some times I can get easily lost with silly technical stuff.

OK, I am in Philadelphia, so it’s 12:37AM now. Let me know if want to do the screen show sometime later. I also need to take a break… I am consumed on this, and feel very drained.

the JW Player used to be called JW FLV player, only for Flash. Now it also includes h264 and mp4, as well as swf and image formats. They have a version for Silverlight, but it doesn’t support playlists, which is major drawback.

Well, I am also on the east coast, but I am building a Spanish website.

Have good night, partner. 8)

Ok, here is the code for a sample of JW.HTML… To make sure we are on the same page, please change the ? ? ? to the thumbnail location folder name and some JPG picture. (Doesn’t matter of the picture…) And, let me know if this page works…

If this shows the videos correctly, then next we will change it to use the database version. Then, see why it is not pulling the correct data from the database. I am guessing it is a QUOTE issue.

Anyway, let’s start with getting this page to work. Next, we will replace the playlist with the database version. Then, we can move on to the creation of the playlists…

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<script type="text/javascript" src="mediaplayer_5-9/jwplayer.js"></script>

<div id="container">Loading the player...</div>

<script type="text/javascript">
    jwplayer("container").setup({
    flashplayer: "mediaplayer_5-9/player.swf",
	playlist: [
            { duration: 32, file: "/Videos/Video1.flv", image: "/Thumbnails???/???.jpg", title: "Testing - Video 1", description: "Test Video1" },
            { duration: 124, file: "/Videos/Video2.flv", image: "/??????/???.jpg", title: "Testing - Video 2", description: "Test Video2" },
            { duration: 542, file: "/Videos/Video3.flv", image: "/???/???.jpg", title: "Testing - Video 3", description: "Video333333333" }
        ],
        "playlist.position": "right",
        "playlist.size": 360,
        height: 270,
        width: 720
    });
</script>

<body>
</body>
</html>

Hi, Ernie. The problem has never been with the HTML. I got that working from the first HTML sample you provided. The playlist is fine when using like this. I tested that before over and over and it is fine.

The issue is only when pulling from the database.

One thing that still intrigues me is the following: $albumData = $row[2];

If you take a look at my video_albums table one more time:

Note that playlist field is on column 3. Thus I thought that in $albumData = $row[2]; the number 2 represented column 3. But when we say $row, you mean a data row in the database, and not a column number, right?

I would like to see your database set up to see if this is where we have the issue.

Also, I have the variable $albumName set up like this: $albumName = ’ '; or equal to blank. Is that OK?

Ok, I finally understand the set up of $albumName =‘Test Playlist1’;
It’s matching the $albumName value to the database value in the field playlist. These value will be pulled dynamically at a later time.

At least I got that clear now :slight_smile:

Sorry, have been gone most of the day. I also have a full day planned Sunday. (Superbowl party in the evening!) So, I may not respond much tomorrow.

The $row[number] issue is because field numbers in rows queried from database start at 0 ( zero ).
So, count them 0, 1, 2, etc… My database is set up like yours.

Yes, using the temporary assignment line below, is just for testing. It is to force the code to load a playlist.
(
$albumName=‘Test Playlist1’; // Temporary test playlist for testing… )

When you “fetch” a row of data with a variable as the results ( $row = mysql_fetch_row($result); ) ,
the results is an array of data. You could call it $col, but, since it is a ROW of data most PHP programmers
call it $row. Sooo… $row[0] is the first filed in the row, $row[2] is the third, etc…

I have reviewed your code again and do not see any problems. I am wondering if you are actually making
a connection to your database. Here is some code to check for errors connecting to the database:

Between these two lines:
$dbConn = mysql_connect( $hostname, $username, $password );
@mysql_select_db($dbname);

if (!$dbConn)
{
die('Could not connect: ’ . mysql_error());
}

SO, not it will look like this:

$dbConn = mysql_connect( $hostname, $username, $password );
if (!$dbConn)
{
die('Could not connect: ’ . mysql_error());
}
@mysql_select_db($dbname);

This code will display an error message if your page does not connect to the database.

One more thing we can add is a check for record count of the results when queried. This will tell us if it is connected to the database, but, our query is bad…

After this

$result = mysql_query  ($query);

Add these lines…

if (!$result) {
die('Invalid query: ’ . mysql_error());
}

What these will do is kill the page and show you the error if one is there. If your code does not connect to the database, you will get an error. If your query is bad you will get a message. This might help.

If not I will rewrite my code to match your database and send it to you. Let me know what you get for errors if any…

FINALLY I got it to work. I can now pull the videos from the database!

I had to modify the Query, though, and my PHP code looks like this now:
[php]<?php
include(’…/_includes/connect.php’);
?>

Loading the player...

[/php]

I believe the issue was that the scope of the $albumName variable. I think somehow it wasn’t being passed through the query. Well, I think I can now enjoy the football game without being thinking of this issue.

Let me know if this works in terms of the overall scope of the project.

Great!!!

Okay, now the only other issue is the Drop-down and dynamic code. I have that ready to send to you.
BUT, I need to do that later on… It is 12:30 and we lost our team! LOL… So with all the food and drinks, I am ready for bed…

Now that the playlist works from the database, our next step is to set up a dynamic Javascript to use the
drop-down to select which playlist to use. I have done this for a “Quilting-Sewing” site, so I have the code
and just have to change it a little for your use.

Hmmm, I just noticed you used “mysql_fetch_assoc” instead of fetch_row… ??? I will have look at what the
difference it between them… But, glad you got it working…

Lastly, you will have to create an ADMIN page to mix the video data into a playlist. I can tell you how to
do this. It is easy… More tomorrow…

Great. Here’s the link that I am testing: http://maranatha.tv/VIDEOS/videos02.php

Actually my team won, LOL. I lived in NYC for 16 years and the Giants is the only team I liked a bit from the city. Other than that, I hate the Yankees (and I used to live in The Bronx), the Mets, the knicks, you figure the rest.

I think the mysql_fetch_assoc() and mysql_fetch_query() functions are pretty much the same. I don’t think that makes any difference. But since mysql_fetch_assoc() is newer, to play it safe it is better to keep that one because the old one might become deprecated one day.

Anyway, at least you had your Super Bowl party. I had to watch the game by myself in my couch!

We will tackle the rest tomorrow… Good night.

I’m off to bed, but, took a quick look at your site. Looks like it is almost there…

Now, combine that sample with the one you sent me with the movie-type theater opening and you will
have a very nice site…

Finally, we are getting somewhere…

Well, have to work early, but, will try to check in with the dynamic drop-down code as soon as I can…

Very nice to get somewhere after all these tests… LOL; That’s programming…

Oops, I meant mysql_fetch_array() not mysql_fetch_query().

Yeah I am excited this thing will turn out great.

I am familiar with inserting values into the database. However, I am very curious as to how you will implement it, given that you will pull all the playlist fields from videos table into a single field (the playlist field) of the video_albums table. Also, I am curious how you will pull the video names from the video themselves.

I have a moment between jobs. Just looked at your site sample and it looks very nice. I am assuming that you will put a list of "playlist"s on the side somewhere so the user can select from that list. This would be pulled from the database into a drop-down box or in a scrollable box like your current list of videos.
That is all easy to do. Then, the code in the box would drop the playlist into the video player.
That is easy to do also…

The only other item to work on would be the Playlist Editor. I imagine it would be like this…
A simple form with your videos listed, showing all their details. You would be able to edit these details and update them and delete them, add new ones, etc… There would be a part of the form that would list the videos for creating a playlist. This would make everything very easy to use. You would just scroll down the video list, select a video, the details of the video would appear and you would have a few buttons which would be UPDATE, DELETE, ADD-NEW, ADD-TO-PLAYLIST. Simple! Then, you would need code to handle the button pressed.

I have this running on a site now. It just not for videos. Do you want to start yourself with it or do you want my code for it? Let me know what you need from me…

Oh, also, I liked your projection-screen effect on your side. Cool!

Hi, Ernie, I hope your day is going great.

Yeah, and of course, the albums or playlists will be somewhere Right now I am just playing with the player customizations. As you can see the videos will auto-advance, play randomly, etc.

I have an admin panel that adds text content to the pages and uses tinyMCE and the Features of Tinymce Ajax File(from phpletter.com) to upload single image and video files. I can probably wok on that, but I am sure I would so lost when it comes to uploading the videos and what not. and creating the playlists.

If it’s not too much to ask, post your code because I am sure is much better than what I have. I also by following your code design, I am learning good programming practices as well.

One thing that I am trying to is detach the playlist from the player so I can place it wherever I want. I read is not possible unless I use two players that interact with each other: one will only show the video screen, and the other the player controls. I did something somewhat similar to that in that old site I showed you before. I place two players, the JW Image Rotator and the JW FLV Player, but they did not interact since the first one you just display some random images, and the other the MP3 music… Take a look:http://movimiento22.com/artistas/musicos/diversion.html CLick on any of the images to see it in action.

Here’s the CP I am using, which I have been building for while by following many different tutorials, and by the use of help of kind people like on many forums. It’s in a testing sever I set up for a website I build for my brother. Even though, it’s a different site, basically is the same CP.

http://javierbooks.comuf.com/administrar/login
userane: test
password: test

This is the site that this CP controls… http://javierbooks.comuf.com/spanish.php It’s NOT 100% functional on this test server.

But here’s the real website: http://www.javierbooks.com

What I want to do, eventually, is integrate the video admin panel with this one. What do you think?

OK, here’s what I got so far: http://maranatha.tv/VIDEOS/videos02.php

I manged to pull the drop down list from the DB. I also applied some old I used before to highlight every other row in the drop down playlist menu. This way each row is easily identified as the the number of playlists grow in the database.

I am falling short in terms of of actually selecting the the playlist and affecting the player:
Here’s the function I used to accomplish this.

[php]function getVideos(){
$query = mysql_query(“SELECT * FROM video_albums”) or die(mysql_error());

//start and first row of the table Highlight here
echo "ALBUMS"."<select name='videos'>";

if(mysql_num_rows($query)==0){
	echo'<tr class="tableHL-header"> <td colspan="\4\">NO POSTS ALBUMS FOUND!</td></tr>';
	} else	{
		
	//HIGHLIGHT TABLE ROWS *******************************
    //$i is set as One (1).  for Highlighting table rows.
	$i=1;
	while($albums = mysql_fetch_assoc($query)){
		
	//$i goes up with every iteration, this finds the remainder of $i divide by 2, therefore all odd numbers will return '1' and all even numbers '0'
	$x=$i %2;
	
	//if statement sets odd numbers as one color and even numbers as another.
	if($x == 1) {
	$class = "dropdown_1";
	} else {
	$class = "dropdown_2";
	}
	//HIGHLIGHT TABLE ROWS ENDS*******************************
	//making the 'class' attribute a variable means that now all odd rows should be one color and all even rows another
	
	echo 
	
	"		<option class='$class'>".$albums['albumName']."</option>//css class loaded dynamically.
	";
	
	$i++; //HIGHLIGHT TABLE ROWS CODE*************************
	}

}

}[/php]

The rest is pretty much hardcore for me.

Okay, your last comments bring up full circle back to the “Dynamic” code I was talking about. Basically you use a html button with on Onclick option at the end. The onclick sends the code to a Javascript routine. The routine pulls a variable that was stuffed into an array when loading the page. The variable would be one playlist. You will be limited on how many playlist you can stuff into an array. Some browser crap out if you load too much. You can play with that… The Java routine would take this data from the array and update the JW data with the new one. I am not sure about how JW handles playlists. If it loads it on page-load, then you may have to refresh the page to make it work. Since a user would be clicking a playlist tag or button, it would not matter if the page refreshes. They would still get their new videos…

First, I think the ADMIN or PlaylistCreator page should be done. One you get some playlists together, THEN work on getting them on your PlayerPage… So, first you will need these code parts to accomplish it all:

  1. a simple way to get your videos on screen to be able to edit, update, delete or add new ones.
    (This is simple code and I will give it to you further down this post.)
  2. a simple list of the current playlists and same with the videos, a way to edit update delete and add.
    (Basically the same code, just with different fields and data…)
  3. Perhaps a sample area that would be exactly like your PlayerPage that would “DEMO” the newly added
    or edited playlist.

You can put your videos onscreen in some sort of scrollable listbox, but, I just use a SELECT-OPTION dropdown. I find this will take very little screen space and works very well. The only time this does not work well is when there are a very large number of items. If you have 1000 videos, you will not be able to use a drop-down. (Unless you divide the videos based on a criteria such as first letter (alphabetically) or based on type of music or whatever… That would be your decision. But. for now , let’s use a dropdown for testing.
Here is a simple page with code to load names of videos into a dropdown:

First a few notes on this code. There is no error checking, little needed, so didn’t put any in. The select dropdown pulls the video name and descriptions and also creates a tricky VALUE with both name and description. This is PASSED ONTO the javascript code which separates the values and populates the two text boxes. Since these text boxes are inside the form, they are passed to the second php page which updates the database. Okay, let’s look at the form page which will be the actual admin page. (Later, you can add in the playlist admin page, but, for now let’s get the video part working…

File VideoADMIN.php (NOTE: You will have to add in all of your fields, etc.)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<?PHP
  $hostname='zzzzzzzzzzzzzz.com';
  $username = "zzzz";
  $password = "zzzz";
  $dbname = "zzzzzz";
?>

<script language="JavaScript" type="text/javascript">
function videochanged(){
  var VideoDataArray = document.getElementById('VideoSelect').value.split('|');
  document.getElementById('VideoName').value = VideoDataArray[0];
  document.getElementById('VideoDescription').value = VideoDataArray[1];
}
</script>

<body>
<form id='VideoAdminForm' name="VideoAdminForm" action='VideoADMINupdate.php' method='post'>
  <br /><center>Video Editor<br /><br />
  Select Video Name:<SELECT ID="VideoSelect" NAME="VideoSelect" onchange="videochanged();">
  <?php
    // connect to your database, get data about your video list...
    $dbConn = mysql_connect( $hostname, $username, $password );
    @mysql_select_db($dbname);
    $query="SELECT * FROM Videos";
    $results = mysql_query ( $query, $dbConn);
    // loop through the results, creating an option list, I am just using Name and Description for this test...
    while( $row = mysql_fetch_row($results) ) {
	print "<CENTER><OPTION VALUE='" . $row[1] . "|" . $row[3] . "'" . ">" . $row[1] . "</OPTION>\n";  //NOTE: row(1) is videoname row(3) is descriptions field
	      }
	print "<OPTION VALUE=\"Enter a new Video name here...|Video Description goes here...\">Add New Video!</OPTION>\n";
    mysql_close($dbConn);
  ?>
  </SELECT>
  <br /><br /><br /><br />ALTER/UPDATE fields below...<br /><br /><br />
  <input id='VideoID' name='VideoID' type='hidden' VALUE='' />
  Video Name : <input id='VideoName' name='VideoName' type='text' VALUE='' size='70'>
  <br /><br />
  Video Description : <input id='VideoDescription' name='VideoDescription' type='text' VALUE='' size='70'>
  <br /><br />
  <input type="submit" name="UpdateVideo" value="Update This Video!" />
  <br /><br /><br />
  <input type="submit" name="DeleteVideo" value="Delete This Video!" />
  </center>
</form>
</body>
</html>

Now that you have a form with your videos, you have to UPDATE or DELETE your changes. This is done in the second file. It reads the post and handles it all, then returns to the ADMIN page so another update can be handled. Remember, all of this post is just about videos, you will do the same two pages for a playlist process. I also add a field called “LastUpdated” to my database video and plylist tables. I use this in logs and reports to let me know if the data is up to date. This timestamp is nice as an added feature. For updates, it tries it first. If it fails it does an insert instead. This way if you mistype the name, it will still insert it. Of course, we have to add in the thumbnail upload. (This is done on the ADMIN page and will load the thumbnail from your local drive and resize it automatically for you. Here is the posting page…

VideoADMINupdate.php

<?PHP
   SESSION_START();
//print_r($_POST);
//die();
  // Set up database connection...
  $hostname = "zzzzzzzzzzz.com";
  $username = "zzzzzzzzz";
  $password = "zzzzzzzzz";
  $dbname = "zzzzzzz";
  $dbConn = mysql_connect( $hostname, $username, $password );
  @mysql_select_db($dbname);

  // Handle Video Updates...
  if(isset($_POST['UpdateVideo'])) {
    // Update the Video's data, if it does not exist then insert new version...
	$query = "UPDATE Videos SET VideoName='" . $_POST['VideoName'] . "'VideoDescription='" . $_POST['VideoDescription'] . "', LastUpdated='" . date('Y-m-d H:i:s'). "' WHERE VideoName = '" . $_POST['VideoName'] . "'";
    $result = mysql_query ( $query, $dbConn );
//echo("QUERY=" . $query);  echo("<br>records=" . mysql_affected_rows());
  if (mysql_affected_rows()==0) {
	    $query = "INSERT INTO Videos (VideoName, VideoDescription, LastUpdated) VALUES ('" . $_POST['VideoName'] . "', '" . $_POST['VideoDescription'] . ", '" . date('Y-m-d H:i:s') . "')";   
        $result = mysql_query ( $query, $dbConn );
	    }
    }
    	
  if(isset($_POST['DeleteVideo'])) {
    // Delete the Video...
	$query = "DELETE FROM Videos WHERE VideoName = '" . $_POST['VideoName'] . "'"; 	
    $dbResID = mysql_query ( $query, $dbConn );
    }	

  mysql_close( $dbConn );		

  // After update or delete is completed, go back to ADMIN page...
	
  header("Location: VideoADMIN.php");
	
?>
<html>
</html>

Take the above code and create your ADMIN page for the videos. Add in all the other fields I left out. Once it is working, then you can make the same two pages for the Playlists. I will send you some code to create the playlists. Right now, you just need the select parts…

Good luck…

Thank you Ernie. I am working on it, and I will let you know how it goes. Once again, thank you so much for your collaboration.

No problem, glad I could help… These routines that you are using are useful in a large number of other uses. That is why I have put so much time into these posts. Perhaps others my see them and use them somehow.

Now, remember that the dropdown lists can not hold a lot. If you end up with, let’s say 1000 videos, you will need to limit this to, say 30 or so and use two buttons to move back and forth thru the list. Also, the “trick” of loading all the data into the the actual dropdown as values will not work if there is a LOT of data. In this case, you load the entire list for the dropdown into an array[][] (multideminsional) and pull it out as needed based on the ID. Store just the ID for the value. Hope that made sense. It will later on.

In the next step we will create the same page as we just did with the videos listed. (You can just copy the video one. Then add a section list on the right with the playlist items. The playlist will be created like $Playlist=“playlist { blah blah " . $PlaylistName . " thumbnail = " . $PlaylistThumbnail . " etc. etc. etc…”; The data will be pulled from the array of data pulled from the video info.

First, get your video editor working. It doesn’t have to look pretty at this point, just functional. I am sure it will be tricky, but, you can do it. Good luck with it… I will be looking for your results…

OK. So far I am having issues as the database is not being updated.

I see you use a Session variable, but is never defined. and You also use a variable $dbResID = mysql_query ($query);, but again it is not declared.

One more thing, I thought we were creating an upload fileld, and the actually video file name would be pulled form the video file itself. Is that something we will be adding later?

So far the videoAdmin.php works fine as the values are loaded from the DB, and then transfered to the two form field text boxes.

The issue is with videoAdminUPDATE.php page. Everything seems to be OK, but I don’t know why is not working.

I simplified the QUERIES a bit by creating short Post variables names. The issue doesn’t lie here since the result was the same using the code as you provided. I like use short var names for query simplicity.

Also I added the mysql_error(); after the queries so I could see any errors thrown by the DB. Right now no errors are thrown.

I also added a new time variable b[/b] just to play with it. I have never use date or time in a project before, and since you introduced it here, I went along. Note that I added lastUpdated and the new timeUpdated as date and time db fields respectively. In one of my submission tries, dates were populated on all the empty date fields in the database. Time doesn’t seem to be working though.

Here’s the videoAdmin.php form page:
[php]

video update <?PHP $dbConn =include('connect.php'); //echo $dbConn; ?>

VIDEO EDITOR

Select Video Name: <?php // connect to your database, get data about your video list... //$dbConn = mysql_connect( $hostname, $username, $password); //@mysql_select_db($dbname); $query="SELECT * FROM videos"; $results = mysql_query($query) or mysql_error();
// loop through the results, creating an option list, I am just using Name and Description for this test...
while( $row = mysql_fetch_row($results) ) {

print “<OPTION VALUE=’” . $row[1] . “|” . $row[3] . “’” . “>” . $row[1] . “\n”; //NOTE: row(1) is videoname row(3) is descriptions field
}
print “<OPTION VALUE=“Enter a NEW VIDEO NAME here…|VIDEO DESCRIPTION goes here…”>Add New Video!\n”;
// mysql_close($dbConn);
?>

ALTER/UPDATE fields below...


 <tr> 
    <td>Video Name: </td>
    <td colspan="2"><input id='videoName' name='videoName' type='text' VALUE='' size='70'></td>
</tr>

<tr>	
	<td>Video Description:</td>
    <td colspan="2"><input id='videoDescription' name='videoDescription' type='text' VALUE='' size='70'></td>
 </tr>
 
[/php]

AND Here’s videoAdminUPDATE.php
[php]<?PHP
session_start();

//print_r($_POST);
//die();
// Set up database connection…
include(‘connect.php’);

//CRATE SHORT VARIABLE NAMES
$updateVideo = isset($_POST[‘updateVideo’]);
$deleteVideo = isset($_POST[‘deleteVideo’]);
$videoName = mysql_real_escape_string($_POST[‘videoName’]);
$videoDescription = mysql_real_escape_string($_POST[‘videoDescription’]);
//

// Handle Video Updates…
if($updateVideo) {
// Update the Video’s data, if it does not exist then insert new version…
$query = “UPDATE videos SET videoName=’$videoName’, videoDescription=’$videoDescription’, lastUpdated=’” . date(‘Y-m-d H:i:s’). “’ WHERE videoName = ‘$videoName’”;
//**************
$query = “UPDATE videos SET videoName=’$videoName’, videoDescription=’$videoDescription’, lastUpdated=’” . date(‘Y-m-d H:i:s’). “’ WHERE videoName = ‘$videoName’”;
//**************
$result = mysql_query ($query) or mysql_error();

//echo(“QUERY=” . $query); echo(“
records=” . mysql_affected_rows());
if (mysql_affected_rows()==0) {
$query = “INSERT INTO videos SET videoName =’$videoName’, videoDescription = ‘$videoDescription’, lastUpdated= '” . date(‘Y-m-d H:i:s’) . “’,
timeUpdated) = '” . date(‘g:i:s’) . “’”;

   $result = mysql_query($query) or mysql_error();
   }
}

if($deleteVideo) {
// Delete the Video…
$query = "DELETE FROM videos WHERE videoName = ‘$videoName’ ";
//$dbResID = mysql_query ($query);
}

//mysql_close($dbConn);
// After update or delete is completed, go back to ADMIN page…
//header(“Location:videoAdmin.php”);

?>

[/php]

Oh, sorry sorry, I grabbed a lot of code from several sources.

The $dbResID = mysql_query should be $dbConn=… Sorry for that mix up.

As far as the video name being pulled from the actual video, that was something I thought we could
add later on. Building the playlist would be more important. As far as reading data from inside the
video file, this link is a good resource for video info, but, FLV’s are used similar to AVI’s or MPG’s.
http://getid3.sourceforge.net/ It’s just FYI…
A sample of it’s use is on this page, scroll down a bit…
http://stackoverflow.com/questions/4021091/getting-flv-duration-with-php
This link tells about converting videos to the FLV format. You would use programming to call out to a command line that would do the conversion…
http://worldtv.com/blog/guides_tutorials/flv_converter.php
And, this link is a good one, it shows how to upload a MPG, convert it to FLV and move it to the video folder all written in PHP. Therefore, you would use this in the VideoUPLOAD.php module which we have NOT talked about as yet…
http://www.dreamincode.net/forums/topic/108830-upload-video-convert-it-to-flv-and-then-move-the-file-to-a-folder/
***Lastly, here is a link to a FULL decode of all the FLV metadata. Metadata is an array of info that is stored inside a file. Most files of ANY type have them. Such as MP3 which contains length of song, artist, owner, format, etc… FLV have a lot of info such as CODEC’s used and other info. This routine decodes a FLV file and then, you can use the info as you need it. It is a long and “busy” piece of code, but can be made into a module to be used in your routines where needed.
http://www.daniweb.com/web-development/php/threads/279509

Soooo, that about covers all needed info on FLV files and manipulating them. I would add these much later after your manual versions are working…
Hope that helps, Ernie…

Sponsor our Newsletter | Privacy Policy | Terms of Service