Find Videos Inside a Post

This is the statement I am currently using to extract YouTube URLs from a post: preg_match(‘|http://www.youtube.com/watch\?v=([a-zA-Z0-9\-\_]+)|’, $post->post_content, $matches); $matches[1] contains the ID of the first video. This may not cover all the YouTube URL formats, but it should give you a start.

mp4 video preview

You can manually add a thumbnail with the shortcode by making use of the poster attribute. If you want to do it automatically, then you have to implement FFMPEG or LIBAV first, meaning they would have to be available on your server. Afterwards you could hook into wp_generate_attachment_metadata and automate process – I have given … Read more

Hide video & make a clickable play button icon on header

You can do by that way. <div id=”thevideo” style=”display:none; padding: 0px;”> <center> <video onclick=”this.play();” preload=”auto” width=”600″ height=”370″> <source src=”http://edigi.co/Impatto_Branding_Agency-Large.mp4″ type=”video/mp4″/> </video> </center> </div> <script> $(document).ready(function() { $(‘.custom-th’).click(function() { $(‘.custom-th’).fadeOut(‘fast’, function() { $(“#thevideo”).css(“display”,”block”); $(“video”).click(); }); }); }); </script>

Cant play videos

If you movies are stored in /wp-content/movies/ and the URLs are site.com/movies/movietitle.mp4 then the links are pointing to the wrong place. Change the URL’s to include the wp-content path eg site.com/wp-content/movies/movietitle.mp4 Separate to your question, you could look at having your page-movies.php template load the links into a video element using javascript.

Problem with video url from ad manager

WordPress supports the following video file types: .mp4, .m4v (MPEG-4), .mov (QuickTime), .wmv (Windows Media Video), .avi, .mpg, .ogv (Ogg), .3gp (3GPP), and .3g2 (3GPP2) From the “Uploading Files” Codex. If it’s not in the list, you’ll have to either add support or find a way to insert it manually which is what it sounds … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)