I'm trying to build a custom video uploader in SS3, I found this really cool tutorial but it is for SS2:
http://www.sslearn.info/sslearn/creating-flash-video-object-on-silverstripe/
Anyway, usually I am able to figure out the differences but not here, no way, no how. I get big old bomb:
[Warning] Missing argument 3 for FlashVideo::getThumbnail(), called in /Applications/MAMP/htdocs/SS310/framework/forms/UploadField.php on line 298 and defined
and the source is:
function generateCMSThumbnail() {
if(!file_exists($this->getCMSThumbFilePath())) {
$this->getThumbnail($this->stat("cms_thumbnail_width"), $this->stat("cms_thumbnail_height"), $this->getCMSThumbFilePath());
}
return "<div style=\"text-align:center;width: 100px;\"><a target=\"_blank\" href=\"$this->URL\" title=\"Download: $this->URL\"><img src=\"".$this->getCMSThumbFileName()."\" alt=\"".$this->getCMSThumbFileName()."\" /></a><br /><br /><a style=\"color: #0074C6;\"target=\"_blank\" href=\"$this->URL\" title=\"Download: $this->URL\">Download</a></div>";
}
function getThumbnail($width, $height, $filedest){
$videoFile = BASE_PATH."/".$this->Filename;
if(file_exists($videoFile)){
$execthumb = FFMPEG_BIN." -i ".$videoFile." -r 1 -s ".$width."x".$height." -f image2pipe -vframes 1 -ss 00:00:01 ".$filedest;
exec($execthumb);
}
}
This is a cool and useful bit of code if there is some SS genius that can figure it out. I don't know if my problem has to do with that I am running on MAMP and SS is having trouble with the assets path, or if it has to do with some SS3 diference I can't spot, or my mmpeg install is not right (but I can run from terminal), or perhaps my brain is just plain fried and I should give this all up, move to the mountains, herd goats and make cheese for a living. I'm leaning towards the goat thing. Have mercy on me pleeeeeeeeeease I've been at this all day :0(
Any ideas?