Author Topic: mass import of movies  (Read 1435 times)

ozarkfisherman

  • Newbie
  • *
  • Posts: 18
mass import of movies
« on: August 20, 2007, 10:53:28 AM »
Hello All,

I have about 400 movies I need to get added to the DB.

What I am looking for is a hack that will allow me to do one or both of two things.

#1 Allow insertion into db and convert to flv of videos stored on same server
in wmv,mpeg, avi, etc... format.

#2 Allow MASS INSERTION/CONVERSION either using the current upload from pc
and or from server or URL.

If anyone has anything like this or could point me in the direction to look it would be appreciated.

Thanks,
Chris
http://www.MyViralTv.com

ignasi

  • Newbie
  • *
  • Posts: 1
Re: mass import of movies
« Reply #1 on: August 21, 2007, 02:21:04 PM »
Hi there,
Did you find a solution for the mass import of  videos ?
Thanks in advance.

yiannos

  • Newbie
  • *
  • Posts: 2
Re: mass import of movies
« Reply #2 on: August 22, 2007, 04:58:46 AM »
This would be nice. I have seen gallery scripts where the user may upload a zipfile with all the movies inside or select a local dir from the file system where the movies have been mass-uploaded via ftp earlier.

ozarkfisherman

  • Newbie
  • *
  • Posts: 18
Re: mass import of movies
« Reply #3 on: August 22, 2007, 12:59:10 PM »
I've found a solution that will work for my direct needs and could
probably be used for yours as well.

For the first part I have a dedicated server and the movies I want imported and
converted are already there.  I've basically just called the script as a background service
and may I mention "NICE" is a good way to launch it...

The script creates a table on your db named mvids and then reads the directory with the movies
you want to convert and then inserts the filenames into the table.

It then queries the table and through a "while" statement calls the appropriate
files within PHP motion to "upload" and convert and enter into your db.

There is one problem here tho.. With 400 movies with no descriptions or tags you
are creating a nightmare. That's a problem I'll need to workout. Maybe add a tool
to the admin section to go through and edit the db for files with that show awaiting_edit
or something like that.


I've tried the script on my linux box at home and it appears to work. Once I get the description part worked out I'll post it up here.


Mass Import from PC....
If you look through the code the Uber Upload script is setup to do this.. Just need
to create the forms to make it work and maybe change a setting or 2. When converter.php is called it searches the db
for any entries that show "pending_conversion"
$sql = "SELECT * FROM videos where approved ='pending_conversion'";

So multiples should not be a problem. I'm going to play with this part later today.

« Last Edit: August 22, 2007, 01:05:28 PM by ozarkfisherman »

cyberdog

  • Newbie
  • *
  • Posts: 23
Re: mass import of movies
« Reply #4 on: August 25, 2007, 06:44:43 AM »
i hope we can have something like this working soon. :D

ozarkfisherman

  • Newbie
  • *
  • Posts: 18
Re: mass import of movies
« Reply #5 on: August 25, 2007, 10:33:31 AM »
Hey,
Sorry been away for a couple of days.

I'll try to get this and the youtube upload completed over the next couple of days.

yiannos

  • Newbie
  • *
  • Posts: 2
Re: mass import of movies
« Reply #6 on: August 28, 2007, 01:55:49 AM »
Hey,
Sorry been away for a couple of days.

I'll try to get this and the youtube upload completed over the next couple of days.

Welcome back! We are waiting anxiously for your scripts.

You re the man!  :)

cyberdog

  • Newbie
  • *
  • Posts: 23
Re: mass import of movies
« Reply #7 on: August 30, 2007, 05:34:10 AM »
any updates on this?

murali

  • Guest
Re: mass import of movies
« Reply #8 on: October 08, 2007, 01:26:40 AM »
There is one problem here tho.. With 400 movies with no descriptions or tags you
are creating a nightmare. That's a problem I'll need to workout. Maybe add a tool
to the admin section to go through and edit the db for files with that show awaiting_edit
or something like that.

Not sure whether you had the above issue resolved.

There are two options here without having to build admin interfaces.
Recommended only if you are comfortable dealing with databases.

Specify all the following details in an excel spreadsheet or CSV file.
1) Use mySQL LOAD utility to import this into the videos table. I can provide the command for doing this.

2)I have a script which generates INSERT SQLs by reading a CSV file.

`title` text,
  `description`
  `tags`
  `channel`   
  `location_recorded`
  `video_length`  (hh:mm:ss)
  `allow_comments` (yes/no)
  `allow_embedding` (yes/no)
  `allow_ratings`  (yes/no)
  `public_private` (public/private)
  `indexer`  (This is auto generated when the video details are inserted)
  `approved` (yes/no)
  `user_id`  (userid to be assigned to)
  `featured` (yes/no)

If you already have them all inserted, you may need to generate UPDATE SQLs using the indexer column values (video id).