fileupload video

Status
Not open for further replies.

JBosir

Member
Hello.

A few months ago I finished the project. It was very complete. But the customer requests a modification (in downloading video).
possibly it is "custom work".
Is it possible to carry out?
Thank You.

The question:

when the image is downloaded, you made a change so he could see the downloaded image. it works perfectly.

It would be the same for video.

Now, when a record is added, you can choose the video but not see it.
When you modify a record, recorded video is displayed, but changing the video, still see the video before, and not the chosen video.
The modification is in the video download:

1. Display the downloaded video.
And improvements:
2. Review and to limit time.
3. Review and to limit size.
4. Ability to change the video format.

I appreciate your response.
 
So, you need it to display the newly selected video, when selecting a new one to upload. I think this can be done using HTML5.

When you say "review and limit" time and size, do you mean after upload, and have them fail validation if they exceed specific limits? I don't think there's any way we can do that on the browser side when selecting files.

And by "size", do you mean the dimensions of the video (width and height) rather than file size?

The answer to that is "yes, probably". We already ship the getId3 library ...

http://getid3.sourceforge.net/

... with Fabrik, and use it for a couple of things. This library does provide functions for getting the dimensions and duration of videos, which we could use for validation purposes ... but ... its not 100% reliable. So you might find that occasionally videos are rejected which do actually conform to the limits.

As for converting file formats, the only way I know of is using the Linux system command 'ffmpeg', which would be a bit of a hack, and would rely fairly heavily on your server configuration. It would need to have ffmpeg installed, and allow PHP to execute shell commands.

Anyway ... answer the couple of questions above, and I can give you an estimate of the cost.

-- hugh
 
1. you need it to display the newly selected video, When selecting a new one to upload
Yes. It is the same as is done with the images with the "Use wip" function.
2. The size limitation. It is available with the "Maximum File Size (kb) function. Right for me
3. The limitation of time. I get it with http://getid3.sourceforge.net/. But I get it once saved the record. In Form, plug-ins, do php, End of form submission (on AfterProcess). Php file, my example untreated:


PHP:
require_once('/var/www/vhosts/xxx/getid3.php');
defined('_JEXEC') or die('Restricted access');
$form = $this->data;
$video ='/var/www/vhosts/xxx/http/'. $form['mv_camp_video___video_raw'];
$cam_campaignId = $formModel->formData['mv_campaigns___campaignId'];
$getID3 = new getID3;
$ThisFileInfo = $getID3->analyze($video);
$tiempo_video = $ThisFileInfo['playtime_seconds'];   
$error=0;
if ($tiempo_video > 20){
    $texto = 'Tiempo del video sobrapasa del tama?o establecido.';
    $application = JFactory::getApplication();
    $application->enqueueMessage(JText::_($texto), 'error');
    $application->redirect($_SERVER['REQUEST_URI']);
}
The optimum would do a check before saving the record.

4. I am studying that once ffmpeg to save the record function, can convert the viedo.

So in beginning be modified to run option 1.

In option 3 if you think of a better idea, I thank you.
 
For 3 you could probably do the same check but onBeforeProcess, and checking the uploaded file in it's temporary location, prior to Fabrik moving it to the destination folder. That location will be in the $_FILES array. if you look at our code in the fileupload.php model, you'll find where we do our existing validations on that (in validate()).

I'll take a look at the HTML5 code needed to preview a video.

-- hugh
 
OK, I've got the basics working. Still some work to do on tidying it up, but at least I've got the selected video playing.

http://screencast.com/t/yBQmKfb4dqP

That took about an hour, probably another hour or two to get it fully functional. So probably 3 hours to get it to a point you could use it on a live site. Let me know if that sounds OK, and Skype me to talk about price.

Again, this is only going to work for simple, single uploads. Not AJAX, and not in repeat groups. At some point I could probably get it to work in repeats, but that's another few hours work.

-- hugh
 
Have you tried the most recent github code? I worked on it a little more before I went on vacation, and I think I committed the changes. I'm not atm my computer right now to check, but I'm fairly sure I committed all my changes before leaving.

Sent from my HTC One using Tapatalk
 
Oh, my bad. I don't tend to see PM's here, as I get so many from folk just trying to jump the support queue. That's why I said "Skype me to talk about price".

Catch me on Skype ...

-- hugh
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top