I certainly haven’t moved on to other projects. This is what I spend most of my time on lately.
I’m sure the thumbnail and transcoding functions could be triggered at the end of the add_attachment process, but I find the idea a little frightening considering the size of the videos I usually work with. It would destroy my server if I automatically transcoded all of the videos I uploaded.
Are you trying to save a couple mouse clicks, or is there some reason I’m missing that you would need to do this?
Thread Starter
oudein
(@oudein)
Oh, I’m sorry, I certainly didn’t mean to imply anything… I must have misread or been thinking of another comment thread.
Anyway, I was thinking of posting videos directly. I am using Postie on a photo and video-based site in which single posts containing a single photo or video are consolidated into galleries using category archive pages. So, I was thinking of an automatic encoding (and thumbnail generation) solution for videos sent from say, an iPhone — generally short .mov clips. The idea is not to interact with the WordPress admin.
I haven’t read through the php files carefully yet to find the functions which would be used. My uninformed first thought is that it might not be that tricky, but could you perhaps point me to which functions would called?
I see. So you’d want to automatically generate a single thumbnail when any video attachment is created and associate the thumbnail with that attachment, probably through a post_meta value in the video attachment. You wouldn’t need to do any transcoding if all the videos will be sent from iPhones. The next step would be creating a new post and automatically inserting embed code into the post content, since WordPress can’t automatically create pages for video attachments like it does for photos. I think it could be done, with a bit of work, but it’s a pretty different program than mine. Probably the only bit you’d want is the “generate” section in the kg_call_ffmpeg.php file and the FMP_shortcode function that actually generates the embed code in the main plugin file.
Thread Starter
oudein
(@oudein)
Yeah, it would definitely be a divergence, but the post creation and embed code is done already — Postie creates the posts and the embed code is done in the category template. Why do you say that no transcoding would be necessary? From what I am seeing, the transcoded files are much lighter and more functional than the .mov files — particularly the ogg and m4v files.
Just based on the screenshots it looks like Postie is using old-fashioned QuickTime embedding, which is the sort of thing that drove me to writing my own plugin. There’s nothing more frustrating than embedded QuickTime. It slows your page down and looks bad. Without transcoding anything you can embed iPhone-generated videos in a Flash player on any non-iOS browser, or in an HTML5 <video> container (except in Firefox of course! That’s a reason you might want to do some transcoding) and the user experience is significantly better. I guess you could customize the video template in Postie to handle that, but I’m not sure exactly how it would work.
Thread Starter
oudein
(@oudein)
Hm, I just lost this post here. Reposting.
Yeah, I don’t use the Postie templates. I just use the posts and associated attachment urls and postmeta, so all the heavy lifting is done by the templates. The thing is that in my experience iPhone videos come in sideways and weirdly stretched before transcoding. More importantly, though — as you say — it isn’t cross-browser compatible.