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
    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!

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

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

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

  5. #5
    Join Date
    Dec 2010
    Posts
    22

    Default

    Sure i will do it right away.

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

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

    Lightbulb You need to enable the Movie filter

    It looks like you need to enable the movie filter in your FFmpeg, that would require ROOT access to the server to recomply FFmpeg. If you are on a shared host you must ask your hosing company to enable the movie filter in your FFmpeg. If you have a VPS you can use Google to find how to enable the movie filter in FFmpeg. I have found a link below that may help you out.

    http://ffmpeg.arrozcru.org/forum/vie...0&p=4889#p4867

    This is how my FFmpeg is set up

    Code:
    enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libdc1394 --enable-libfaac --enable-libmp3lame --enable-libopenjpeg --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-zlib --enable-avfilter
      libavutil     50.32. 3 / 50.32. 3
      libavcore      0. 9. 1 /  0. 9. 1
      libavcodec    52.92. 0 / 52.92. 0
      libavformat   52.83. 0 / 52.83. 0
      libavdevice   52. 2. 2 / 52. 2. 2
      libavfilter    1.53. 0 /  1.53. 0
      libswscale     0.12. 0 /  0.12. 0
    [flv @ 0x10980470] Estimating duration from bitrate, this may be inaccurate
    If this sounds "Greek" to you, you are welcome to host your site at GIFTSnMORE.com (that's my hosting site). I have also uploaded the edited files for you to upload when the FFmpeg is ready.

    Don't forget to change "YOUR CPANEL NAME" to your user name.
    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

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
  •