Support » Plugin: WP Video Posts » [Plugin: WP Video Posts] video files are not uploded but thunbnails are created!

  • hi,

    i have a new created wp and this is the first plugin i use. when i upload a video it does not get stored! but the strange thing is that the thumbnail is created and stored! so i geuss the ffmpeg part is working well only the original video file is missing. when i manually upload the file to the right folder the player wors like a charm.

    is there any logfile i can look at or do you know of such problems.

    thx for this great plugin 😉

    best, mike.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author cmstactics


    Hi Mike,

    Sorry for the delay in responding to your issue. We do have some lines for debugging in the code that is currently commented out. If you are familiar with PHP you can look into the files and change the error logging file path to view it. The file with logging is titled wpvp-functions.php. Otherwise, we can look into your issue for you if you provided credentials. You can email me at to provide private information. At first, I would think it is a permissions issue but since you are successfully saving the splash image then it doesn’t seem like that is the issue. The other issue is that when the file is uploaded, the code renames it and removes the originally uploaded file as it is now in MP4 format.

    I’m having a very similar issue.
    I upload a video and only the thumbnail is created, the MP4 is not created. I followed the instructions here to install ffmpeg:
    I have checked the ffmpeg install and I’ve manually converted my video to mp4 and put that in the folder the webplayer is expecting it and it works. I have also confirmed i can upload videos as Media.

    My upload limits are 300M (post and max_upload_size).
    version of wordpress is 3.3.2
    I have control of the server so I can try anything you suggest and I am competent with PHP.

    I tried what you suggested by un-commenting

    return error_log( date ( ‘r -> ‘, time() ) . print_r($data,true) . “\n” , 3, “debug_encoder_new.log”);

    in wpvp-functions.php but nothing is generated.

    Thanks for any help:)

    after re-reading the FAQ, this part:

    What pre-requirements do I need to install this plugin?
    You must Install ffmpeg on your server and recompile PHP with ffmpeg-PHP.

    …the recompile PHP with ffmpeg-php part is probably the problem but I don’t think I know how to do that since I sudo apt-get installed php … if i figure that out before you reply and it solves my problem I’ll post it.

    I have it “working”, I needed to do three steps:

    1. get php5-ffmpeg support and restart apache
    >sudo apt-get install php5-ffmpeg
    >sudo /etc/init.d/apache2 restart

    2. my server did not have MP4Box so i had to install it (possibly add this to the plugin requirements??)
    > sudo apt-get install gpac

    3. I had to remove some switches from the ffmpeg command in wpvp-functions.php

    $extra = “-s ${width}x${height} -ar 44100 -b 384k -ac 2 “;

    $extra = “-ar 44100 -b:v 384k -ac 2 “;

    and convert:
    $extra .= “-acodec libfaac -vcodec libx264 -f mp4 -vtag avc1 -vpre normal -refs 1 -coder 1 -level 31 -threads 8 -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -flags +4mv -trellis 1 -cmp 256 -me_range 16 -sc_threshold 40 -i_qfactor 0.71 -bf 0 -g 250”;

    $extra .= “-threads 8 -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8”;

    I can now use the plugin to upload and view videos on my wordpress site; however, if anyone can explain to me what the ffmpeg switches I removed do I’d appreciate it a bunch. (I get the -s and -thread switch)

    Plugin Author AlexRayan


    Hi Craig_sorensen01,
    Glad you were able to sort it out.

    Here’s a quick guide on how to install ffmpeg on CentOS/RedHat/Fedora:

    1. First you would need to install the DAG RPM repositories which contains huge amount of rpm packages:

    For Linux 5 / x86_64 (please, Google commands for other versions of Linux):
    rpm -Uhv

    2. yum install ffmpeg ffmpeg-devel

    You could also choose to install ffmpeg-php. Ffmpeg-php is a very good extension and wrapper for PHP but this is not required for the plugin since we’re using a command line to call ffmpeg, so you wouldn’t need a php extension unless you want it for your own purposes.
    1. Make sure that ‘php-devel’ is installed on your machine by issuing:
    rpm -q php-devel
    2. If it’s not installed, you will need to install it:
    yum install php-devel
    3. Download the latest version of ffmpeg-php from here:
    4. Unpack it:
    bunzip2 -d ffmpeg-php-0.5.1.tbz2
    tar -xvf ffmpeg-php-0.5.1.tar
    5. Prepare for installation and install it:
    cd ffmpeg-php-0.5.1
    make install
    6. Open ‘php.ini’ and add a line ‘’.
    7. Restart apache and use phpinfo() to check if it’s installed correctly.

    Plugin Author AlexRayan


    Regarding MP4Box, it is not a requirement since the plugin can function without it, that’s why it’s not specified among requirements.

    Regarding the flags and commands that you removed, here’s an explanation of what they do:

    $extra = “-s ${width}x${height} -ar 44100 -b 384k -ac 2 “;

    -s sets the size of the encoded video (example, -s 320×240)

    $extra .= “-acodec libfaac -vcodec libx264 -f mp4 -vtag avc1 -vpre normal -refs 1 -coder 1 -level 31 -threads 8 -partitions parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -flags +4mv -trellis 1 -cmp 256 -me_range 16 -sc_threshold 40 -i_qfactor 0.71 -bf 0 -g 250”;

    -acodec sets the audio codec to ‘libfaac’ AAC Encoder for mp4
    -vcodec sets the video codec to ‘libx264’

    Both are the regular codecs to encode to mp4 and are present in a regular installation of ffmpeg. If you had to remove them, please, make sure your installation support these codecs.

    -f mp4 sets encode to mp4
    -me_range[:stream_specifier] (int)
    -vtag fourcc/tag
    Force video tag/fourcc. This is an alias for -tag:v

    Preset files are specified with the vpre, apre, spre, and fpre options. The fpre option takes the filename of the preset instead of a preset name as input and can be used for any kind of codec. For the vpre, apre, and spre options, the options specified in a preset file are applied to the currently selected codec of the same type as the preset option.

    -coder[:stream_specifier] (int)
    -level[:stream_specifier] (int)
    -threads (int) g_threads (Mapping from FFmpeg to libvpx options with conversion notes in parentheses.)
    -trellis[:stream_specifier] (int) rate-distortion optimal quantization
    -cmp[:stream_specifier] (int) full pel me compare function
    -me_range[:stream_specifier] (int) limit motion vectors range (1023 for DivX player)
    -sc_threshold[:stream_specifier] (int) scene change threshold
    -i_qfactor[:stream_specifier] (float) qp factor between P and I frames
    – bf forward predicted MVs of B-frames
    -g for streaming, motion estimation

    If some of the flags don’t work for you, chances are the ffmpeg installation is missing some components. Especially, if specifying audio and video codecs results in errors in the log. It means that the codecs are not included in the library and the installed version is a stripped out version of ffmpeg.

    Hope, this helps.

    Best regards,

    Plugin Author AlexRayan


    Also, if in doubt you could always check the manual to see what codecs are installed and supported by your ffmpeg installation.

    The version that is installed on our servers is usually FFmpeg version 0.6.5 with the following configuration:
    configuration: –prefix=/usr –enable-gpl –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libx264 –enable-version3 –enable-libfaac –enable-nonfree

    To check the codecs supported, type the following:
    ffmpeg -codecs | less
    Make sure libfaac and libx264 are among the codecs available for you.

    Best regards,

    Wow, Thanks Alex!

    with respect to my number one “1. get php5-ffmpeg support and restart apache” …. derp? It was end of day, I was tired … and must have been drunk by then …. don’t know why I was thinking I needed it for this plugin because I saw exec() was used to call ffmpeg.

    anyway, thanks for all the info! I appreciate it:)

    Plugin Author AlexRayan


    No problem, Craig! 🙂
    Email me if you need anything else

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Plugin: WP Video Posts] video files are not uploded but thunbnails are created!’ is closed to new replies.