If I use standalone Wijering player, I can set video preview image by flashvar "image". How can I do the same thing via swftools?
Cheers.
If I use standalone Wijering player, I can set video preview image by flashvar "image". How can I do the same thing via swftools?
Cheers.
Comments
Comment #1
ariana commentedI'd love to know this too.. right now I get a blank screen and have to right click and hit play to get the video to start!
Comment #2
bsuttis commentedProbably not the most elegant solution, but after looking through the wijering.module code, I found that the background image looked like it was only applying to mp3s, so I just duplicated lines 285-293 and changed the file extension to flv
Dropping my cached playlists and refreshing displayed the background image. I suppose a better way of going about this is providing a UI form option.
Comment #3
carldnelson commentedI tried this and it did not work. Did you add the duplicated code just below the code for the mp3's or somewhere else in the file? It seems really weird that there is no simple way to have a background image for the flv video file. The big black box just seems so ugly.
Comment #4
bsuttis commentedRight below, indeed.
Make sure you clear your cached playlists, that could be the issue.
Comment #5
dagomar commentedIf you use flash node, it is pretty simple. When you create the flashnode, put the flashvar in "advanced flash node options":
image=path/to/image
(note that it will automaticaly look in the folder "files", so if your image is in 'files/images/image.jpg' the flashvar is"
image=images/image.jpg)
Comment #6
WorldFallz commented+1 to this--- I can't get this working either and I've spent hours pouring over the posts and trying different things. Anyone spare the exact steps necessary to get this working-- it would be greatly appreciated.
Thanks.....
Comment #7
susata commentedJust wondering if anyone has figured out a solution to this problem. Last night, before I came across this thread, I posted a new support request for what could be the very same problem: http://drupal.org/node/216946 .
s.
Comment #8
yan commentedSame question here. I use
print swf($video_file['value'], array('width' => '350', 'height' => '280'));in my template file to show the video. The values for width and height work fine, but if I add an image path as suggested for mp3-files
print swf($video_file['value'], array('width' => '350', 'height' => '280', 'image' => 'image/path/to/file.jpg'));it is ignored. My html source code just shows the rest:
Is it still not possible to set the preview image with SWF Tools?
Comment #9
Stuart Greenfield commentedWhich Wijering player are you using?
Comment #10
yan commentedI'm not sure which version of the Wijering player it was, but I just installed the 4.1 version and updated the SWF Tools module to 2.2 and the problem is the same.
Comment #11
yan commentedSorry for bugging, but isn't this a quite common use for SWF Tools? The issue is more than a year old and there has really been no solution for this? I'm just wondering because other flashvars do work, why then doesn't the preview image?
Comment #12
Stuart Greenfield commentedIt might be common, but sometimes it takes time for the maintainers to answer all the queries :-) I only adopted SWF Tools recently, and the first priority had to be to get a working SWF Tools 6 out (which is done), and then to start working the issue queue. There are a lot of issues in the queue, and several are old. They are now in the process of being closed, and a lot were closed as part of the update to D6, but there are still more to do (this being one of them).
So, they will get addressed, but can't make any promises about when!
Comment #13
Stuart Greenfield commentedWith the swf filter it is very easy...
<swf file="video.flv" image="image.jpg">
With SWF Tools 5 you need to pass NULL if you are not providing any other parameters
With SWF Tools 6 you need to use the new array format, so you can just pass the relevant flashvar
Note - testing this syntax revealed an issue with SWF Tools 6 that was stopping flv files playing, so you need SWF Tools 6.x-1.3 or later.
--edit
Note - error in <6.x-1.3 only applies if you set the caching for files to "always" in the SWF Tools file handing options - if you don't set this then you won't be affected by this bug.
Comment #14
yan commentedThat works, thanks!
Know I'm wondering if I could use imagecache to adjust the image to the video size ...
Comment #15
dabro commentedThanks for the above bit of code, it helped me a lot. Here's how I made my preview image show up on the player. I created a filefield to upload the video file. The filefield is labeled field_media. That was working right off but no preview image with this code.
I created an image upload field labeled "field_media_image" and used the following code (thanks to Stuart). The "podcast_files" element of the array is the subdirectory of my files directory. It works, you can upload a preview image with the movie upload and it appears in the player.
BTW, this code goes in the node.tpl file for your movie nodes. I hope this can help somebody, YMMV, Dave
Comment #16
armourymedia commentedThanks, dabro and Stuart, for this very helpful bit of code. I've got a requirement to display video in-line with body field text so I'm using the input filter. I'm able to specify height and width, but the "image" variable doesn't work. Can anyone help with this? Is there documentation somewhere that outlines available variables for the input filter and the syntax to use? The handbook page only refers to adding filenames and it was only by chance that I found out that other variables are accepted through the input filter.
Comment #17
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #18
amariotti commentedI hate to open this up again, but this is still an issue. Why would the module bypass this variable? Having a standard image on the video for the user is very important in lots of cases. Anyone been able to get a workaround for Drupal 6?
Comment #20
jrust commentedJust a note that this is how to insert a background image in the D6 version using the input filter (note that bg-image.jpg should be in the same folder as video.flv):
[swf file="video.flv" flashvars="image=bg-image.jpg"]Comment #21
4v4l0n42 commentedAwesome, this worked perfectly! :D
Comment #22
webnation commentedThanks Dabro (and everyone) for this. It works brilliantly. But as I don't understand php, I don't know what code to use for an optional field.
I created an optional video field "field_video" and an optional video image field "field_video_image". I created a directory for the images "video_files" and used the following code in my node.tpl file for a certain content type:
print swf($node->field_video[0]['filepath'], array('flashvars' => array('image' => 'video_files/' . ($node->field_video_image[0]['filename']))))It works perfectly adding the preview image to the front of the video but if I don't upload a video to the page it creates the error message: "No player is configured to play a series mixed media files. Check the SWF Tools file handling settings on the configuration page." and adds the following in the body of the page "You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialize correctly."
How can I make it work only when I upload a video and not when I don't use those fields? I'd really appreciate any help on this. Thanks, Mike.
Comment #23
webnation commentedBy trial and error I've got it work with:
No idea how correct it is but it works.....
Comment #24
johnhanley commentedThanks to dabro for this post. Works like a charm and saved me some time.