Results 1 to 10 of 14

Thread: Need Step By Step Tutorial For FFMPEG Hardcoded Watermark

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2010
    Posts
    22

    Smile

    The easy way for the functions_upload.php file would be if you were to upload the file as an attachment and I will upload the changes, or you can change the coding. Just find the following code below ( it is past the middle of the page )
    Thank you very much @zelda180

    background transparency must be the same size as the converted videos EG. 320x240 --> My Player setting is 600x500 --> But i have made a watermark 300x240 !

    Every thing went smooth, except i couldn't find the above said code in my functions_upload.php as I'm using vShare 2.7

    I have uploaded the required file for version 2.7.

    Thanks again.
    Last edited by vetty; 12-22-2010 at 07:45 PM.

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

    Default

    Just a couple of notes:

    Quote Originally Posted by zelda180
    Great your FFmpeg version is the same as mine so far we are on the right page. Lets start with the first question...
    ffmpeg and ffmpeg-php do not necessarily follow the same version numbers. Most hosts install ffmpeg from SVN which does not have a version number at all. Generally speaking, if your ffmpeg was built after 2008, it does not have vhook.

    Quote Originally Posted by zelda180
    I personal use menplayer because some say it gives better results.
    This used to be true for a few file types (specifically WMV and FLV files). However, this is no longer the case. I would argue that ffmpeg actually gives you better still thumbs than does mencoder. Today, the only real thing that mencoder has over ffmpeg is speed (mencoder can generate files faster than ffmpeg). But, with that speed comes considerable quality loss, which is why I prefer to use ffmpeg for all conversions altogether.
    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. #3
    Join Date
    May 2009
    Location
    On Earth
    Posts
    15

    Talking New functions_upload.php file to convert .flv files

    I would like to first thank bplex for your input, a lot of your previous posts has helped me out when I was having trouble with this script. So thanks again.

    As for the functions_upload.php file. I have uploaded the new file and I did test it and it converted the .flv file with the watermark with no issues. I have delete the code below

    **REMEMBER TO BACKUP YOUR FILES**

    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');
                }
                
                if ($file_extn == 'flv')
                {
                    if (get_config('enable_flvtool') == 1)
                    {
                        $cmd_flvtool = $config['flvtool'] . ' -U ' . $video_flv;
                        $tmp = exec($cmd_flvtool, $exec_result);
                        $log_text = "<h2>Running flvtool2: $cmd_flvtool</h2>";
                        write_log($log_text, $log_file_name, $debug, 'html');
                    }
                }
            }
            else
    This tells vshare to skip the encoding process for .flv files and only insert the meta data in to the .flv file. Now vShare wil convert all .flv files and add the watermark to all uploaded videos.

    Please let me know if this did or did not work. Thanks
    Last edited by zelda180; 12-23-2010 at 08:56 PM. Reason: Removed Attached File
    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

  4. #4
    Join Date
    Dec 2010
    Posts
    22

    Default

    Thank you zelda180,

    I have uploaded the file and made the necessary changes.

    PHP Code:
    /home/YOUR_USERNAME/public_html/include/settings/flvid.log 2>&"; 
    I don't have a file named flvid.log include settings.
    The only files inside are upload.php, video_conversion.php and watermark_flvideo.png
    I have changed YOUR_USERNAME in TWO instances of the code given (ie., cpanel username)

    After uploading a video, It said uploaded successfully.
    Previously it used to give a message as:



    This time it was different:- It gave as, pl refer image.

    Below is the result:




    Admin Panel:



    Edit Video:


    Uploaded videos was not published on the site.Where i went wrong ???
    Last edited by vetty; 12-22-2010 at 09:06 PM.

  5. #5
    Join Date
    May 2009
    Location
    On Earth
    Posts
    15

    Question Hmmmmm

    It sounds like there is something wrong with your video_conversion.php file. That is also why you recived the "uploaded successfully" message. Can you copy and past the /include/settings/video_conversion.php code or upload the file so that I can check.

    Also....

    1. What dose the status say in your Process Queue in your admin panel?

    2. Did you add the code below at the end of your video_conversion.php file?

    Code:
    $convert_flv = $cmd_all;

    3. The
    /include/settings/flvid.log file is a more detail conversion log that is created during the video conversion and for some reason it is not being created.


    This is my video_conversion.php file code

    Code:
    <?php
    
    //ffmpegflv - ffmpeg codec 11-2-10 converts to .flv With Watermark
    $cmd_ffmpegflv = "$config[ffmpeg] -i '$video_src' -s 320x240 -f flv -b 600k -acodec libfaac -ab 16k -vf 'movie=0:png:/home/YOUR CPANEL NAME/public_html/include/settings/watermark_flvideo.png [wm];[in][wm] overlay=1:0:0 [out]' $video_flv > /home/YOUR CPANEL NAME/public_html/include/settings/flvid.log 2>&1 ";
    
    $cmd_all = $cmd_ffmpegflv;
    
    $convert_3gp = $cmd_all;
    $convert_mp4 = $cmd_all;
    $convert_mov = $cmd_all;
    $convert_asf = $cmd_all;
    $convert_mpg = $cmd_all;
    $convert_avi = $cmd_all;
    $convert_mpeg = $cmd_all;
    $convert_wmv = $cmd_all;
    $convert_rm = $cmd_all;
    $convert_dat = $cmd_all;
    $convert_flv = $cmd_all;
    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

  6. #6
    Join Date
    Dec 2010
    Posts
    22

    Default

    Sure i will do it right away.

  7. #7
    Join Date
    Dec 2010
    Posts
    22

    Default

    This time i found a flvid.log file.
    I have attached the files, but without any modifications.
    I just downloaded it through ftp.

    Thank you.
    Last edited by vetty; 12-23-2010 at 03:46 AM.

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
  •