take the time off video thumb

How do I take the length of video off the front of the video thumbnail. For some reason it always says 00:00

Quote · 11 Oct 2013

it shows 00:00:00 till the video is played completely through - I went in to my videos and just started each one and then drug the slider all the way to the end.

caredesign.net
Quote · 11 Oct 2013

that's a lot of videos

Quote · 11 Oct 2013

Yes, I guess if you have a lot of members uploading videos you need another solution.  My guess is the video uploader is not checking for the length of the video; ffmpeg knows but there may not be a way to pass that info back to the video module.

Geeks, making the world a better place
Quote · 11 Oct 2013

i have over 165 vdeos - and it sucked having to do this with all of them. A better way is definitely needed cause as it is now, a user may think that a video is not actually present or messed up showing the 00:00:00. I have had people ask me about this on our site.

caredesign.net
Quote · 11 Oct 2013

search.css around line 90 (firebug is awesome)

.bx_videos_search_size {
    position: absolute;
    right: 5px;
    bottom: 5px;
    padding: 0px 3px;
    background-color: rgb(0, 0, 0);
    opacity: 0.6;
    line-height: 14px;
    font-weight: bold;
    font-size: 11px;
    color: rgb(255, 255, 255);
    display: none;
}

add section in red and dont forget to clear your cache

caredesign.net
Quote · 11 Oct 2013

A quick search returned this:

ffmpeg-php is an extension for PHP that adds an easy to use, object-oriented API for accessing and retrieving information from video and audio files. It has methods for returning frames from movie files as images that can be manipulated using PHP's image functions. This works well for automatically creating thumbnail images from movies. ffmpeg-php is also useful for reporting the duration and bitrate of audio files (mp3, wma...). ffmpeg-php can access many of the video formats supported by ffmpeg (mov, avi, mpg, wmv...)

If one can not add extensions due to not having full access to the server, then there is a php class to handle this:

getID3 supports video formats. See: http://getid3.sourceforge.net/

$getID3 = new getID3;
$file = $getID3->analyze($filename);
echo("Duration: ".$file['playtime_string'].
" / Dimensions: ".$file['video']['resolution_x']." wide by ".$file['video']['resolution_y']." tall".
" / Filesize: ".$file['filesize']." bytes<br />");

Now, the question is how do we incorporate this into our Dolphin sites?

 

Geeks, making the world a better place
Quote · 11 Oct 2013

 

search.css around line 90 (firebug is awesome)

.bx_videos_search_size {
    position: absolute;
    right: 5px;
    bottom: 5px;
    padding: 0px 3px;
    background-color: rgb(0, 0, 0);
    opacity: 0.6;
    line-height: 14px;
    font-weight: bold;
    font-size: 11px;
    color: rgb(255, 255, 255);
    display: none;
}

add section in red and dont forget to clear your cache

 Got It! Thanks!

Quote · 11 Oct 2013

function mbmGetFLVDuration($file){  
     
    /*
    * Determine video duration with ffmpeg  
    * ffmpeg should be installed on your server.
    */  
     
    //$time = 00:00:00.000 format  
    $time =  exec("ffmpeg -i ".$file." 2>&1 | grep "Duration" | cut -d ' ' -f 4 | sed s/,//");  
 
    $duration = explode(":",$time);  
    $duration_in_seconds = $duration[0]*3600 + $duration[1]*60+ round($duration[2]);  
     
    return $duration_in_seconds;  
     

$duration = mbmGetFLVDuration('/home/username/webdir/video/file.mov');

Geeks, making the world a better place
Quote · 11 Oct 2013

 

function mbmGetFLVDuration($file){  
     
    /*
    * Determine video duration with ffmpeg  
    * ffmpeg should be installed on your server.
    */  
     
    //$time = 00:00:00.000 format  
    $time =  exec("ffmpeg -i ".$file." 2>&1 | grep "Duration" | cut -d ' ' -f 4 | sed s/,//");  
 
    $duration = explode(":",$time);  
    $duration_in_seconds = $duration[0]*3600 + $duration[1]*60+ round($duration[2]);  
     
    return $duration_in_seconds;  
     

$duration = mbmGetFLVDuration('/home/username/webdir/video/file.mov');

 where exactly do I put this code? How so I make it work?

Quote · 12 Oct 2013

You don't put it anywhere at the moment.  I posted the code and the ffmpeg.php links to get the ball rolling on fixing this bug.  Boonex probably won't.

Geeks, making the world a better place
Quote · 12 Oct 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.