Plugin to embed local video into WordPress? [closed]

You can try this: Use JWPlayer or Flowplayer or whichever videoplayer you like. You can also use http://videojs.com/ which will give you the ability to automatically change from html5 to flash player and it’s free and even hosted by them.

Now, from their own example:

<video id="my_video_1" class="video-js vjs-default-skin" controls
preload="auto" width="640" height="264" poster="my_video_poster.png"
data-setup="{}">
<source src="https://wordpress.stackexchange.com/questions/40666/my_video.mp4" type="video/mp4">
</video>

you can covert it to this:

<?php if ( get_post_meta($post->ID, 'myvid', true) ) : ?>
<video id="my_video_1" class="video-js vjs-default-skin" controls
preload="auto" width="640" height="264" poster="my_video_poster.png"
data-setup="{}">
<source src="https://wordpress.stackexchange.com/questions/40666/path_to_videos_folder/<?php echo get_post_meta($post->ID,"myvid', true) ?>/my_video.mp4" type="video/mp4">
</video>

Now, you simply do this: always name your videos with the same name (in this case “https://wordpress.stackexchange.com/questions/40666/my_video.mp4”) and save to different folders. When you add a post, add a “myvid” custom field with the folder name as value (eg: 1, 2, myfolder, 001, whatever) and voila, your video will be placed in your post.

I use this approach a lot because it gives me the freedom to place video always in the right place so I call it directly from teh template and I simply forget.

If you need something faster and/or more automated, you may try http://flamine.com

EDIT: of course the same logic applies if yuo want to use JW or FlowPlayer or whatever

Leave a Comment