Results 1 to 10 of 20

Thread: Runtimes on videos show 1:00

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Posts
    216

    Default

    Similar fix need to be done also for upload_remote.php ;)

  2. #2
    Join Date
    Sep 2010
    Location
    Pokhara Nepal
    Posts
    49

    Default

    Quote Originally Posted by ramius View Post
    Similar fix need to be done also for upload_remote.php ;)
    yah you are right, but how to change? can you please help?
    Nepal's Largest video community portal. share wisely at WWW.CLONEVIDEOS.COM

  3. #3
    Join Date
    Sep 2010
    Posts
    20

    Default

    Quote Originally Posted by clonevideos View Post
    yah you are right, but how to change? can you please help?

    try this ( just tested for youtube)

    open include/class.upload_remote.php

    Find :
    PHP Code:
     $youtube_xml $this->get_youtube_duration('http://www.youtube.com/api2_rest?method=youtube.videos.get_details&dev_id=rG48P7iz0eo&video_id=' $this->video_id);
            
    preg_match('/<length_seconds>(.*)<\/length_seconds>/i'$youtube_xml$duration);
            
            if (isset(
    $duration[1]))
            {
                
    $youtube_duration $duration[1];
                
    $youtube_video_time sec2hms($youtube_duration);
                
    $this->update_youtube_duration($youtube_video_time$youtube_duration);
            } 
    Replace it by :
    PHP Code:
       /* 
            $youtube_xml = $this->get_youtube_duration('http://www.youtube.com/api2_rest?method=youtube.videos.get_details&dev_id=rG48P7iz0eo&video_id=' . $this->video_id);
            preg_match('/<length_seconds>(.*)<\/length_seconds>/i', $youtube_xml, $duration);
            
            if (isset($duration[1]))
            {
                $youtube_duration = $duration[1];
                $youtube_video_time = sec2hms($youtube_duration);
                $this->update_youtube_duration($youtube_video_time, $youtube_duration);
            }
            */
            
    require 'Zend/Loader.php';
              
    Zend_Loader::loadClass('Zend_Gdata_YouTube');
            require 
    'class.bulk_import.php';
             
    $temp BulkImport::getYoutubeVideoInfo($video_id);
              
    $youtube_duration=$temp['video_duration'];
               
    $youtube_video_time=sec2hms($youtube_duration);
             if( 
    $youtube_duration )
               
    $this->update_youtube_duration($youtube_video_time$youtube_duration); 

  4. #4
    Join Date
    Jan 2008
    Posts
    216

    Default

    I was working on it but you were faster, your code is working fine.
    Thanks!

  5. #5
    Join Date
    Sep 2010
    Location
    Pokhara Nepal
    Posts
    49

    Default thank you for the great help

    Quote Originally Posted by tientuy View Post
    try this ( just tested for youtube)

    open include/class.upload_remote.php

    Find :
    PHP Code:
     $youtube_xml $this->get_youtube_duration('http://www.youtube.com/api2_rest?method=youtube.videos.get_details&dev_id=rG48P7iz0eo&video_id=' $this->video_id);
            
    preg_match('/<length_seconds>(.*)<\/length_seconds>/i'$youtube_xml$duration);
     
            if (isset(
    $duration[1]))
            {
                
    $youtube_duration $duration[1];
                
    $youtube_video_time sec2hms($youtube_duration);
                
    $this->update_youtube_duration($youtube_video_time$youtube_duration);
            } 
    Replace it by :
    PHP Code:
       /* 
            $youtube_xml = $this->get_youtube_duration('http://www.youtube.com/api2_rest?method=youtube.videos.get_details&dev_id=rG48P7iz0eo&video_id=' . $this->video_id);
            preg_match('/<length_seconds>(.*)<\/length_seconds>/i', $youtube_xml, $duration);
     
            if (isset($duration[1]))
            {
                $youtube_duration = $duration[1];
                $youtube_video_time = sec2hms($youtube_duration);
                $this->update_youtube_duration($youtube_video_time, $youtube_duration);
            }
            */
            
    require 'Zend/Loader.php';
              
    Zend_Loader::loadClass('Zend_Gdata_YouTube');
            require 
    'class.bulk_import.php';
             
    $temp BulkImport::getYoutubeVideoInfo($video_id);
              
    $youtube_duration=$temp['video_duration'];
               
    $youtube_video_time=sec2hms($youtube_duration);
             if( 
    $youtube_duration )
               
    $this->update_youtube_duration($youtube_video_time$youtube_duration); 
    the codes above works best. thank you for your hard work. Appriciated.
    Nepal's Largest video community portal. share wisely at WWW.CLONEVIDEOS.COM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •