3

What's the best way to achieve this: I have local videos on my server, but if I use the WP add media button I just get a link to a video, rather than it embedded. Are there any good plugins which will let me embed local video? Everything seems to support video sharing from Google, YouTube, Vimeo etc.

2

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="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="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 "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

  • Don't forget <?php endif; ?> :) – Jared Jan 30 '12 at 23:12
0

It probably depends what format your videos are in.

For most cases, I'd recommend Viper's Video Quicktags. It includes a flash player which will wrap around .flv videos and quicktag buttons on the editor for most video sharing services.

If you're only dealing with local video, something like JW Player might be better. The JW Player (I believe) is only free for non-commercial projects, however; double-check the license before using it to be sure it works for you.

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