1

i have wordpress installed v4.6 , when i upload videos in media manager it cant generate thumbnails for video, am uploading mp4 videos.

so any idea how to add/configure ffmpeg library for wordpress.

on my Debian 8 server have ffmpeg installed in

/usr/bin/ffmpeg 

also which wordpress file is responsible for file uploading so that i may make changes to it. thanks

1 Answer 1

1

You can output them on the front end using custom fields like this:

printf( '<a href="%s"><img src="%s" /></a>', get_post_meta( get_the_id(),'video_url', true ), the_post_thumbnail_url() );

Or this if you want to use a different image for your video thumbnail

printf( '<a href="%s"><img src="%s" /></a>', get_post_meta( get_the_id(),'video_url', true ), get_post_meta( get_the_id(),'video_img', true ) );
2
  • i cant understated !!
    – user889030
    Mar 5, 2017 at 16:39
  • Thus relates to the output of the featured image in replace of the video thumbnail. Add the video URL to the custom field named video_url and it will link the post thumbnail to your video which you can display anywhere. Otherwise use a variable equal to another custom field if you want to use a different image as your video thumbnail. Assumes usage on the front end only, not in the Media Library.
    – Dev
    Mar 6, 2017 at 2:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.