Using the default $video->url path (which is encoded) for the divx and swf flash theme templates don't work, using urldecode($video->url) in the divx template works fine but I have to hack your module to update the swf() call.

Comments

robinmofo’s picture

OK... I've been going crazy trying to get video to work with Zencoder and Amazon S3... from setting the API keys manually to the drupal_variable table to permissions on S3.

NOW.. I've finally gotten my video's to play, problem is that I had to hack a little to get it done.

For instance.. for the theme_video_flv() I changed $themed_output to an array..
$themed_output = array($video->url, $options);
This partly enabled me to debug what was being passed to flowplayer.

Then in the theme template "video-play.tpl.php" I make the swf(); call .. but! that's not before I've rawurldecode() the whole url ... and then REencoded the query string ONLY!

$href = rawurldecode($themed_output[0]);
print "link: ".$href;
print swf('http://familysite.s3.amazonaws.com/sites/default/files/videos/usertest.a...'.rawurlencode('AKLQ&Expires=1281462574&Signature=BMy1VV4qpQGhtzgpTLWBkc%3D'), $themed_output[1] );

This seems to stop the issues I've been having with a 404 for video content in webkit. (I thought it was a crossdomain issue and even created a quick n dirty php proxy for video.. but same error)

This is for my own use, so I don't mind hacking today... but I have to ask everyone else's experience getting video to work with amazon s3 ?

hypertext200’s picture

Status: Active » Closed (fixed)

Are you using Zencoder? instead of using SWFTools module try FlowPlayer API module, I tested on it in my local and it worked. The URL is encoded due to fix the 404 issue.

If you have 404 issues try urlencode() or try FlowPlayer API as I mentioned earlier.

robinmofo’s picture

Hi,

Many thanks for your reply. I switched to Flowplayer yesterday because I dont like SWFtools.. however as I was still using SWF Tools, the Flowplayer API module is not compatible when SWF Tools module has Flowplayer loaded! (conflicting folder names!)
I've reverted my code to your original and it works fine now Flowplayer is working correctly.
- A little hint for anyone having problems with video playback is to check the HTML to see how it is embedding (mine was trying to load quicktime for AVI's.. without quicktime plugin, the embed will just stay blank with a webkit error "unmatched tag")

I really like this module, I recently did a similar bespoke module set in Drupal (transcoder local ffmpeg w/h264, ftp and thumbnail generator/selector) ... I'm very impressed with your integration with Drupal.. (how long did the development take?) although I had a little trouble setting up amazon s3 and zencoder.

Although my video succesfully uploads, transcodes and transfers to the s3 CDN, I'm not seeing any thumbnails... they exist in the CDN bucket, but the edit node form isn't showing any thumbs at all (not even the default - which I've set up).

Is there a Zencoder admin settings page I've missed? you set a lot of variables which I cannot access and I had to set mine manually

zencoder.inc
line 70
$notify_email = variable_get('zc_notify_email', 'heshanmw@gmail.com'); // possibly use the default admin account email as default?

line 25
$this->access_key = variable_get('zencoder_api_key', ''); // I did of course enter this into the database rather than update the file...

line 40
$filetype = variable_get('video_zencoder_ext', 'flv'); // I wanted mp4, couldnt find the option anywhere in sites/settings/video/%

If you need any help writing documents, checking for things (such as the 3 above lines) or even adding code, please let me know.

hypertext200’s picture

When you go to select transcoder you can see the Zencoder settings, there you can change all the settings.

Please check the thumbnail directory setup in your local and did you check the create thumbnail automatically check box when you create content type?.

Once you upload video you should be able to see the default thumb, then once it converted form the Zencoder you have to edit the node to download original thumbanils from the S3.

Please check the watchdog notices and make sure you have write permission to your files directory.

robinmofo’s picture

OK, I finally found out the problem, it exists within the DEV version too.
Within includes/transcoder.inc; there are two bugs:

Line 74: Remove the call by reference to form_state
FROM
return $this->transcoder->admin_settings_validate($form, &$form_state);
TO
return $this->transcoder->admin_settings_validate($form, $form_state);

And Line 85: Move the array_merge() inside the loop
FROM
foreach($modules as $module) {
$mobule_files = array();
$module_path = drupal_get_path('module', $module) .'/transcoders';
$mobule_files = file_scan_directory($module_path, '^.*\.inc$');
}
$files = array_merge($files, $mobule_files);
TO
foreach($modules as $module) {
$mobule_files = array();
$module_path = drupal_get_path('module', $module) .'/transcoders';
$mobule_files = file_scan_directory($module_path, '^.*\.inc$');
$files = array_merge($files, $mobule_files);
}

The second bug fix, shows the disappearing Zencoder Radio on the admin/settings/video/transcoder page. And also ANY other transcoder in the plugin folder.

I'll submit a patch as soon as I work out how! (currently choosing an svn client)

robinmofo’s picture

Status: Closed (fixed) » Needs review

fixed in latest patch... not sure why drupal didnt auto close ? :(

hypertext200’s picture

Status: Needs review » Closed (fixed)