Page 5 of 6 FirstFirst ... 3456 LastLast
Results 41 to 50 of 55

Thread: Hardcoded video watermark mod

  1. #41
    Join Date
    Apr 2010
    Posts
    88

    Default

    I got the code to work but its still no good because it only works with wmv files. Why does the script not convert mp4 into flv or maybe I just dont know how?

  2. #42
    Join Date
    Sep 2008
    Posts
    1,019

    Default

    By default, vShare will not reconvert a .flv file or a .mp4 (it doesn't reconvert .flv files because it's already in the proper format. The original reason why it doesn't reconvert .mp4 files is because the flash standard allows for playback of those files. However, this, in my opinion, is a mistake because the only version of MP4 that is compatible with flash is H.264 and not the entire MPEG-4 suite of encodings). You would have to modify vShare to have it reconvert all files if you want the hardcoded mod to work on those files.
    vShare Solutions
    Custom vShare Modules and Services

    Now, your visitors can watch videos on your site using their mobile or tablet device with the Mobility Mod for vShare 2.8!

  3. #43
    Join Date
    Apr 2010
    Posts
    88

    Default

    Hello bplex, so I was kind of guessing in the right direction as to what you said. I wouldn't know where to begin with that, would this be in the same file video_conversion.php and can you point me in the right direction?

  4. #44
    Join Date
    Sep 2008
    Posts
    1,019

    Default

    No. It would be in the functions_upload.php. You would have to modify it such that it converts all files and not just files other than .flv and .mp4.
    vShare Solutions
    Custom vShare Modules and Services

    Now, your visitors can watch videos on your site using their mobile or tablet device with the Mobility Mod for vShare 2.8!

  5. #45
    Join Date
    Apr 2010
    Posts
    88

    Default

    Thanks, I kinda laughed when opened that, like I might need neo to help me out with this one :) Thats some serious php coding, but I should be looking for .flv, upload, convert somewhere along those line in there im guessing.

  6. #46
    Join Date
    Apr 2010
    Posts
    88

    Default

    Here is a section of the code where I am guessing the modification needs to be done. I just want to make sure I am in the right place.

    I see the section that says:

    $outExtn = '.flv';
    $rand_flv_name = $rand_name . '.flv';

    if ($file_extn == 'mp4')
    {
    $rand_flv_name = $rand_name . '.mp4';
    $outExtn = '.mp4';
    }

    I am lost please help anyone.


    PHP Code:
       $log_text '<h1>STARTING VIDEO CONVERSION (process_queue.id = ' $vid ')</h1>';
        
    write_log($log_text$log_file_name$debug'html');
        
        
    $sql "SELECT * FROM
               `process_queue` AS `process_queue`,
               `users` AS `users` WHERE
                process_queue.id=
    $vid AND
                process_queue.user=users.user_name"
    ;
        
    $result mysql_query($sql) or mysql_die($sql);
        
    $download_info mysql_fetch_assoc($result);
        
    $video_file_name $download_info['file'];
        
    $re_process_vid $download_info['vid'];
        
        
    $status $download_info['status'];
        
        if (
    $status == 2)
        {
            
    $sql "UPDATE `process_queue` SET
                   `status`='4' WHERE
                   `id`='
    $vid'";
            
    mysql_query($sql) or mysql_die($sql);
        }
        else
        {
            
    $log_text '<h2>STOP: can only process when status = 2. Current status is: ' $status '</h2>';
            
    write_log($log_text$log_file_name$debug'html');
            exit();
        }
        
        
    $video_src VSHARE_DIR '/video/' $video_file_name;
        
        
    $log_text '<p>File: ' $video_src '</p>';
        
    write_log($log_text$log_file_name$debug'html');
        
        if (! 
    file_exists($video_src))
        {
            
    $log_text '<h2>ERROR: file not found - ' $video_src '</h2>';
            
    write_log($log_text$log_file_name$debug'html');
            
    $err 1;
        }
        else
        {
            
    $pos strrpos($video_file_name'.');
            
    $file_extn strtolower(substr($video_file_name$pos 1strlen($video_file_name) - $pos));
            
            
    $log_text '<p>$file_extn = ' $file_extn '</p>';
            
    write_log($log_text$log_file_name$debug'html');
            
            
    $seo_name seo_name($download_info['title']);
            
    $seo_name_org $seo_name;
            
    $i 1;
            
            while (
    check_field_exists($seo_name'video_seo_name''videos'))
            {
                
    $seo_name $seo_name_org '-' $i;
                
    $i ++;
            }
            
            if (
    $re_process_vid == 0)
            {
                
                
    $log_text '<p>$re_process_vid = ' $re_process_vid '</p>';
                
    write_log($log_text$log_file_name$debug'html');
                
                
    $rand1 $_SERVER['REQUEST_TIME'];
                
    $rand2 mt_rand();
                
    $rand_name $rand1 $rand2;
                
                
    $outExtn '.flv';
                
    $rand_flv_name $rand_name '.flv';
                
                if (
    $file_extn == 'mp4')
                {
                    
    $rand_flv_name $rand_name '.mp4';
                    
    $outExtn '.mp4';
                }
                
                while (
    check_field_exists($rand_flv_name'video_flv_name''videos') == 1)
                {
                    
    $rand1 time();
                    
    $rand2 mt_rand();
                    
    $rand_name $rand1 $rand2;
                    
    $rand_flv_name $rand_name $outExtn;
                }
                
                
    $log_text '<p>$rand_flv_name = ' $rand_flv_name '</p>';
                
    write_log($log_text$log_file_name$debug'html');
                
                
    $video_folder floor($convert_vid 1000) + 1;
                
    $video_folder md5($video_folder);
                
    $video_folder substr($video_folder110);
                
    $video_folder trim($video_folder);
                
    $video_folder .= '/';
                
                if (! 
    is_dir(VSHARE_DIR '/flvideo/' $video_folder))
                {
                    
    mkdir(VSHARE_DIR '/flvideo/' $video_folder);
                } 

  7. #47
    Join Date
    May 2009
    Location
    On Earth
    Posts
    15

    Talking Force vShare to convert .flv files

    It took me a long time to figure this out but on vShare 2.7 you would need to edit /include/functions_upload.php. Find and delete the code below ( it is past the middle of the file )

    Code:
            if ($file_extn == 'flv')
            {
                $log_text = "<h2>MOVING UPLOADED FLV: $video_src => $video_flv</h2>";
                write_log($log_text, $log_file_name, $debug, 'html');
                
                if (! copy($video_src, $video_flv))
                {
                    $log_text = 'ERROR: moving uploaded file failed';
                    write_log($log_text, $log_file_name, $debug, 'html');
                }
            }
            else
    or just change the 'flv' extention to something like 'txt' . It should look like this

    Code:
    if ($file_extn == 'txt')
    I hope this helps.

    ~zelda180~
    www.80TOONS.com
    I have a heavily modified version of vShare 2.8 beta WITH my own mobile addon at 80TOONS.com . Please let me know what you think.

    HOSTING WITH FULL vShare SUPPORT, my mobile addon support for vShare 2.8 & FFmpeg permanent video water marking at GIFTSnMORE.com . Thanks

  8. #48
    Join Date
    Apr 2010
    Posts
    88

    Default

    Quote Originally Posted by zelda180 View Post
    It took me a long time to figure this out but on vShare 2.7 you would need to edit /include/functions_upload.php. Find and delete the code below ( it is past the middle of the file )

    Code:
            if ($file_extn == 'flv')
            {
                $log_text = "<h2>MOVING UPLOADED FLV: $video_src => $video_flv</h2>";
                write_log($log_text, $log_file_name, $debug, 'html');
                
                if (! copy($video_src, $video_flv))
                {
                    $log_text = 'ERROR: moving uploaded file failed';
                    write_log($log_text, $log_file_name, $debug, 'html');
                }
            }
            else
    or just change the 'flv' extention to something like 'txt' . It should look like this

    Code:
    if ($file_extn == 'txt')
    I hope this helps.

    ~~
    www.80TOONS.com

    Hey zelda180 did this actually work for you?

  9. #49
    Join Date
    Apr 2010
    Posts
    88

    Default

    what about this piece right above that one?
    PHP Code:
    if ($file_extn == 'flv' || $file_extn == 'mp4')
            {
                
    $log_text "<h2>MOVING UPLOADED FLV: $video_src => $video_flv</h2>";
                
    write_log($log_text$log_file_name$debug'html');
                
                if (! 
    copy($video_src$video_flv))
                {
                    
    $log_text 'ERROR: moving uploaded file failed';
                    
    write_log($log_text$log_file_name$debug'html'); 

  10. #50
    Join Date
    Apr 2010
    Posts
    88

    Default

    How come no one else replied to this? It must not work.

Page 5 of 6 FirstFirst ... 3456 LastLast

Similar Threads

  1. Place watermark anywhere on video!
    By mersh in forum Template Modifications
    Replies: 2
    Last Post: 07-24-2008, 03:57 PM
  2. watermark
    By ostendo in forum Installation Support
    Replies: 3
    Last Post: 01-14-2008, 09:13 PM
  3. Watermark
    By Alexy in forum Feature Requests
    Replies: 12
    Last Post: 08-14-2007, 09:27 PM
  4. Watermark
    By admin in forum Frequently Asked Questions
    Replies: 7
    Last Post: 08-01-2007, 02:51 AM
  5. .Swf Or .Flv as A watermark
    By zeffer in forum Feature Requests
    Replies: 2
    Last Post: 06-03-2007, 10:11 PM

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
  •