Results 1 to 10 of 55

Thread: Hardcoded video watermark mod

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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!

  2. #2
    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.

  3. #3
    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);
                } 

  4. #4
    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

  5. #5
    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?

  6. #6
    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'); 

  7. #7
    Join Date
    Apr 2010
    Posts
    88

    Default

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

  8. #8
    Join Date
    Sep 2007
    Posts
    906

    Default

    Look like this method won't work with current version of mencoder.

    Check

    http://forums.buyscripts.in/frequent...watermark.html
    vShare Hosting, vShare Installation, Server Setup, Lighttpd streaming, vShare Templates
    [email protected]

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
  •