diff options
62 files changed, 4283 insertions, 9544 deletions
@@ -1 +1,2 @@ +.cvsignore_1 .project diff --git a/FILE_TYPES.txt b/FILE_TYPES.txt deleted file mode 100644 index 1029d7a..0000000 --- a/FILE_TYPES.txt +++ /dev/null @@ -1,56 +0,0 @@ -$Id$ - -FILE TYPE INFORMATIONS --------------------------- - -See : http://video.heidisoft.com/features - - -Video.module for Drupal supports multiple video formats. - -.mov, .wmv, .asf, .rm, .3gp, .mp4, .swf, .dir, .dcr - These files type are supported out the box. - To play these file types you need to enter in the path to the file. - If your video is on the same webserver as drupal, you can use a path relative - to the drupal directory, like "downloads/video.mov". - If your video is on another server you can enter the URI to the video - like "http://www.example.com/videos/my-video.mov". - The .mp4 and .3gp extentions use the Quicktime player. - The .dir and .dcr extentions use the Director player. - - If you need to add additional object parameters to swf or dir videos you - can enable the "Allow adding of parameters to object HTML" option. Then - in the video creation page you will be able to specify the parameters. - -YouTube.com support - You can host videos on youtube.com and put them on your site. - To do this, after you upload the video on youtube.com enter - the video ID into the "Video File" field. If the URI youtube.com gives - you for the video is "http://www.youtube.com/watch.php?v=XM4QYXPf-s8" - you would enter "XM4QYXPf-s8". - -Google Video support - You can host videos on video.google.com and put them on your site. - To do this, after you upload the video on Google video enter get the - the embed code. In this code you will find an attribute like - src="http://video.google.com/googleplayer.swf?docId=-1591729516923874694" . - You will need the -1591729516923874694 like number just after docId= . - Then use "google:-1591729516923874694" as video file value. - -.flv - Video.module for drupal 4.7 now support Macromedia Flash FLV Videos - using FlowPlayer version 1.10 or above ( http://flowplayer.sourceforge.net/ ). - To use .flv files simply download Flowplayer and put the file - called "FlowPlayer.swf" or "Player.swf" into your Drupal folder. - Then set the Flash player file name to use on the Flash settings in video module configuration page. - -.ogg - Ogg Theora videos, video.module uses the java applet cortado to display Ogg Theora files, - you can find the latest version of cortado at http://www.flumotion.net//jar/cortado/ - get http://www.flumotion.net//jar/cortado/cortado-ovt-stripped-0.2.0.jar - and put it into your Drupal folder as cortado.jar - [ - NOTE, at the time of writing, cortado.jar had a bug that caused it to fail with drupal. - you can get a patched version of cortado.jar that works from http://v2v.cc/~j/cortado.jar - and the bug related to this issue: https://core.fluendo.com/flumotion/trac/ticket/387 - ] diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index b1102a4..0000000 --- a/LICENSE.txt +++ /dev/null @@ -1,275 +0,0 @@ -//$Id$ -GNU GENERAL PUBLIC LICENSE - - Version 2, June 1991 - -Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, -Cambridge, MA 02139, USA. Everyone is permitted to copy and distribute -verbatim copies of this license document, but changing it is not allowed. - - Preamble - -The licenses for most software are designed to take away your freedom to -share and change it. By contrast, the GNU General Public License is -intended to guarantee your freedom to share and change free software--to -make sure the software is free for all its users. This General Public License -applies to most of the Free Software Foundation's software and to any other -program whose authors commit to using it. (Some other Free Software -Foundation software is covered by the GNU Library General Public License -instead.) You can apply it to your programs, too. - -When we speak of free software, we are referring to freedom, not price. Our -General Public Licenses are designed to make sure that you have the -freedom to distribute copies of free software (and charge for this service if -you wish), that you receive source code or can get it if you want it, that you -can change the software or use pieces of it in new free programs; and that -you know you can do these things. - -To protect your rights, we need to make restrictions that forbid anyone to -deny you these rights or to ask you to surrender the rights. These restrictions -translate to certain responsibilities for you if you distribute copies of the -software, or if you modify it. - -For example, if you distribute copies of such a program, whether gratis or for -a fee, you must give the recipients all the rights that you have. You must make -sure that they, too, receive or can get the source code. And you must show -them these terms so they know their rights. - -We protect your rights with two steps: (1) copyright the software, and (2) -offer you this license which gives you legal permission to copy, distribute -and/or modify the software. - -Also, for each author's protection and ours, we want to make certain that -everyone understands that there is no warranty for this free software. If the -software is modified by someone else and passed on, we want its recipients -to know that what they have is not the original, so that any problems -introduced by others will not reflect on the original authors' reputations. - -Finally, any free program is threatened constantly by software patents. We -wish to avoid the danger that redistributors of a free program will individually -obtain patent licenses, in effect making the program proprietary. To prevent -this, we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - -The precise terms and conditions for copying, distribution and modification -follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND - MODIFICATION - -0. This License applies to any program or other work which contains a notice -placed by the copyright holder saying it may be distributed under the terms -of this General Public License. The "Program", below, refers to any such -program or work, and a "work based on the Program" means either the -Program or any derivative work under copyright law: that is to say, a work -containing the Program or a portion of it, either verbatim or with -modifications and/or translated into another language. (Hereinafter, translation -is included without limitation in the term "modification".) Each licensee is -addressed as "you". - -Activities other than copying, distribution and modification are not covered -by this License; they are outside its scope. The act of running the Program is -not restricted, and the output from the Program is covered only if its contents -constitute a work based on the Program (independent of having been made -by running the Program). Whether that is true depends on what the Program -does. - -1. You may copy and distribute verbatim copies of the Program's source -code as you receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice and -disclaimer of warranty; keep intact all the notices that refer to this License -and to the absence of any warranty; and give any other recipients of the -Program a copy of this License along with the Program. - -You may charge a fee for the physical act of transferring a copy, and you -may at your option offer warranty protection in exchange for a fee. - -2. You may modify your copy or copies of the Program or any portion of it, -thus forming a work based on the Program, and copy and distribute such -modifications or work under the terms of Section 1 above, provided that you -also meet all of these conditions: - -a) You must cause the modified files to carry prominent notices stating that -you changed the files and the date of any change. - -b) You must cause any work that you distribute or publish, that in whole or in -part contains or is derived from the Program or any part thereof, to be -licensed as a whole at no charge to all third parties under the terms of this -License. - -c) If the modified program normally reads commands interactively when run, -you must cause it, when started running for such interactive use in the most -ordinary way, to print or display an announcement including an appropriate -copyright notice and a notice that there is no warranty (or else, saying that -you provide a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this License. -(Exception: if the Program itself is interactive but does not normally print such -an announcement, your work based on the Program is not required to print -an announcement.) - -These requirements apply to the modified work as a whole. If identifiable -sections of that work are not derived from the Program, and can be -reasonably considered independent and separate works in themselves, then -this License, and its terms, do not apply to those sections when you distribute -them as separate works. But when you distribute the same sections as part -of a whole which is a work based on the Program, the distribution of the -whole must be on the terms of this License, whose permissions for other -licensees extend to the entire whole, and thus to each and every part -regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest your rights to -work written entirely by you; rather, the intent is to exercise the right to -control the distribution of derivative or collective works based on the -Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of a -storage or distribution medium does not bring the other work under the scope -of this License. - -3. You may copy and distribute the Program (or a work based on it, under -Section 2) in object code or executable form under the terms of Sections 1 -and 2 above provided that you also do one of the following: - -a) Accompany it with the complete corresponding machine-readable source -code, which must be distributed under the terms of Sections 1 and 2 above -on a medium customarily used for software interchange; or, - -b) Accompany it with a written offer, valid for at least three years, to give -any third party, for a charge no more than your cost of physically performing -source distribution, a complete machine-readable copy of the corresponding -source code, to be distributed under the terms of Sections 1 and 2 above on -a medium customarily used for software interchange; or, - -c) Accompany it with the information you received as to the offer to distribute -corresponding source code. (This alternative is allowed only for -noncommercial distribution and only if you received the program in object -code or executable form with such an offer, in accord with Subsection b -above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source code -means all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation and -installation of the executable. However, as a special exception, the source -code distributed need not include anything that is normally distributed (in -either source or binary form) with the major components (compiler, kernel, -and so on) of the operating system on which the executable runs, unless that -component itself accompanies the executable. - -If distribution of executable or object code is made by offering access to -copy from a designated place, then offering equivalent access to copy the -source code from the same place counts as distribution of the source code, -even though third parties are not compelled to copy the source along with the -object code. - -4. You may not copy, modify, sublicense, or distribute the Program except as -expressly provided under this License. Any attempt otherwise to copy, -modify, sublicense or distribute the Program is void, and will automatically -terminate your rights under this License. However, parties who have received -copies, or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - -5. You are not required to accept this License, since you have not signed it. -However, nothing else grants you permission to modify or distribute the -Program or its derivative works. These actions are prohibited by law if you -do not accept this License. Therefore, by modifying or distributing the -Program (or any work based on the Program), you indicate your acceptance -of this License to do so, and all its terms and conditions for copying, -distributing or modifying the Program or works based on it. - -6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the original -licensor to copy, distribute or modify the Program subject to these terms and -conditions. You may not impose any further restrictions on the recipients' -exercise of the rights granted herein. You are not responsible for enforcing -compliance by third parties to this License. - -7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), conditions -are imposed on you (whether by court order, agreement or otherwise) that -contradict the conditions of this License, they do not excuse you from the -conditions of this License. If you cannot distribute so as to satisfy -simultaneously your obligations under this License and any other pertinent -obligations, then as a consequence you may not distribute the Program at all. -For example, if a patent license would not permit royalty-free redistribution -of the Program by all those who receive copies directly or indirectly through -you, then the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply and -the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any patents or -other property right claims or to contest validity of any such claims; this -section has the sole purpose of protecting the integrity of the free software -distribution system, which is implemented by public license practices. Many -people have made generous contributions to the wide range of software -distributed through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing to -distribute software through any other system and a licensee cannot impose -that choice. - -This section is intended to make thoroughly clear what is believed to be a -consequence of the rest of this License. - -8. If the distribution and/or use of the Program is restricted in certain -countries either by patents or by copyrighted interfaces, the original copyright -holder who places the Program under this License may add an explicit -geographical distribution limitation excluding those countries, so that -distribution is permitted only in or among countries not thus excluded. In such -case, this License incorporates the limitation as if written in the body of this -License. - -9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will be -similar in spirit to the present version, but may differ in detail to address new -problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies -a version number of this License which applies to it and "any later version", -you have the option of following the terms and conditions either of that -version or of any later version published by the Free Software Foundation. If -the Program does not specify a version number of this License, you may -choose any version ever published by the Free Software Foundation. - -10. If you wish to incorporate parts of the Program into other free programs -whose distribution conditions are different, write to the author to ask for -permission. For software which is copyrighted by the Free Software -Foundation, write to the Free Software Foundation; we sometimes make -exceptions for this. Our decision will be guided by the two goals of -preserving the free status of all derivatives of our free software and of -promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT -PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE -STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT -WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND -PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL -NECESSARY SERVICING, REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR -AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR -ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE -LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, -SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES -ARISING OUT OF THE USE OR INABILITY TO USE THE -PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA -OR DATA BEING RENDERED INACCURATE OR LOSSES -SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE -PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN -IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF -THE POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS diff --git a/TODO.txt b/TODO.txt deleted file mode 100644 index 3f305e8..0000000 --- a/TODO.txt +++ /dev/null @@ -1,10 +0,0 @@ -// $Id$ - -TODO LIST ---------- - -- Video AJax Upload -- FlowPlayer's subtitles (add subtitles to video nodes) -- Video image capture screen shots -- Thickbox support -- CCK support diff --git a/hooks.php b/hooks.php deleted file mode 100644 index 69edabe..0000000 --- a/hooks.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -//$Id$ -/** - * @file - * The video module has some hooks which should make adding - * new features to the video module easier. - * - * This file contains example of implementation and documentation for - * all the available hooks defined in the video module. - * - * Video module hooks are different from standard drupal hooks - * Video module hooks have a leading "v_". The name of a function which - * is implementing a video hook is something like: modulename_v_hookname - * - * Although each active module which implement a video module hooks - * will be executed when that hook is called, if you are developing a - * video module specific addition (a plug in) I suggest you to call your - * module video_something and place it under your video module plugins folder. - * - * @author Fabio Varesano <fvaresano at yahoo dot it> - * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw@gmail.com> - * @todo - */ - - -//TODO: When we will release a stable version we have to document all the APIs -// the video module have - - -function hook_v_info() {}; - - -/** - * This hook is called by the video_image plugins once - * TODO: better documentation -*/ -function hook_v_autothumbnail($node) { - ; -} - -/** -The hook_v_get_params is used by plugins to write an html param inside -inside video generated object tag during the play. - -@param $node the node on which is being played - -@return a keyed array of tipe 'param_name'=>'param_value' -*/ -function hook_v_get_params(&$node) { - return array('flashVars' => 'autostart=true&url=false'); -} - - - diff --git a/images/play.png b/images/play.png Binary files differnew file mode 100644 index 0000000..1a61c7b --- /dev/null +++ b/images/play.png diff --git a/includes/apiclient.inc b/includes/apiclient.inc deleted file mode 100644 index 88468cb..0000000 --- a/includes/apiclient.inc +++ /dev/null @@ -1,135 +0,0 @@ -<?php -//$Id$ -/** - * @file - * Some functions for using video hosting providers api (Youtube, Google Video, etc..) - * Part of this code has been inspired by the video_cck module and adapted - * for the video module by jyamada1 - * - * @author Fabio Varesano <fvaresano at yahoo dot it> - * porting to Drupal 6 - * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw@gmail.com> - * @todo - */ - - -/** -* When an include file requires to read an xml to receive information, such as for thumbnails, -* this script can be used to request the xml and return it as an array. -* Note that this is a modified function from the flickr.module, made to handle this type of -* call more generically. also, i suspect it could be done easier (and more quickly) in php 5. -* @param $provider -* the string of the third party provider, such as 'youtube' or 'google' -* @param $url -* the url for the xml request -* @param $args -* an array of args to pass to the xml url -* @param $cacheable -* optional; if true, the result of this xml request will be cached. good to play nice w/ -* the third party folks so they don't stop providing service to your site... -* @return -* the xml results returned as an array -*/ -function _video_apiclient_request_xml($provider, $url, $args = array(), $cacheable = true) { - ksort($args); - - // build an argument hash that we'll use for the cache id and api signing - $arghash = $provider . ':'; - foreach($args as $k => $v){ - $arghash .= $k . $v; - } - - // build the url - foreach ($args as $k => $v){ - $encoded_params[] = urlencode($k).'='.urlencode($v); - } - $url .= '?'. implode('&', $encoded_params); - - // if it's a cachable request, try to load a cached value - if ($cacheable) { - if ($cache = cache_get($arghash, 'cache')) { - return unserialize($cache->data); - } - } - - // connect and fetch a value - $result = drupal_http_request($url); - - if ($result->code == 200) { - $parser = drupal_xml_parser_create($result->data); - $vals = array(); - $index = array(); - xml_parse_into_struct($parser, $result->data, $vals, $index); - xml_parser_free($parser); - - $params = array(); - $level = array(); - $start_level = 1; - foreach ($vals as $xml_elem) { - if ($xml_elem['type'] == 'open') { - if (array_key_exists('attributes',$xml_elem)) { - list($level[$xml_elem['level']],$extra) = array_values($xml_elem['attributes']); - } else { - $level[$xml_elem['level']] = $xml_elem['tag']; - } - } - if ($xml_elem['type'] == 'complete') { - $php_stmt = '$params'; - while($start_level < $xml_elem['level']) { - $php_stmt .= '[$level['.$start_level.']]'; - $start_level ++; - } - $php_stmt .= '[$xml_elem[\'tag\']][] = $xml_elem[\'value\'];'; - eval($php_stmt); - $start_level--; - } - } - - // save a cacheable result for future use - if ($cacheable) { - cache_set($arghash, 'cache', time() + 3600, serialize($params)); - } - return $params; - } - return array(); -} - - -/** -* Create a file object from thumbnail images from providers -* to allow for automatic thumbnailing of videos from providers -* @param $node -* the video node being called -* @return -* a file object containing the thumbnail file -*/ -/* -function _video_apiclient_provider_auto_thumbnail($node) { - // get thumbnail url - if(_video_get_filetype($node->vidfile) == 'youtube') { - $thumbnail = _video_apiclient_youtube_thumbnail($node->vidfile); - } - else { - $thumbnail = _video_apiclient_google_thumbnail($node->vidfile); - } - - // save image to temp directory for processing - $image = image_gd_open($thumbnail, 'jpeg'); - $location = file_directory_temp() .'/'. $node->vidfile .'.jpg'; - image_gd_close($image, $location, 'jpeg'); - - - // get info and build a file object - $filepath = file_create_path($location, file_directory_temp()); - $info = image_get_info($filepath); - - $file = new stdClass(); - $file->filepath = realpath($filepath); - $file->filename = basename($file->filepath); - $file->filesize = $info['file_size']; - $file->filemime = $info['mime_type']; - - return $file; -} -*/ - diff --git a/includes/common.inc b/includes/common.inc index c70a7a5..ce9d89c 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -4,57 +4,82 @@ * @file * Add some common functions for the various video types supported * - * @author Fabio Varesano <fvaresano at yahoo dot it> - * porting to Drupal 6 - * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw@gmail.com> - * @author Glen Marianko Twitter@demoforum <glenm at demoforum dot com> * @todo Configure default players by video filetype (user configurable?) */ + /** * Get the object for the suitable player for the parameter resource -*/ -function _video_common_get_player($node) { - switch (_video_get_filetype($node->vidfile)) { + */ +function _video_common_get_player($element) { + $field = content_fields($element['#field_name'], $element['#type_name']); + $resolution = array_filter(explode(':', $field['widget']['default_resolution'])); + $element['#item']['data']['height'] = $element['#item']['data']['width'] * ($resolution[1]/$resolution[0]); + + $op = _video_get_filetype($element['#item']['filename']); + //play HQ mp4 videos in flash player + if(variable_get('mp4_play_in_flowplayer', FALSE) && $op == 'mp4'){ + $op = 'mp4f'; + } + switch ($op) { case 'divx': - return theme('video_play_divx', $node); + return theme('video_play_divx', $element); case 'mov': case '3gp': case '3g2': - case 'mp4': - return theme('video_play_quicktime', $node); + case 'mp4': // video/mp4 + return theme('video_play_quicktime', $element); case 'rm': - return theme('video_play_realmedia', $node); - case 'flv': - return theme('video_play_flash', $node); + return theme('video_play_realmedia', $element); + case 'mp4f': + case 'f4v' : + case 'flv' : // flowplayer also supprts MP4, H.264 (.extension?) + return theme('video_play_flash', $element); case 'swf': - return theme('video_play_swf', $node); + return theme('video_play_swf', $element); case 'dir': case 'dcr': - return theme('video_play_dcr', $node); + return theme('video_play_dcr', $element); case 'asf': case 'wmv': case 'avi': case 'mpg': case 'mpeg': - return theme('video_play_windowsmedia', $node); + return theme('video_play_windowsmedia', $element); case 'ogg': - return theme('video_play_ogg_theora', $node); - case 'youtube': - return theme('video_play_youtube', $node); - case 'googlevideo': - return theme('video_play_googlevideo', $node); + return theme('video_play_ogg_theora', $element); default: - drupal_set_message('Video type not supported', 'error'); + drupal_set_message('No video player is configured for ' .$op, 'error'); break; } } + +/** + * Pull the file extension from a filename + * + * @param $vidfile + * string filename to get the filetype from. + * + * @return + * string value of file type or boolean FALSE on error + */ +function _video_get_filetype($vidfile) { + if (strstr($vidfile, '.')) { //If file contains a "." then get the file extension after the ". + $file_type = end(explode('.', $vidfile)); + } + else { + $file_type = FALSE; + } + + return strtolower($file_type); +} + /********************************************************************* * Themeable functions for playing videos. They print a page with a player embedded. *********************************************************************/ - /** +/** * Play videos from in FLV Flash video format * * @param $node @@ -63,44 +88,34 @@ function _video_common_get_player($node) { * @return * string of content to display */ -function theme_video_play_flash($node) { - $loader_location = variable_get('video_flvplayerloader', 'FlowPlayer.swf'); - - $url = _video_get_fileurl($node->vidfile); - $file = basename($url); - $base_url = substr($url, 0, strrpos($url, '/')); - - $height = $node->video_scaled_y + 24; // add commands height - - // this will be executed by not Internet Explorer browsers - $output = '<!--[if !IE]> <--> -<object type="application/x-shockwave-flash" width="'. $node->video_scaled_x .'" height="'. $height .'" -data="'. url() . check_plain($loader_location) .'"> -<!--> <![endif]-->' . "\n"; - - // this will be executed by Internet Explorer - $output .= '<!--[if IE]> -<object type="application/x-shockwave-flash" width="'. $node->video_scaled_x .'" height="'. $height .'" -classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" -codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"> -<![endif]-->' . "\n"; - - // params will be passed to both IE or not IE browsers - $config = sprintf("config={'playerId':'player','clip':{'url':'%s'},'playlist':[{'url':'%s','autoPlay':%s}]}", $base_url . '/' . $file, $base_url . '/' . $file, (variable_get('video_autoplay', TRUE) ? 'true' : 'false')); - $output .= '<param name="movie" value="' . url() . check_plain($loader_location) . '" /> - <param name="allowFullScreen" value="true" /> - <param name="wmode" value="transparent" /> - <param name="allowScriptAccess" value="sameDomain" /> - <param name="quality" value="high" /> - <param name="flashvars" value="' . $config . '" />' - . _video_get_parameters($node) . - '<p>'. t('Your browser is not able to display this multimedia content.') .'</p> -</object>'; - - $output = theme('video_format_play', $output, t('http://get.adobe.com/flashplayer/'), - t('Link to Adobe Flash Player Download Page'), - t('Download latest Flash Player')); - return $output; +function theme_video_play_flash($element) { +//TODO : remove item height set in here + $video = file_create_url($element['#item']['filepath']); + // echo file_create_url($element['#item']['filepath']); + $width = isset($element['#item']['data']['width']) ? $element['#item']['data']['width'] : ''; + $height = isset($element['#item']['data']['height']) ? $element['#item']['data']['height'] : ''; + $width = empty($width) ? '350px' : $width .'px'; + $height = empty($height) ? '285px' : $height .'px'; + $id = $element['#formatter']; + + if (module_exists('flowplayer')) { + $output = theme('flowplayer', array( + 'clip' => array( + 'url' => $video, + //TODO: Make settings for this + 'autoPlay' => variable_get('video_autoplay', TRUE), // Turn autoplay off + 'autoBuffering' => variable_get('video_autobuffering', TRUE), + ), + ), + $id, array( + 'style' => "width: $width; height: $height", + ) + ); + } + else { + $output='<p>Use <b>SwfTools Module</b> to play FLV files if you only convert/upload FLV videos or <b>FlowPlayer Module</b> must be enabled in order to play FLV videos with other types.</p>'; + } + return $output; } /** @@ -112,31 +127,36 @@ codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve * @return * string of content to display */ -function theme_video_play_swf($node) { +function theme_video_play_swf($element) { + + $video = file_create_url($element['#item']['filepath']); + $width = isset($element['#item']['data']['width']) ? $element['#item']['data']['width'] : ''; + $height = isset($element['#item']['data']['height']) ? $element['#item']['data']['height'] : ''; + $width = empty($width) ? '350px' : $width .'px'; + $height = empty($height) ? '285px' : $height .'px'; - $url = _video_get_fileurl($node->vidfile); // this will be executed by not Internet Explorer browsers $output = '<!--[if !IE]> <--> -<object type="application/x-shockwave-flash" width="'. $node->video_scaled_x .'" height="'. $node->video_scaled_y .'" -data="'. $url .'"> -<!--> <![endif]-->' . "\n"; + <object type="application/x-shockwave-flash" width="'. $width .'" height="'. $height .'" + data="'. $video .'"> + <!--> <![endif]-->' . "\n"; // this will be executed by Internet Explorer $output .= '<!--[if IE]> -<object type="application/x-shockwave-flash" width="'. $node->video_scaled_x .'" height="'. $node->video_scaled_y .'" -classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" -codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"> -<![endif]-->' . "\n"; + <object type="application/x-shockwave-flash" width="'. $width .'" height="'. $height .'" + classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"> + <![endif]-->' . "\n"; // params will be passed to both IE or not IE browsers - $output .= '<param name="movie" value="'. $url .'" />'. "\n" . + $output .= '<param name="movie" value="'. $video .'" />'. "\n" . '<param name="wmode" value="transparent" />' . "\n" - . _video_get_parameters($node) . - '<p>'. t('Your browser is not able to display this multimedia content.') .'</p> -</object>'; - - $output = theme('video_format_play', $output, t('http://www.macromedia.com/go/getflashplayer'), t('Link to Flash player download'), t('Download the latest Flash player')); + . //_video_get_parameters($node) . + '<p>'. t('Your browser is not able to display this multimedia content.') .'</p> + </object>'; +/* + $output = theme('video_format_play', $output, t('http://www.macromedia.com/go/getflashplayer'), t('Link to Flash player download'), t('Download the latest Flash player'));*/ return $output; } @@ -152,33 +172,37 @@ codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#ve * string of content to display */ -function theme_video_play_dcr($node) { +function theme_video_play_dcr($element) { - $url = _video_get_fileurl($node->vidfile); + $video = file_create_url($element['#item']['filepath']); + $width = isset($element['#item']['data']['width']) ? $element['#item']['data']['width'] : ''; + $height = isset($element['#item']['data']['height']) ? $element['#item']['data']['height'] : ''; + $width = empty($width) ? '350px' : $width .'px'; + $height = empty($height) ? '285px' : $height .'px'; // this will be executed by not Internet Explorer browsers $output = '<!--[if !IE]> <--> -<object type="application/x-director" width="'. $node->video_scaled_x .'" height="'. $node->video_scaled_y .'" -data="'. $url .'"> -<!--> <![endif]-->' . "\n"; + <object type="application/x-director" width="'. $width .'" height="'. $height .'" + data="'. $video .'"> + <!--> <![endif]-->' . "\n"; // this will be executed by Internet Explorer - $output .= '<!--[if IE]> -<object type="application/x-director" width="'. $node->video_scaled_x .'" height="'. $node->video_scaled_y .'" -classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" -codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=10,0,0,0"> -<![endif]-->' . "\n"; - -// params will be passed to both IE or not IE browsers - $output .= '<param name="src" value="'. $url .'" />' . "\n" - . _video_get_parameters($node) . - '<p>'. t('Your browser is not able to display this multimedia content.') .'</p> -</object>'; + $output .= '<!--[if IE]> + <object type="application/x-director" width="'. $width .'" height="'. $height .'" + classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" + codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=10,0,0,0"> + <![endif]-->' . "\n"; + // params will be passed to both IE or not IE browsers + $output .= '<param name="src" value="'. $video .'" />' . "\n" + . //_video_get_parameters($node) . + '<p>'. t('Your browser is not able to display this multimedia content.') .'</p> + </object>'; +/* $output = theme('video_format_play', $output, t('http://www.macromedia.com/shockwave/download/'), t('Link to Macromedia Shockwave Player Download Page'), - t('Download latest Shockwave Player')); - return $output; + t('Download latest Shockwave Player'));*/ + return $output; } /** @@ -191,26 +215,31 @@ codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#vers * @return * string of content to display */ -function theme_video_play_divx($node) { - //Increase the height to accommodate the player controls on the bottom. - $height = $node->video_scaled_y + 20; +function theme_video_play_divx($element) { +//Increase the height to accommodate the player controls on the bottom. + $video = file_create_url($element['#item']['filepath']); + $width = isset($element['#item']['data']['width']) ? $element['#item']['data']['width'] : ''; + $height = isset($element['#item']['data']['height']) ? $element['#item']['data']['height'] : ''; + $width = empty($width) ? '350px' : $width .'px'; + $height = empty($height) ? '285px' : $height .'px'; - $url = _video_get_fileurl($node->vidfile); + //$url = _video_get_fileurl($node->vidfile); $output = '<!-- [if IE] --> -<object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="'.$node->video_scaled_x.'" height="'.$height.'" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab"> -<!--> <![endif]-->'. "\n"; + <object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="'.$width.'" height="'.$height.'" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab"> + <!--> <![endif]-->'. "\n"; // this will be executed by not Internet Explorer browsers $output = '<!-- [if !IE] --> -<object type="video/divx" data="'.$url.'" width="'.$node->video_scaled_x.'" height="'.$height.'" mode="zero"> -<!--> <![endif]-->'."\n"; + <object type="video/divx" data="'.$video.'" width="'.$width.'" height="'.$height.'" mode="zero"> + <!--> <![endif]-->'."\n"; - $output .= '<param name="src" value="'.$url.'"/>'."\n"; + $output .= '<param name="src" value="'.$video.'"/>'."\n"; $output .= '<param name="mode" value="zero"/>'."\n"; $output .= '</object>'; + /* $output = theme('video_format_play', $output,t('http://www.divx.com/divx/webplayer/'), t('Link to DivX Download Page'), - t('Download latest DivX Web Player')); + t('Download latest DivX Web Player'));*/ return $output; } @@ -224,45 +253,38 @@ function theme_video_play_divx($node) { * @return * string of content to display */ -function theme_video_play_quicktime($node) { - //Increase the height to accommodate the player controls on the bottom. - $height = $node->video_scaled_y + 16; - - $url = _video_get_fileurl($node->vidfile); +function theme_video_play_quicktime($element) { +//Increase the height to accommodate the player controls on the bottom. + $video = file_create_url($element['#item']['filepath']); + $width = isset($element['#item']['data']['width']) ? $element['#item']['data']['width'] : ''; + $height = isset($element['#item']['data']['height']) ? $element['#item']['data']['height'] : ''; + $width = empty($width) ? '350px' : $width .'px'; + $height = empty($height) ? '285px' : $height .'px'; // this will be executed by not Internet Explorer browsers $output = '<!--[if !IE]> <--> -<object type="video/quicktime" width="'. $node->video_scaled_x .'" height="'. $height .'" -data="'. $url .'"> -<!--> <![endif]-->' . "\n"; + <object type="video/quicktime" width="'. $width .'" height="'. $height .'" + data="'. $video .'"> + <!--> <![endif]-->' . "\n"; // this will be executed by Internet Explorer - $output .= '<!--[if IE]> -<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="'. $node->video_scaled_x .'" height="'. $height .'" scale="tofit" > -<![endif]-->' . "\n"; + $output .= '<!--[if IE]> + <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" + codebase="http://www.apple.com/qtactivex/qtplugin.cab" + width="'. $width .'" height="'. $height .'" scale="tofit" > + <![endif]-->' . "\n"; // params will be passed to both IE or not IE browsers //GMM: kioskmode enabled so users don't bypass download security video through player - $output .= '<param name="src" value="'. $url .'" /> - <param name="AUTOPLAY" value="'.(variable_get('video_autoplay', TRUE) ? 'true' : 'false').'" /> + $output .= '<param name="src" value="'. $video .'" /> + <param name="AUTOPLAY" value="'.(variable_get('video_autoplay', TRUE) ? TRUE : FALSE).'" /> <param name="KIOSKMODE" value="true" /> <param name="CONTROLLER" value="true" />' . "\n" - . _video_get_parameters($node) . - '<p>'. t('Your browser is not able to display this multimedia content.') .'</p> -</object>'; // only one </object> needed becouse only one opening tag has been parsed by browsers + . //_video_get_parameters($node) . + '<p>'. t('Your browser is not able to display this multimedia content.') .'</p> + </object>'; // only one </object> needed becouse only one opening tag has been parsed by browsers - - /* - $output = '<script language="JavaScript" type="text/javascript">'; - $output .= "InsertQuicktimeVideo('{$node->vidfile}','$height','{$node->video_scaled_x}');"; - $output .= '</script>'; - */ - - - $output = theme('video_format_play', $output, t('http://www.apple.com/quicktime/download'), - t('Link to QuickTime Download Page'), - t('Download latest Quicktime Player')); return $output; } @@ -275,27 +297,29 @@ data="'. $url .'"> * @return * string of content to display */ -function theme_video_play_realmedia($node) { - // Real's embeded player includes the controls - // in the height - $node->video_scaled_y += 40; - - $url = _video_get_fileurl($node->vidfile); +function theme_video_play_realmedia($element) { +// Real's embeded player includes the controls +// in the height + $video = file_create_url($element['#item']['filepath']); + $width = isset($element['#item']['data']['width']) ? $element['#item']['data']['width'] : ''; + $height = isset($element['#item']['data']['height']) ? $element['#item']['data']['height'] : ''; + $width = empty($width) ? '350px' : $width .'px'; + $height = empty($height) ? '285px' : $height .'px'; // this will be executed by not Internet Explorer browsers $output = '<!--[if !IE]> <--> -<object type="audio/x-pn-realaudio-plugin" width="'. $node->video_scaled_x .'" height="'. $node->video_scaled_y .'" -data="'. $url .'"> -<!--> <![endif]-->' . "\n"; + <object type="audio/x-pn-realaudio-plugin" width="'. $width .'" height="'. $height .'" + data="'. $video .'"> + <!--> <![endif]-->' . "\n"; // this will be executed by Internet Explorer - $output .= '<!--[if IE]> -<object type="audio/x-pn-realaudio-plugin" width="'. $node->video_scaled_x .'" height="'. $node->video_scaled_y .'" -classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" > -<![endif]-->' . "\n"; + $output .= '<!--[if IE]> + <object type="audio/x-pn-realaudio-plugin" width="'. $width .'" height="'. $height .'" + classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" > + <![endif]-->' . "\n"; // params will be passed to both IE or not IE browsers - $output .= '<param name="src" value="'. $url .'" /> + $output .= '<param name="src" value="'. $video .'" /> <param name="_ExtentX" value="7276" /> <param name="" value="3307" /> <param name="AUTOSTART" value="'.(variable_get('video_autoplay', TRUE) ? 'true' : 'false').'" /> @@ -309,14 +333,14 @@ classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" > <param name="CENTER" value="0" /> <param name="MAINTAINASPECT" value="1" /> <param name="BACKGROUNDCOLOR" value="#000000" />' - . _video_get_parameters($node) . - '<p>'. t('Your browser is not able to display this multimedia content.') .'</p> -</object>'; // only one </object> needed becouse only one opening tag has been parsed by browsers - + . //_video_get_parameters($node) . + '<p>'. t('Your browser is not able to display this multimedia content.') .'</p> + </object>'; // only one </object> needed becouse only one opening tag has been parsed by browsers +/* $output = theme('video_format_play', $output, t('http://www.real.com/'), t('Link to Real'), - t('Download latest Realmedia Player')); + t('Download latest Realmedia Player'));*/ return $output; } @@ -329,44 +353,38 @@ classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" > * @return * string of content to display */ -function theme_video_play_windowsmedia($node) { - // Windows Media's embeded player includes the controls in the height - $node->video_scaled_y += 68; - $url = _video_get_fileurl($node->vidfile); +function theme_video_play_windowsmedia($element) { +// Windows Media's embeded player includes the controls in the height + $video = file_create_url($element['#item']['filepath']); + $width = isset($element['#item']['data']['width']) ? $element['#item']['data']['width'] : ''; + $height = isset($element['#item']['data']['height']) ? $element['#item']['data']['height'] : ''; + $width = empty($width) ? '350px' : $width .'px'; + $height = empty($height) ? '285px' : $height .'px'; // this will be executed by not Internet Explorer browsers $output = '<!--[if !IE]> <--> -<object type="application/x-mplayer2" width="'. $node->video_scaled_x .'" height="'. $node->video_scaled_y .'" -data="'. $url .'"> -<!--> <![endif]-->' . "\n"; + <object type="application/x-mplayer2" width="'. $width .'" height="'. $height .'" + data="'. $video .'"> + <!--> <![endif]-->' . "\n"; // this will be executed by Internet Explorer - $output .= '<!--[if IE]> -<object type="application/x-oleobject" width="'. $node->video_scaled_x .'" height="'. $node->video_scaled_y .'" -classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" > -<![endif]-->' . "\n"; + $output .= '<!--[if IE]> + <object type="application/x-oleobject" width="'. $width .'" height="'. $height .'" + classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" > + <![endif]-->' . "\n"; // params will be passed to both IE or not IE browsers - $output .= '<param name="src" value="'. $url .'" /> - <param name="URL" value="'.$url.'" /> + $output .= '<param name="src" value="'. $video .'" /> + <param name="URL" value="'.$video.'" /> <param name="animationatStart" value="true" /> <param name="transparentatStart" value="true" /> <param name="autoStart" value="'.(variable_get('video_autoplay', TRUE) ? 'true' : 'false').'" /> <param name="showControls" value="true" /> <param name="loop" value="true" />' - . _video_get_parameters($node) . - '<p>'. t('Your browser is not able to display this multimedia content.') .'</p> -</object>'; // only one </object> needed becouse only one opening tag has been parsed by browsers - - - $output = "\n<div id=\"video-player\">\n" . $output; - $output .= "<p>\n". t('Problems viewing videos?'); - $output .= "<br />\n"; - $output .= l(t('Download latest Windows Media Player'), t('http://windowsupdate.microsoft.com/'), array('attributes' => array('title' => t('Link to Windows Update')), 'absolute' => TRUE)); - //GMM: add link to Windows Media Player plug-in for Firefox browsers - $output .= "<br />\n"; - $output .= l(t('Download the plug-in for Firefox'), t('http://support.mozilla.com/en-US/kb/Using+the+Windows+Media+Player+plugin+with+Firefox'), array('attributes' => array('title' => t('Link to Firefox Plug-in')), 'absolute' => TRUE)); - $output .= "\n</p> \n </div>\n"; + . //_video_get_parameters($node) . + '<p>'. t('Your browser is not able to display this multimedia content.') .'</p> + </object>'; // only one </object> needed becouse only one opening tag has been parsed by browsers + return $output; } @@ -382,10 +400,11 @@ classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" > * @return * string of content to display */ -function theme_video_play_ogg_theora($node) { +function theme_video_play_ogg_theora($element) { global $base_url; $cortado_location = variable_get('video_cortado', $base_url . '/cortado.jar'); - $url = _video_get_fileurl($node->vidfile); + //$url = _video_get_fileurl($node->vidfile); + $video = file_create_url($element['#item']['filepath']); $width = ($node->video_scaled_x ? $node->video_scaled_x : '425'); $height = ($node->video_scaled_y ? $node->video_scaled_y : '350'); @@ -406,7 +425,7 @@ function theme_video_play_ogg_theora($node) { <!--<![endif]--> <!-- IE and Konqueror browser need the archive param --> <param name="archive" value="' . $cortado_location . '" /> - <param name="url" value="' . $url . '"/> + <param name="url" value="' . $video . '"/> <param name="local" value="false" /> <param name="keepaspect" value="true" /> <param name="video" value="true" /> @@ -422,9 +441,8 @@ function theme_video_play_ogg_theora($node) { </strong> </object> '; - +/* $output = theme('video_format_play', $output, - t('http://java.com/download/'), t('Link to java.com'), t('Download Java')); + t('http://java.com/download/'), t('Link to java.com'), t('Download Java'));*/ return $output; -} - +}
\ No newline at end of file diff --git a/includes/video.views.inc b/includes/video.views.inc deleted file mode 100644 index 1f0682e..0000000 --- a/includes/video.views.inc +++ /dev/null @@ -1,135 +0,0 @@ -<?php -//$Id$ -/** -* Provides views data and enumerates handlers for video.module -* -* @return -* array - Enables support in the video module for views integration -* @author Glen Marianko Twitter@demoforum <glenm at demoforum dot com> -* @todo -**/ - -function video_views_data() { - // Basic table information. - // ---------------------------------------------------------------- - // views table - $data['video']['table']['group'] = t('Video'); - $data['video']['table']['join'] = array( - // ...to the node table - 'node' => array( - 'left_field' => 'nid', - 'field' => 'vid', - ), - ); - - // Fields that can be inserted into a view - // play counter - $data['video']['play_counter'] = array( - 'title' => t('Play count'), - 'help' => t('This will display the number of times this has been played.'), - 'field' => array( - 'handler' => 'views_handler_field_numeric', - 'click sortable' => TRUE, - ), - 'filter' => array( - 'handler' => 'views_handler_filter_numeric', - ), - 'sort' => array( - 'title' => t('Play count'), - 'help' => t('Sort by the number of video plays.'), - 'handler' => 'views_handler_sort', - ), - ); - $data['video']['download_counter'] = array( - 'title' => t('Download count'), - 'help' => t('This will display the number of times this has been downloaded.'), - 'field' => array( - 'handler' => 'views_handler_field_numeric', - 'click sortable' => TRUE, - ), - 'filter' => array( - 'handler' => 'views_handler_filter_numeric', - ), - 'sort' => array( - 'title' => t('Download count'), - 'help' => t('Sort by the number of video downloads.'), - 'handler' => 'views_handler_sort', - ), - ); - $data['video']['videox'] = array( - 'title' => t('Width (x)'), - 'help' => t('This will display the width (x) of the video'), - 'field' => array( - 'handler' => 'views_handler_field_numeric', - 'click sortable' => TRUE, - ), - 'filter' => array( - 'handler' => 'views_handler_filter_numeric', - ), - 'sort' => array( - 'handler' => 'views_handler_sort', - ), - ); - $data['video']['videoy'] = array( - 'title' => t('Height (y)'), - 'help' => t('This will display the height (y) of the video'), - 'field' => array( - 'handler' => 'views_handler_field_numeric', - 'click sortable' => TRUE, - ), - 'filter' => array( - 'handler' => 'views_handler_filter_numeric', - ), - 'sort' => array( - 'handler' => 'views_handler_sort', - ), - ); - $data['video']['playtime_seconds'] = array( - 'title' => t('Length'), - 'help' => t('This will display the play length of the video.'), - 'field' => array( - 'handler' => 'video_views_handler_field_playtime_seconds', - 'click sortable' => TRUE, - ), - 'filter' => array( - 'handler' => 'views_handler_filter_numeric', - ), - 'sort' => array( - 'title' => t('Length'), - 'help' => t('Sort by the video length.'), - 'handler' => 'views_handler_sort', - ), - ); - $data['video']['download_link'] = array( - 'real field' => 'vidfile', - 'title' => t('Download link'), - 'help' => t('This will display a download link if the node allows it.'), - 'field' => array( - 'handler' => 'video_views_handler_field_download', - 'click sortable' => FALSE, - ) - ); - $data['video']['play_link'] = array( - 'real field' => 'vidfile', - 'title' => t('Play link'), - 'help' => t('This will display a play link if the node allows it.'), - 'field' => array( - 'handler' => 'video_views_handler_field_play', - 'click sortable' => FALSE, - ), - ); - - // Add video_image support only if the video_image module is enabled - if (module_exists('video_image')) { - $data['video']['video_image'] = array( - 'real field' => 'vidfile', - 'title' => t('Thumbnail'), - 'help' => t('This will display the thumbnail image for the video.'), - 'field' => array( - 'handler' => 'video_views_handler_field_image', - 'click sortable' => FALSE, - ), - ); - } - return $data; -} diff --git a/includes/video.views_default.inc b/includes/video.views_default.inc deleted file mode 100644 index 271738e..0000000 --- a/includes/video.views_default.inc +++ /dev/null @@ -1,233 +0,0 @@ -<?php -//$Id$ -/** -* Implementation of hook_views_tables -* -* @return -* array - Enables default video module Video Tracker vie - * @author Glen Marianko Twitter@demoforum <glenm at demoforum dot com> -* @todo -**/ - -/** -* Provide a default view -* -* @return - array - of views -**/ -function video_views_default_views() { - $views = array(); - - // view definition (Views 2) - $view = new view; - $view->name = 'video_tracker'; - $view->description = 'Shows all recent video activity (table format)'; - $view->tag = ''; - $view->view_php = ''; - $view->base_table = 'node'; - $view->is_cacheable = FALSE; - $view->api_version = 2; - $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ - $handler = $view->new_display('default', 'Defaults', 'default'); - $handler->override_option('fields', array( - 'title' => array( - 'id' => 'title', - 'table' => 'node', - 'field' => 'title', - 'label' => 'Title', - 'link_to_node' => TRUE, - ), - 'changed' => array( - 'id' => 'changed', - 'table' => 'node', - 'field' => 'changed', - 'label' => 'Last Updated', - 'date_format' => 'small', - ), - 'name' => array( - 'id' => 'name', - 'table' => 'users', - 'field' => 'name', - 'label' => 'Author', - ), - 'playtime_seconds' => array( - 'label' => 'Play time', - 'alter' => array( - 'alter_text' => 0, - 'text' => '', - 'make_link' => 0, - 'path' => '', - 'link_class' => '', - 'alt' => '', - 'prefix' => '', - 'suffix' => '', - 'help' => '', - 'trim' => 0, - 'max_length' => '', - 'word_boundary' => 1, - 'ellipsis' => 1, - 'strip_tags' => 0, - 'html' => 0, - ), - 'exclude' => 0, - 'id' => 'playtime_seconds', - 'table' => 'video', - 'field' => 'playtime_seconds', - 'relationship' => 'none', - ), - 'video_image' => array( - 'id' => 'video_image', - 'table' => 'video', - 'field' => 'video_image', - 'label' => 'Preview / Play', - ), - )); - $handler->override_option('sorts', array( - 'changed' => array( - 'order' => 'ASC', - 'granularity' => 'second', - 'id' => 'changed', - 'table' => 'node', - 'field' => 'changed', - 'relationship' => 'none', - ), - )); - $handler->override_option('filters', array( - 'type' => array( - 'id' => 'type', - 'table' => 'node', - 'field' => 'type', - 'operator' => 'in', - 'value' => array( - '0' => 'video', - ), - ), - 'status' => array( - 'id' => 'status', - 'table' => 'node', - 'field' => 'status', - 'value' => '1', - ), - )); - $handler->override_option('access', array( - 'type' => 'none', - 'role' => array(), - 'perm' => '', - )); - $handler->override_option('cache', array( - 'type' => 'none', - )); - $handler->override_option('title', 'Recent video activity'); - $handler->override_option('header_format', '1'); - $handler->override_option('footer_format', '1'); - $handler->override_option('empty', 'There is no recent video activity'); - $handler->override_option('empty_format', '1'); - $handler->override_option('items_per_page', '20'); - $handler->override_option('use_pager', TRUE); - $handler->override_option('style_plugin', 'table'); - $handler->override_option('style_options', array( - 'columns' => array(), - 'default' => 'changed', - 'info' => array( - 'title' => array( - 'sortable' => TRUE, - ), - 'changed' => array( - 'sortable' => TRUE, - ), - ), - 'override' => FALSE, - 'order' => 'asc', - )); - $handler = $view->new_display('page', 'Page', 'page_1'); - $handler->override_option('path', 'video/tracker'); - $handler->override_option('menu', array( - 'type' => 'none', - 'title' => '', - 'description' => '', - 'weight' => 0, - 'name' => 'navigation', - )); - $handler->override_option('tab_options', array( - 'type' => 'none', - 'title' => '', - 'description' => '', - 'weight' => 0, - )); - $handler = $view->new_display('block', 'Block', 'block_1'); - $handler->override_option('fields', array( - 'title' => array( - 'label' => '', - 'alter' => array( - 'alter_text' => 0, - 'text' => '', - 'make_link' => 0, - 'path' => '', - 'link_class' => '', - 'alt' => '', - 'prefix' => '', - 'suffix' => '', - 'help' => '', - 'trim' => 0, - 'max_length' => '', - 'word_boundary' => 1, - 'ellipsis' => 1, - 'strip_tags' => 0, - 'html' => 0, - ), - 'link_to_node' => 1, - 'exclude' => 0, - 'id' => 'title', - 'table' => 'node', - 'field' => 'title', - 'override' => array( - 'button' => 'Use default', - ), - 'relationship' => 'none', - ), - 'video_image' => array( - 'label' => '', - 'alter' => array( - 'alter_text' => 0, - 'text' => '', - 'make_link' => 0, - 'path' => '', - 'link_class' => '', - 'alt' => '', - 'prefix' => '', - 'suffix' => '', - 'help' => '', - 'trim' => 0, - 'max_length' => '', - 'word_boundary' => 1, - 'ellipsis' => 1, - 'strip_tags' => 0, - 'html' => 0, - ), - 'exclude' => 0, - 'id' => 'video_image', - 'table' => 'video', - 'field' => 'video_image', - 'override' => array( - 'button' => 'Use default', - ), - 'relationship' => 'none', - ), - )); - $handler->override_option('use_ajax', TRUE); - $handler->override_option('items_per_page', 1); - $handler->override_option('use_pager', 'mini'); - $handler->override_option('style_plugin', 'grid'); - $handler->override_option('style_options', array( - 'grouping' => '', - 'columns' => '1', - 'alignment' => 'horizontal', - )); - $handler->override_option('block_description', 'Video Tracker'); - $handler->override_option('block_caching', -1); - - // recent video node activity view - $views[$view->name] = $view; - return $views; -} - diff --git a/includes/video_views_handler_field_download.inc b/includes/video_views_handler_field_download.inc deleted file mode 100644 index c01333e..0000000 --- a/includes/video_views_handler_field_download.inc +++ /dev/null @@ -1,37 +0,0 @@ -<?php -//$Id$ -/** -* Implementation of hook_views_tables -* -* @return -* array - Enables support in the video module for views integration - * @author Glen Marianko Twitter@demoforum <glenm at demoforum dot com> - * @todo -**/ - -/** - * Field handler to display the play length of the video. - * - * @ingroup views_field_handlers - */ -class video_views_handler_field_download extends views_handler_field { - /** - * Render field output to the browser. - */ - function render($values) { - return _video_views_handler_field_download($values); - } -} -/** -* Handler to to return the correct download link for the video in a field -**/ -function _video_views_handler_field_download($values) { - /* $str = NULL; - foreach($values as $key => $value) { - $str .= $key .'<br>'; - } - return $str; */ - if($values->node_type && $values->node_type != 'video') return NULL; - return l(t('Download'), "node/$values->nid/download", array()); -} - diff --git a/includes/video_views_handler_field_image.inc b/includes/video_views_handler_field_image.inc deleted file mode 100644 index fbbe905..0000000 --- a/includes/video_views_handler_field_image.inc +++ /dev/null @@ -1,74 +0,0 @@ -<?php -//$Id$ -/** -* Implementation of hook_views_tables -* -* @return -* array - Enables support in the video module for views integration - * @author Glen Marianko Twitter@demoforum <glenm at demoforum dot com> - * @todo -**/ - -/** - * Field handler to display the video preview thumbnail - * - * @ingroup views_field_handlers - */ -class video_views_handler_field_image extends views_handler_field { - /** - * Define options available for this field. - */ - function option_definition() { - $options = parent::option_definition(); - $options['img_type'] = array('default' => 'thumbnail'); - $options['disp_link'] = array('default' => TRUE); - return $options; - } - - /** - * Build option configuration form. - */ - function options_form(&$form, &$form_state) { - parent::options_form($form, $form_state); - - $form['img_type'] = array( - '#title' => t('Show image as'), - '#type' => 'select', - '#options' => array( - 'thumbnail' => t('Thumbnail'), - 'preview' => t('Preview'), - ), - '#default_value' => $this->options['img_type'], - ); - $form['disp_link'] = array( - '#title' => t('Link image to video'), - '#type' => 'checkbox', - '#default_value' => $this->options['disp_link'], - ); - - } -/** - * Render field output to the browser. - */ - function render($values) { - return _video_views_handler_field_image($values, $this->options['img_type'], $this->options['disp_link']); - } -} -/** -* Handler to render the preview image associated with a video -**/ -function _video_views_handler_field_image($values, $image_type, $linked) { - if($values->node_type && $values->node_type != 'video') return NULL; - $node = node_load($values->nid); - $output = NULL; - if($node->iid && $image = node_load($node->iid)) { - $image_html = NULL; - if($image != NULL && $image->type == 'image') { - $image_html = image_display($image, $image_type, array('class' => 'video_image_teaser')); - //Create a link with an image in it. - $output .= ($linked ? l($image_html, "node/$values->nid", array('html' => TRUE)) : $image_html); - $output .= '<br class="video_image_clear" />'; - } - } - return $output; -} diff --git a/includes/video_views_handler_field_play.inc b/includes/video_views_handler_field_play.inc deleted file mode 100644 index 1eac89e..0000000 --- a/includes/video_views_handler_field_play.inc +++ /dev/null @@ -1,31 +0,0 @@ -<?php -//$Id$ -/** -* Implementation of hook_views_tables -* -* @return -* array - Enables support in the video module for views integration - * @author Glen Marianko Twitter@demoforum <glenm at demoforum dot com> - * @todo -**/ - -/** - * Field handler to display the play length of the video. - * - * @ingroup views_field_handlers - */ -class video_views_handler_field_play extends views_handler_field { - /** - * Render field output to the browser. - */ - function render($values) { - return _video_views_handler_field_play($values); - } -} -/** -* Handler to to render the "Play" link field -**/ -function _video_views_handler_field_play($values) { - if($values->node_type && $values->node_type != 'video') return NULL; - return l(t('Play'), "node/$values->nid/play", array()); -} diff --git a/includes/video_views_handler_field_playtime_seconds.inc b/includes/video_views_handler_field_playtime_seconds.inc deleted file mode 100644 index c0efc93..0000000 --- a/includes/video_views_handler_field_playtime_seconds.inc +++ /dev/null @@ -1,76 +0,0 @@ -<?php -//$Id$ -/** -* Implementation of hook_views_tables -* -* @return -* array - Enables support in the video module for views integration - * @author Glen Marianko Twitter@demoforum <glenm at demoforum dot com> - * @todo -**/ - -/** - * Field handler to display the play length of the video. - * - * @ingroup views_field_handlers - */ -class video_views_handler_field_playtime_seconds extends views_handler_field { - /** - * Define options available for this field. - */ - function option_definition() { - $options = parent::option_definition(); - $options['time_type'] = array('default' => 'hms'); - return $options; - } - - /** - * Build option configuration form. - */ - function options_form(&$form, &$form_state) { - parent::options_form($form, $form_state); - - $form['time_type'] = array( - '#title' => t('Show playtime as'), - '#type' => 'select', - '#options' => array( - 'hms' => t('Hour:min:sec'), - 'sec' => t('Seconds'), - ), - '#default_value' => $this->options['time_type'], - ); - } - /** - * Render field output to the browser. - */ - function render($values) { - return _video_playtime_seconds($values, $this->options['time_type']); - } -} -/** -* Handler to to render the correct playtime for the video in a field -**/ -function _video_playtime_seconds($values, $type) { - if($values->node_type && $values->node_type != 'video') return NULL; - switch ($type) { - case 'hms': - $hms = _video_sec2hms($values->video_playtime_seconds); - - // Pad the minutes / seconds with a leading "0", if - // necessary - if ($hms['hours'] > 0) { - $hms['minutes'] = str_pad($hms['minutes'], 2, '0', STR_PAD_LEFT); - } - $hms['seconds'] = str_pad($hms['seconds'], 2, '0', STR_PAD_LEFT); - - $out = ''; - if ($hms['hours'] > 0) { - $out .= $hms['hours'].":"; - } - $out .= $hms['minutes'].":".$hms['seconds']; - return $out; - case 'sec': - default: - return $values->video_playtime_seconds; - } -} diff --git a/plugins/ffmpeg.inc b/plugins/ffmpeg.inc new file mode 100644 index 0000000..e8e0057 --- /dev/null +++ b/plugins/ffmpeg.inc @@ -0,0 +1,275 @@ +<?php +//$Id$ + +/** + * @file + * Provide a api for video conversion and auto thumbnailing using ffmpeg. + * + * @author Heshan Wanigasooriya <heshan at heidisoft.com, heshanmw at gmail dot com> + * TODO: add common settings from video module configurations and extend it from ffmpeg.inc + * since we need to have executable path of ffmpeg to ffmpeg.inc we need to have it + */ + +/** + * Define some constants + */ +defined('VIDEO_RENDERING_PENDING') + or define('VIDEO_RENDERING_PENDING', 1); +defined('VIDEO_RENDERING_ACTIVE') + or define('VIDEO_RENDERING_ACTIVE', 5); +defined('VIDEO_RENDERING_COMPLETE') + or define('VIDEO_RENDERING_COMPLETE', 10); +defined('VIDEO_RENDERING_FAILED') + or define('VIDEO_RENDERING_FAILED', 20); + +// nice value to append at the beginning of the command +defined('VIDEO_RENDERING_NICE') + or define('VIDEO_RENDERING_NICE', 'nice -n 19'); + + +// TODO : add cron API to video module +function ffmpeg_cron() { + global $base_url; + + if(variable_get('video_ffmpeg_helper_auto_cvr_cron', true)) { + exec("php video_scheduler.php $base_url > /dev/null &"); + } +} + + +/** + * Get some informations from the video file + */ +function ffmpeg_get_video_info($vidfile) { + static $ffmpeg_info; + $fid = $vidfile['fid']; + // $command_output = cache_get($fid); + // if(empty($command_output)) { + // escape file name for safety + $file = escapeshellarg($vidfile['filepath']); + // create the full command to execute + $command = variable_get('video_transcoder_path', '/usr/bin/ffmpeg') . ' -i ' . $file; + + //execute the command + ob_start(); + passthru($command." 2>&1", $command_return); + $command_output = ob_get_contents(); + ob_end_clean(); + + // cache the result for further calls + // $ffmpeg_info[$vidfile['fid']] = $command_output; + // cache_set($vidfile['fid'], $command_output); + // } + + return $command_output; +} + + +/** + * Return the video resolution + */ +function ffmpeg_auto_resolution(&$node) { + + if(!variable_get('video_ffmpeg_helper_auto_resolution', false)) { + + // call ffmpeg -i + $ffmpeg_output = ffmpeg_get_video_info($node); + + // get resolution + $pattern = '/Video: .*, ([0-9]{2,4}x[0-9]{2,4})/'; + preg_match_all($pattern, $ffmpeg_output, $matches, PREG_PATTERN_ORDER); + $resolution = $matches[1][0]; + + return explode("x", $resolution); + } + return null; +} + + +/** + * Return the playtime seconds of a video + */ +function ffmpeg_auto_playtime($file) { + + if(!variable_get('video_ffmpeg_helper_auto_playtime', false)) { + + // call ffmpeg -i + $ffmpeg_output = ffmpeg_get_video_info($file); + + // get playtime + $pattern = '/Duration: ([0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9])/'; + preg_match_all($pattern, $ffmpeg_output, $matches, PREG_PATTERN_ORDER); + $playtime = $matches[1][0]; + + // ffmpeg return lenght as 00:00:31.1 Let's get playtime from that + $hmsmm = explode(":", $playtime); + + $tmp = explode(".", $hmsmm[2]); + $seconds = $tmp[0]; + + $hours = $hmsmm[0]; + $minutes = $hmsmm[1]; + + return $seconds + ($hours * 3600) + ($minutes * 60); + } +} + +/** + * Generates a thumbnail from the video file + * Implementing hook_auto_thumbnail on inc + * + * @param $vidfile + * object with element information + * + * @return + * a drupal file objects + */ +function ffmpeg_auto_thumbnail($vidfile) { + global $user; + $uploaded_file = $vidfile; + $fid = $uploaded_file["fid"]; + + // are we debugging? + // escape the filename for safety + $videofile = escapeshellarg($uploaded_file['filepath']); + $thumb_path = variable_get('video_thumb_path', 'video_thumbs'); + //files will save in files/video_thumbs/#fileId folder + $tmp = file_directory_path(). '/' . $thumb_path . '/' . $fid; + // Ensure the destination directory exists and is writable. + $directories = explode('/', $tmp); + // array_pop($directories); // Remove the file itself. + // Get the file system directory. + $file_system = file_directory_path(); + foreach ($directories as $directory) { + $full_path = isset($full_path) ? $full_path . '/' . $directory : $directory; + // Don't check directories outside the file system path. + if (strpos($full_path, $file_system) === 0) { + field_file_check_directory($full_path, FILE_CREATE_DIRECTORY); + } + } + $count = variable_get('no_of_video_thumbs', 5); + $duration = ffmpeg_auto_playtime($vidfile); + $files = NULL; + for($i = 1; $i <= $count; $i++) { + // get ffmpeg configurations + $seek = ($duration/$count) * $i; + $thumbfile = $tmp . "/video-thumb-for-$fid-$i.png"; + //skip files already exists, this will save ffmpeg traffic + if (!is_file($thumbfile)) { + $tnail = variable_get('video_transcoder_path', '/usr/bin/ffmpeg'); + $options = preg_replace(array('/%videofile/', '/%thumbfile/', '/%seek/'), array($videofile, $thumbfile, $seek), variable_get('video_ffmpeg_thumbnailer_options', '-i %videofile -an -y -f mjpeg -ss %seek -vframes 1 %thumbfile')); + // $options = preg_replace(array('/%videofile/', '/%tmp/', '/%id/', '/%interval/'), array($videofile, $tmp, $i, ($duration/$count)), variable_get('video_image_thumbnailer_options', '-ss %id*%interval -i %videofile -vframes 1 %thumbfile')); + // ffmpeg -ss $i*$interval -i intro.mov -vframes 1 -s 320x240 thumb_$i.jpg + //ffmpeg -i superstunt_8uiarzrh.mp4 -r 0.1 -ss 00:00:5 -f image2 img/images%02d.png + ////ffmpeg -i superstunt_8uiarzrh.mp4 -r 0.05 -ss 00:00:5 -f image2 img/images%1d.jpg + // executes the command + $command = "$tnail $options"; + ob_start(); + passthru($command." 2>&1", $tnail_return); + $tnail_output = ob_get_contents(); + ob_end_clean(); + if (!file_exists($thumbfile)) { + $error_param = array( + '%file' => $thumbfile, + '%cmd' => $command, + '%out' => $tnail_output, + ); + $error_msg = t("error generating thumbnail for video: generated file %file does not exist.<br />Command Executed:<br />%cmd<br />Command Output:<br />%out", $error_param); + // let's log this + watchdog('video_ffmpeg',$error_msg, array(), WATCHDOG_ERROR); + } + } + // Begin building file object. + //TODO : use file_munge_filename() + $file = new stdClass(); + $file->uid = $user->uid; + $file->status = FILE_STATUS_TEMPORARY; + $file->filename = trim("video-thumb-for-$fid-$i.png"); + $file->filepath = $thumbfile; + $file->filemime = file_get_mimetype("video-thumb-for-$fid-$i.png"); + $file->filesize = filesize($thumbfile); + $file->timestamp = time(); + $files[] = $file; + } + return $files; +} + +/** + * Implementing hook_chcek_exepath() on inc + * To check the the path is executable or not + * @param <type> path to check + * @return bool TRUE/FALSE + */ +function ffmpeg_check_exe_path($path=NULL) { + if (!$path) { + $path = variable_get('video_transcoder_path', '/usr/bin/ffmpeg'); + } + if (function_exists('is_executable')) { + $test = 'is_executable'; + } else { + $test = 'file_exists'; + } + return $test($path); +} + +/** + * Implementing hook_auto_convert(); + * @param <type> $job + */ +function ffmpeg_auto_convert(&$job) { + $videofile = escapeshellarg($job->filepath); // escape file name for safety + $convfile = tempnam(file_directory_temp(), 'video-rendering'); + $audiobitrate = variable_get('video_ffmpeg_helper_auto_cvr_audio_bitrate', 64); + $videobitrate = variable_get('video_ffmpeg_helper_auto_cvr_video_bitrate', 200); + $size = _video_render_get_size(); + $converter = variable_get('video_transcoder_path', '/usr/bin/ffmpeg'); + + $options = preg_replace(array('/%videofile/', '/%convertfile/', '/%audiobitrate/', '/%size/', '/%videobitrate/'), + array($videofile, $convfile, $audiobitrate, $size, $videobitrate), + variable_get('video_ffmpeg_helper_auto_cvr_options', + '-y -i %videofile -f flv -ar 22050 -ab %audiobitrate -s %size -b %videobitrate -qscale 1 %convertfile')); + + // set to the converted file output + $job->convfile = $convfile; + + $command = VIDEO_RENDERING_NICE . " $converter $options"; + + //print('executing ' . $command); die; + watchdog('video_render', 'executing: ' . $command, array(), WATCHDOG_DEBUG); +// watchdog('video_render', 'Starting : ' . time()); + //execute the command + ob_start(); + passthru($command." 2>&1", $command_return); + $command_output = ob_get_contents(); + ob_end_clean(); +// watchdog('video_render', 'Completed'); + //print $command_output; + + if (!file_exists($job->convfile) || !filesize($job->convfile)) { + watchdog('video_render', 'video conversion failed. ffmpeg reported the following output: ' . $command_output, array(), WATCHDOG_ERROR); + // _video_render_set_video_encoded_fid($job->nid, $job->vid, -1); + // _video_render_job_change_status($job->nid, $job->vid, VIDEO_RENDERING_FAILED); + } + else { + $file_name = basename($job->filename . ".flv"); + $file = new stdClass(); + $file->uid = $job->uid; + $file->status = FILE_STATUS_PERMANENT; + $file->filename = basename($file_name); + $file->filepath = $job->convfile; + $file->filemime = file_get_mimetype($file_name); + $file->filesize = filesize($job->convfile); + $file->timestamp = time(); + + $job->converted = $file; + } +} + + +/** + * Calculate the converted video size basing on the width set on administration. + * Aspect ration is maintained. + */ +function _video_render_get_size() { + return variable_get('video_ffmpeg_width', 640) . 'x' . variable_get('video_ffmpeg_height', 480); +}
\ No newline at end of file diff --git a/plugins/ffmpeg_wrapper.inc b/plugins/ffmpeg_wrapper.inc new file mode 100644 index 0000000..228d8ce --- /dev/null +++ b/plugins/ffmpeg_wrapper.inc @@ -0,0 +1,406 @@ +<?php +//$Id$ + +/** + * @file + * Provide a api for video conversion and auto thumbnailing using ffmpeg. + * + * You must have ffmpeg_wrapper module installed in order to use this + * + * @author Heshan Wanigasooriya <heshan at heidisoft.com, heshanmw at gmail dot com> + */ + +/** + * Define some constants + */ +defined('VIDEO_RENDERING_PENDING') + or define('VIDEO_RENDERING_PENDING', 1); +defined('VIDEO_RENDERING_ACTIVE') + or define('VIDEO_RENDERING_ACTIVE', 5); +defined('VIDEO_RENDERING_COMPLETE') + or define('VIDEO_RENDERING_COMPLETE', 10); +defined('VIDEO_RENDERING_FAILED') + or define('VIDEO_RENDERING_FAILED', 20); + +// nice value to append at the beginning of the command +defined('VIDEO_RENDERING_NICE') + or define('VIDEO_RENDERING_NICE', 'nice -n 19'); + + +// TODO : add cron API to video module +function ffmpeg_wrapper_cron() { + global $base_url; + + if(variable_get('video_ffmpeg_helper_auto_cvr_cron', true)) { + exec("php video_scheduler.php $base_url > /dev/null &"); + } +} + + +/** + * Get some informations from the video file + */ +function ffmpeg_wrapper_get_video_info($vidfile) { + static $ffmpeg_info; + $fid = $vidfile['fid']; + // $command_output = cache_get($fid); + // if(empty($command_output)) { + // escape file name for safety + $file = escapeshellarg($vidfile['filepath']); + // create the full command to execute + $command = variable_get('video_transcoder_path', '/usr/bin/ffmpeg') . ' -i ' . $file; + + //execute the command + ob_start(); + passthru($command." 2>&1", $command_return); + $command_output = ob_get_contents(); + ob_end_clean(); + + // cache the result for further calls + // $ffmpeg_info[$vidfile['fid']] = $command_output; + // cache_set($vidfile['fid'], $command_output); + // } + + return $command_output; +} + + +/** + * Return the video resolution + */ +function ffmpeg_wrapper_auto_resolution(&$vidfile) { + + if(!variable_get('video_ffmpeg_helper_auto_resolution', false)) { + + // call ffmpeg -i + $filepath = escapeshellarg($vidfile['filepath']); + $ffmpeg_output = ffmpeg_wrapper_file_data($filepath); + + // get resolution + $pattern = '/Video: .*, ([0-9]{2,4}x[0-9]{2,4})/'; + preg_match_all($pattern, $ffmpeg_output, $matches, PREG_PATTERN_ORDER); + $resolution = $matches[1][0]; + + return explode("x", $resolution); + } + return null; +} + + +/** + * Return the playtime seconds of a video + */ +function ffmpeg_wrapper_auto_playtime($file) { + + if(!variable_get('video_ffmpeg_helper_auto_playtime', false)) { + + // call ffmpeg -i + $ffmpeg_output = ffmpeg_wrapper_get_video_info($file); + + // get playtime + $pattern = '/Duration: ([0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9])/'; + preg_match_all($pattern, $ffmpeg_output, $matches, PREG_PATTERN_ORDER); + $playtime = $matches[1][0]; + + // ffmpeg return lenght as 00:00:31.1 Let's get playtime from that + $hmsmm = explode(":", $playtime); + + $tmp = explode(".", $hmsmm[2]); + $seconds = $tmp[0]; + + $hours = $hmsmm[0]; + $minutes = $hmsmm[1]; + + return $seconds + ($hours * 3600) + ($minutes * 60); + } +} + +/** + * Generates a thumbnail from the video file + * Implementing hook_auto_thumbnail on inc + * + * @param $vidfile + * object with element information + * + * @return + * a drupal file objects + */ +function ffmpeg_wrapper_auto_thumbnail($vidfile) { + global $user; + $uploaded_file = $vidfile; + $fid = $uploaded_file["fid"]; + + // are we debugging? + // escape the filename for safety + $videofile = escapeshellarg($uploaded_file['filepath']); + $thumb_path = variable_get('video_thumb_path', 'video_thumbs'); + //files will save in files/video_thumbs/#fileId folder + $tmp = file_directory_path(). '/' . $thumb_path . '/' . $fid; + // Ensure the destination directory exists and is writable. + $directories = explode('/', $tmp); + // array_pop($directories); // Remove the file itself. + // Get the file system directory. + $file_system = file_directory_path(); + foreach ($directories as $directory) { + $full_path = isset($full_path) ? $full_path . '/' . $directory : $directory; + // Don't check directories outside the file system path. + if (strpos($full_path, $file_system) === 0) { + field_file_check_directory($full_path, FILE_CREATE_DIRECTORY); + } + } + $count = variable_get('no_of_video_thumbs', 5); + // set file path + $filepath = $vidfile['filepath']; + // calling ffmpeg_wrapper_file_data function + $file_data = ffmpeg_wrapper_file_data($filepath); + $duration = $file_data['duration']; + $files = NULL; + for($i = 1; $i <= $count; $i++) { + // get ffmpeg configurations + $seek = ($duration/$count) * $i; + $thumbfile = $tmp . "/video-thumb-for-$fid-$i.png"; + //skip files already exists, this will save ffmpeg traffic + if (!is_file($thumbfile)) { +// $tnail = variable_get('video_transcoder_path', '/usr/bin/ffmpeg'); + $options = preg_replace(array('/%videofile/', '/%thumbfile/', '/%seek/'), array($videofile, $thumbfile, $seek), variable_get('video_ffmpeg_thumbnailer_options', '-i %videofile -an -y -f mjpeg -ss %seek -vframes 1 %thumbfile')); + // executes the command + $tnail_output = ffmpeg_wrapper_run_command($options, $error_check = true, $path = ''); +// $command = "$tnail $options"; +// ob_start(); +// passthru($command." 2>&1", $tnail_return); +// $tnail_output = ob_get_contents(); +// ob_end_clean(); + if (!file_exists($thumbfile)) { + $error_param = array( + '%file' => $thumbfile, + '%cmd' => $options, + '%out' => $tnail_output, + ); + $error_msg = t("error generating thumbnail for video: generated file %file does not exist.<br />Command Executed:<br />%cmd<br />Command Output:<br />%out", $error_param); + // let's log this + watchdog('video_ffmpeg',$error_msg); + } + } + // Begin building file object. + //TODO : use file_munge_filename() + $file = new stdClass(); + $file->uid = $user->uid; + $file->status = FILE_STATUS_TEMPORARY; + $file->filename = trim("video-thumb-for-$fid-$i.png"); + $file->filepath = $thumbfile; + $file->filemime = file_get_mimetype("video-thumb-for-$fid-$i.png"); + $file->filesize = filesize($thumbfile); + $file->timestamp = time(); + $files[] = $file; + } + return $files; +} + +/** + * Implementing hook_chcek_exepath() on inc + * To check the the path is executable or not + * @param <type> path to check + * @return bool TRUE/FALSE + */ +function ffmpeg_wrapper_check_exe_path($path = NULL) { + return ffmpeg_wrapper_executable(); +} + +/** + * Implementing hook_auto_convert(); + * @param <type> $job + */ +//function ffmpeg_wrapper_auto_convert(&$job) { +// $videofile = escapeshellarg($job->filepath); // escape file name for safety +// $convfile = tempnam(file_directory_temp(), 'video-rendering'); +// $audiobitrate = variable_get('video_ffmpeg_helper_auto_cvr_audio_bitrate', 64); +// $videobitrate = variable_get('video_ffmpeg_helper_auto_cvr_video_bitrate', 200); +// $size = _video_render_get_size(); +//// $converter = variable_get('video_transcoder_path', '/usr/bin/ffmpeg'); +// +// $options = preg_replace(array('/%videofile/', '/%convertfile/', '/%audiobitrate/', '/%size/', '/%videobitrate/'), +// array($videofile, $convfile, $audiobitrate, $size, $videobitrate), +// variable_get('video_ffmpeg_helper_auto_cvr_options', +// '-y -i %videofile -f flv -ar 22050 -ab %audiobitrate -s %size -b %videobitrate -qscale 1 %convertfile')); +// +// // set to the converted file output +// $job->convfile = $convfile; +// +// // run conversion commands from ffmpeg_wrapper module +// $command_output = ffmpeg_wrapper_run_command($options, $error_check = true, $path = ''); +// +//// $command = VIDEO_RENDERING_NICE . " $converter $options"; +// +// //print('executing ' . $command); die; +// watchdog('video_render', 'executing: ' . $options); +//// watchdog('video_render', 'Starting : ' . time()); +// //execute the command +//// ob_start(); +//// passthru($command." 2>&1", $command_return); +//// $command_output = ob_get_contents(); +//// ob_end_clean(); +//// watchdog('video_render', 'Completed'); +// //print $command_output; +// +// if (!file_exists($job->convfile) || !filesize($job->convfile)) { +// watchdog('video_render', 'video conversion failed. ffmpeg reported the following output: ' . $command_output); +// // _video_render_set_video_encoded_fid($job->nid, $job->vid, -1); +// // _video_render_job_change_status($job->nid, $job->vid, VIDEO_RENDERING_FAILED); +// } +// else { +// $file_name = basename($job->filename . ".flv"); +// $file = new stdClass(); +// $file->uid = $job->uid; +// $file->status = FILE_STATUS_PERMANENT; +// $file->filename = basename($file_name); +// $file->filepath = $job->convfile; +// $file->filemime = file_get_mimetype($file_name); +// $file->filesize = filesize($job->convfile); +// $file->timestamp = time(); +// +// $job->converted = $file; +// } +//} + + +/** + * This runs FFmpeg based on the form data passed into it. + * @param string $input_file + * path to the file to operate on + * @param array $params + * configuration options in the format set in the ffmpeg_wrapper_configuration_form() + * @param string $output_file_path + * where to place the file, assumes same dir as $input_file. No trailing slash + * @param object $ffmpeg_object + * contains debug information that calling functions can utilize + * @return string + * + */ +function ffmpeg_wrapper_auto_convert(&$job) { + + $ffmpeg_object = new stdClass(); + // check configuration are pass of then use global $conf + if(empty ($params)){ + global $conf; + $params = $conf; + } + + $input_file = $job->filepath; // escape file name for safety + + // first error check, make sure that we can decode this kind of file + if (! ffmpeg_wrapper_can_decode($input_file)) { + $message = 'FFmpeg Wrapper can not decode this file: !file'; + $variables = array('!file' => l($input_file, file_create_url($input_file))); + watchdog('video_render', $message, $variables, WATCHDOG_ERROR); + $ffmpeg_object->errors[] = $message; + return false; + } + + // build the output file path if we don't have one. Use the output type as the extension. + $output_file = file_create_filename(basename($input_file) .'.'. $params['ffmpeg_output_type'], ($output_file_path ? $output_file_path : dirname($input_file))); + + // did the admin define a specific FFmpeg comand to run? + // we only run what the admin specified + if ($params['ffmpeg_video_custom']) { + $options[] = str_replace(array('%in_file', '%out_file'), array($input_file, $output_file), $params['ffmpeg_video_custom_command']); + } + // build a standard configuration + else { + // build the ffmpeg command structure out + $options = array(); + + // input file + $options[] = "-i '". $input_file ."'"; + + // build the watermark config + if ($params['ffmpeg_video_wm']) { + $options[] = "-vhook '". ffmpeg_wrapper_path_to_vhook('watermark.so') ." -f ". $params['ffmpeg_video_wm_file'] ."'"; + } + + // build the audio config + if ($params['ffmpeg_audio_advanced']) { + + // use a specifc codec? + if ($params['ffmpeg_audio_acodec']) { + $options[] = '-acodec '. $params['ffmpeg_audio_acodec']; + } + + // use a specific sample rate? + if ($params['ffmpeg_audio_ar'] ) { + $options[] = '-ar '. $params['ffmpeg_audio_ar']; + } + + // use a specific bit rate? + if ($params['ffmpeg_audio_ab']) { + $options[] = '-ab '. $params['ffmpeg_audio_ab']; + } + } + + // build the video config + if ($params['ffmpeg_video_advanced']) { + + // is codec set? + if ($params['ffmpeg_video_vcodec']) { + $options[] = '-vcodec '. $params['ffmpeg_video_vcodec']; + } + + // is frame size set? + if ($params['ffmpeg_video_size']) { + $options[] = '-s '. $params[$params['ffmpeg_video_size'] == 'other' ? 'ffmpeg_video_size_other' : 'ffmpeg_video_size']; + } + + // is the bit rate set? + if ($params['ffmpeg_video_br']) { + $options[] = '-b '. $params['ffmpeg_video_br']; + } + + // is frame rate set? + if ($params['ffmpeg_video_fps']) { + $options[] = '-r '. $params['ffmpeg_video_fps']; + } + } + + // implement truncating + if ($params['ffmpeg_time_advanced']) { + $options[] = '-t '. $params['ffmpeg_time']; + } + + // add the output file + $options[] = "'". $output_file ."'"; + } + + $ffmpeg_object->command = implode(" ", $options); + + // run ffmpeg with error checking + if (! $success = ffmpeg_wrapper_run_command($ffmpeg_object->command)) { + watchdog('video_render', 'video conversion failed. ffmpeg reported the following output: ' . $success); + return false; + } + + // successful convert, make a note in the log + $message = 'FFmpeg converted this file: @file'; + $message .= '<br />'. 'FFmpeg ran this command: <br /><pre> !command </pre>'; + $variables = array('@file' => $output_file, '!command' => $ffmpeg_object->command); + watchdog('video_render', $message, $variables, WATCHDOG_NOTICE); + + $ffmpeg_object->output_file = $output_file; + + if (!file_exists($output_file) || !filesize($output_file)) { + watchdog('video_render', 'video conversion failed. ffmpeg reported the following output: ' . $command_output); + // _video_render_set_video_encoded_fid($job->nid, $job->vid, -1); + // _video_render_job_change_status($job->nid, $job->vid, VIDEO_RENDERING_FAILED); + } + else { + $file_name = basename($output_file); + $file = new stdClass(); + $file->uid = $job->uid; + $file->status = FILE_STATUS_PERMANENT; + $file->filename = basename($file_name); + $file->filepath = $output_file; + $file->filemime = file_get_mimetype($file_name); + $file->filesize = filesize($output_file); + $file->timestamp = time(); + + $job->converted = $file; + } +} diff --git a/plugins/video_ffmpeg_helper/README.txt b/plugins/video_ffmpeg_helper/README.txt deleted file mode 100644 index fb63547..0000000 --- a/plugins/video_ffmpeg_helper/README.txt +++ /dev/null @@ -1,47 +0,0 @@ -FFMPEG Video.module helper -========================== - -See : http://video.heidisoft.com/docs/users-guide-26 - -This helper module facilitates uploading new videos using the video module. It -features a batch processing queue for videos to be transcoded and automatic -thumbnail generation. - -IMPORTANT: the ffmpeg helper currently only works on unix based environment. It currently doesn't support Windows based servers. - -Install instructions --------------------- - -1. Activate the video_ffmpeg_helper module -2. Setup it's advanced options to meet your needs -3. Move (or symlink) video_render.php and video_scheduler.php into your Drupal root -4. Edit the first "Configuration" code lines of those files to meet your needs (IMPORTANT: path to ffmpeg executable on your server) -5. Check permissions of the files and folders (/tmp/video and files/* must be writable by the webserver or the user executling the cron job) -6. You now have two options to execute the video_scheduler.php script: - - 6.1 (default) Enable the execution of video_scheduler.php using standard drupal cron. - GMM: 07/23/2009 Note: ** Do not use this method if your Apache server is running with suPHP ** - As of this writing, suPHP will cause the Drupal cron to loop infinitely and no video - will be rendered. In this case crontab should be used instead of Drupal cron! - - 6.2 Schedule the execution of video_scheduler.php using unix cron - - The crontab should look something like this: - - # m h dom mon dow user command - */20 * * * * www-data cd /absolute/path/to/drupal/ ; php video_scheduler.php http://www.example.com/path_to_drupal - - This will execute the video_scheduler every 20 minutes. - - Note that the video_scheduler doesn't produce any output and cannot be called - from the web. It will, however, put some information in the watchdog. - - - -Troubleshooting ------------------------- - -Configuring and installing ffmpeg in a web server environment might be pretty difficult. In order to help you troubleshoot the transcoding process the ffmpeg helper puts debugging informations on the drupal logs. I strongly suggest to have a look at them if you are experiencing problems with transcoding. - -The ffmpeg puts in the drupal logs the commands it was trying to execute. You might try to rerun them on a command shell in order understand what went wrong. - diff --git a/plugins/video_ffmpeg_helper/video_ffmpeg_helper.info b/plugins/video_ffmpeg_helper/video_ffmpeg_helper.info deleted file mode 100644 index 9706e09..0000000 --- a/plugins/video_ffmpeg_helper/video_ffmpeg_helper.info +++ /dev/null @@ -1,8 +0,0 @@ -;$Id$ -name = Video ffmpeg Helper -description = Provide apis for ffmpeg. Simplify video nodes creation. -dependencies[] = video -dependencies[] = video_upload -package = "Video" -core = 6.x - diff --git a/plugins/video_ffmpeg_helper/video_ffmpeg_helper.install b/plugins/video_ffmpeg_helper/video_ffmpeg_helper.install deleted file mode 100644 index aa76914..0000000 --- a/plugins/video_ffmpeg_helper/video_ffmpeg_helper.install +++ /dev/null @@ -1,89 +0,0 @@ -<?php -//$Id$ -/** - * @file - * Provide installation functions for video_ffmpeg_helper.module . - * - * @author Heshan Wanigasooriya <heshan at heidisoft dot com> - * <heshanmw at gmail dot com> - * @todo - */ - -/** - * Implementation of hook_schema(). - */ -function video_ffmpeg_helper_schema() { - $schema['video_rendering'] = array( - 'description' => t('Store video transcoding queue'), - 'fields' => array( - 'vid' => array( - 'description' => t('video id : primary key'), - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, - ), - 'nid' => array( - 'description' => t('Node id : index of the {node}.nid'), - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, - ), - 'origfile' => array( - 'description' => t('original file path'), - 'type' => 'text', - 'not null' => TRUE, - 'default' => '', - ), - 'pid' => array( - 'description' => t('Pid'), - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, - ), - 'status' => array( - 'description' => t('status of the transcoding'), - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, - ), - 'started' => array( - 'description' => t('Started transcodings'), - 'type' => 'int', - 'not null' => TRUE, - 'default' => 0, - ), - 'completed' => array( - 'description' => t('Transcoding completed'), - 'type' => 'int', - 'not null' => TRUE, - 'default' => 0, - ), - ), - 'indexes' => array( - 'nid' => array('nid'), - ), - 'primary key' => array('vid'), - ); - - return $schema; -} - - -/** - * Implementation of hook_install(). - */ -function video_ffmpeg_helper_install() { - // Create tables. - drupal_install_schema('video_ffmpeg_helper'); -} - -/** - * Implementation of hook_uninstall(). - */ -function video_ffmpeg_helper_uninstall() { - drupal_uninstall_schema('video_ffmpeg_helper'); -}
\ No newline at end of file diff --git a/plugins/video_ffmpeg_helper/video_ffmpeg_helper.module b/plugins/video_ffmpeg_helper/video_ffmpeg_helper.module deleted file mode 100644 index 0adb3de..0000000 --- a/plugins/video_ffmpeg_helper/video_ffmpeg_helper.module +++ /dev/null @@ -1,539 +0,0 @@ -<?php -//$Id$ -/** - * @file - * Provide some api for use ffmpeg. Simplify video nodes creation. - * - * @author Fabio Varesano <fvaresano at yahoo dot it> - * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw at gmail dot com> - * @todo - * 1. Remove modules and user existing ffmpeg wrapper module - */ - -/** - * Define some constants -*/ -define('VIDEO_RENDERING_PENDING', 1); -define('VIDEO_RENDERING_ACTIVE', 5); -define('VIDEO_RENDERING_COMPLETE', 10); -define('VIDEO_RENDERING_FAILED', 20); - - - -function video_ffmpeg_helper_cron() { - global $base_url; - - if(variable_get('video_ffmpeg_helper_auto_cvr_cron', true)) { - exec("php video_scheduler.php $base_url > /dev/null &"); - } -} - - -/** - * Implementatio of hook_perm() -*/ -function video_ffmpeg_helper_perm() { - return array('bypass automatic video conversion'); -} - - -/** - * Implementation of hook_help(). - */ -function video_ffmpeg_helper_help($path, $arg) { - switch ($path) { - case 'admin/modules#description': - return t('Enable ffmpeg support for video module.'); - } -} - -/** - * Implementation of hook_menu() - */ -function video_ffmpeg_helper_menu() { - $items = array(); - $items['admin/settings/video/ffmpeg_helper'] = array( - 'title' => 'Video ffmpeg Helper', - 'description' => 'Administer video_ffmpeg_helper module settings', - 'page callback' => 'drupal_get_form', - 'page arguments' => array('video_ffmpeg_helper_admin_settings'), - 'access arguments' => array('administer site configuration'), - 'type' => MENU_NORMAL_ITEM, - ); - - return $items; -} - -/** - * Validation for settings form - */ -function video_ffmpeg_helper_admin_settings_validate($form, &$form_state) { - if (variable_get('video_image_auto_thumbnail', 0)) { - if (!_video_ffmpeg_helper_check_exe_path($form_state['values']['video_ffmpeg_helper_ffmpeg_path'])) { - form_set_error('video_ffmpeg_helper_ffmpeg_path', t('Set correct path for ffmpeg')); - } - if (!is_numeric($form_state['values']['video_ffmpeg_helper_auto_thumbnail_seek'])) { - form_set_error('video_ffmpeg_helper_auto_thumbnail_seek', t('Seek time must be an integer')); - } - $options = $form_state['values']['video_ffmpeg_helper_thumbnailer_options']; - if (!strstr($options, '%videofile') || !strstr($options, '%thumbfile')) { - form_set_error('video_ffmpeg_helper_thumbnailer_options', t('Thumbnail options must contain mandatory arguments %videofile and %thumbfile')); - } - } -} - - -/** - * Settings form - */ -function video_ffmpeg_helper_admin_settings() { - // let's execute after video_image and video_upload - if (module_exists('video_image') && variable_get('video_image_auto_thumbnail', 0)) { - $weight = db_result(db_query("SELECT weight FROM {system} WHERE name='video_image'")); - } else { // video_image might be disabled.. execute after video_upload - $weight = db_result(db_query("SELECT weight FROM {system} WHERE name='video_upload'")); - } - // update the weight in the system table - db_query("UPDATE {system} SET weight=".($weight+1)." WHERE name='video_ffmpeg_helper'"); - - $form['video_ffmpeg_helper_ffmpeg_path'] = array( - '#type' => 'textfield', - '#title' => t('FFmpeg executable path'), - '#description' => t('Set the full path to the ffmpeg executable here.'), - '#default_value' => variable_get('video_ffmpeg_helper_ffmpeg_path', '/usr/bin/ffmpeg'), - ); - - - $form['video_ffmpeg_helper_auto_resolution'] = array( - '#type' => 'checkbox', - '#title' => t('Enable resolution helper'), - '#description' => t('Use ffmpeg Helper to automatically get the resolution from the video.'), - '#default_value' => variable_get('video_ffmpeg_helper_auto_resolution', false), - ); - - $form['video_ffmpeg_helper_auto_playtime'] = array( - '#type' => 'checkbox', - '#title' => t('Enable playtime helper'), - '#description' => t('Use ffmpeg Helper to automaticcally get the playtime from the video.'), - '#default_value' => variable_get('video_ffmpeg_helper_auto_playtime', false), - ); - - $form['autothumb'] = array( - '#type' => 'fieldset', - '#title' => t('Automatic video thumbnailing'), - '#collapsible' => TRUE, - '#collapsed' => TRUE - ); - $form['autothumb']['video_ffmpeg_helper_thumbnailer_options'] = array( - '#type' => 'textfield', - '#title' => t('Video thumbnailer options'), - '#description' => t('Provide the options for the thumbnailer. Available argument values are: ').'<ol><li>'.t('%videofile (the video file to thumbnail)').'<li>'.t('%thumbfile (a newly created temporary file to overwrite with the thumbnail)').'<li>'.t('%seek (seconds to seek into video before extracting image).').'</ol>'.t('Only the first two are mandatory. For example, older versions of ffmpeg should use something like: !old While newer versions should use something like: !new', array('!old' => "<div>-i %videofile -y -an -f mjpeg -ss %seek -t 0.001 %thumbfile</div>", '!new' => '<div>-i %videofile -an -y -f mjpeg -ss %seek -vframes 1 %thumbfile</div>')), - '#default_value' => variable_get('video_ffmpeg_helper_thumbnailer_options', '-i %videofile -an -y -f mjpeg -ss %seek -vframes 1 %thumbfile'), - ); - $form['autothumb']['video_ffmpeg_helper_auto_thumbnail_seek'] = array( - '#type' => 'textfield', - '#title' => t('Video seek offset for thumbnail'), - '#description' => t('Time in seconds to seek into video before extracting the thumbnail'), - '#default_value' => variable_get('video_ffmpeg_helper_auto_thumbnail_seek', 2), - ); - // automatic video conversion settings - $form['autoconv'] = array( - '#type' => 'fieldset', - '#title' => t('Automatic video conversion'), - '#collapsible' => TRUE, - '#collapsed' => TRUE - ); - $form['autoconv']['video_ffmpeg_helper_auto_cvr_cron'] = array( - '#type' => 'checkbox', - '#title' => t('Use drupal cron for autoconversion'), - '#description' => t('Click this if you want to execute the video_scheduler.php from the standard drupal cron. If you want to use distributed encodings you might want to disable this.'), - '#default_value' => variable_get('video_ffmpeg_helper_auto_cvr_cron', true), - ); - $form['autoconv']['video_ffmpeg_helper_auto_conversion'] = array( - '#type' => 'checkbox', - '#title' => t('Auto conversion for videos'), - '#description' => t('If set up correctly, this will auto-convert each uploaded video to the configured format.') . '<br />' . t("IMPORTANT: you will need the video_render.php correctly configured and run by cron. See README.txt in the video_ffmpeg_helper folder or <a title='User Guide' href='http://video.heidisoft.com/docs/users-guide-26'>click here</a> for more informations."), - '#default_value' => variable_get('video_ffmpeg_helper_auto_conversion', false), - ); - $form['autoconv']['video_ffmpeg_helper_auto_cvr_width'] = array( - '#type' => 'textfield', - '#title' => t('Video rendering width'), - '#description' => t('The width of the converted video. The height will be automatically calculated to maintain aspect ratio.'), - '#size' => 3, - '#maxlength' => 3, - '#default_value' => variable_get('video_ffmpeg_helper_auto_cvr_width', 400), - ); - $form['autoconv']['video_ffmpeg_helper_auto_cvr_video_bitrate'] = array( - '#type' => 'textfield', - '#title' => t('Video bitrate'), - '#description' => t('The video bitrate in bit/s of the converted video.'), - '#size' => 10, - '#maxlength' => 10, - '#default_value' => variable_get('video_ffmpeg_helper_auto_cvr_video_bitrate', 200000), - ); - $form['autoconv']['video_ffmpeg_helper_auto_cvr_audio_bitrate'] = array( - '#type' => 'textfield', - '#title' => t('Audio bitrate'), - '#description' => t('The audio bitrate in bit/s of the converted video.'), - '#size' => 10, - '#maxlength' => 10, - '#default_value' => variable_get('video_ffmpeg_helper_auto_cvr_audio_bitrate', 64000), - ); - $form['autoconv']['advanced'] = array( - '#type' => 'fieldset', - '#title' => t('Advanced settings'), - '#collapsible' => TRUE, - '#collapsed' => TRUE - ); - $form['autoconv']['advanced']['video_ffmpeg_helper_auto_cvr_options'] = array( - '#type' => 'textfield', - '#title' => t('Video converter options'), - '#description' => t('Provide the ffmpeg options to configure the video conversion. Available argument values are: ').'<ul>'. - '<li>'.t('%videofile (the video file to convert)'). - '<li>'.t('%convertfile (a newly created file to store the converted file)'). - '<li>'.t('%size (video resolution of the converted file)'). - '</ul>'. - t('For further informations refer to the !ffmpegdoc', array('!ffmpegdoc' => l(t('Official FFMpeg documentation.'), 'http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html', array('fragment' => TRUE)))), - '#default_value' => variable_get('video_ffmpeg_helper_auto_cvr_options', '-y -i %videofile -f flv -ar 22050 -ab %audiobitrate -s %size -b %videobitrate -qscale 1 %convertfile'), - ); - return system_settings_form($form); -} - - -/** - * Implementation of hook_form_alter() - */ -function video_ffmpeg_helper_form_alter(&$form, &$form_state, $form_id) { - - $node = $form['#node']; - - //print_r($form); - if($form_id == 'video_node_form') { - - if (function_exists('_image_check_settings')) { - _image_check_settings(); - $form['#attributes'] = array("enctype" => "multipart/form-data"); - - } - - - if($node->vtype == 'upload' && user_access('bypass automatic video conversion') && variable_get('video_ffmpeg_helper_auto_conversion', false)) { - $form['video']['video_ffmpeg_helper_convertion_bypass'] = array( - '#type' => 'checkbox', - '#title' => t('Bypass automatic video conversion'), - '#description' => t('Check this if you want that your video is submitted as it is, without being converted.'), - '#default_value' => $node->video_ffmpeg_helper_convertion_bypass, // for node previews - ); - } - } - -} - - -/** - * Implementation of hook_nodeapi() - * - * NOTE: video_ffmpeg nodeapi is executed after video_player rendering - */ -function video_ffmpeg_helper_nodeapi(&$node, $op, $teaser) { - if($node->type == 'video' && $node->vtype == 'upload') { - switch ($op) { - case 'load': - // let's check if we have a valid encoded video - if(isset($node->serial_data['video_encoded_fid']) && - is_numeric($node->serial_data['video_encoded_fid']) && - $node->serial_data['video_encoded_fid'] > 0) { - // this video have an encoded version. let's use it insted of the original one. We can safely do this as video_ffmpeg_helper will be scheduled by Drupal after video and video_upload modules - $output = array(); - $file = _video_upload_get_file($node->serial_data['video_encoded_fid']); - $output['current_video_rendered_file'] = $file; - $output['vidfile'] = file_create_url($file->filepath); - // set the filesize - $output['size'] = $file->filesize; - - return $output; - } - //print $node->serial_data['video_encoded_fid']; die; - - if(variable_get('video_ffmpeg_helper_auto_resolution', false) || variable_get('video_ffmpeg_helper_auto_playtime', false)) { - _video_ffmpeg_helper_get_video_info($node); - } - break; - - case 'presve': - break; - - case 'update': - /* delete the already existing batch script, we'll recreate it below */ - if(variable_get('video_ffmpeg_helper_auto_conversion', false)) { - db_query('DELETE FROM {video_rendering} WHERE vid = %d AND nid = %d', $node->vid, $node->nid); - } - /* FALLTHROUGH */ - case 'insert': - if(variable_get('video_ffmpeg_helper_auto_conversion', false) && $node->new_video_upload_file_fid > 0 && !$node->video_ffmpeg_helper_convertion_bypass) { - // add rendering job to queue - _video_ffmpeg_helper_add_rendering($node); - } - - break; - - case 'prepare': - ; // for future uses - break; - - case 'view': - if($teaser == FALSE) { - if(_video_ffmpeg_helper_is_being_processed($node)) { - // if the video is still being processed we display a "rendering in progress" message - $node->content['video_player']['#value'] = theme('video_ffmpeg_helper_inprogress', $node); - } - else if($node->serial_data['video_encoded_fid'] == -1) { // conversion failed - $node->content['video_player']['#value'] = theme('video_ffmpeg_helper_encoding_failed', $node); - } - } - //print_r($node); die; - break; - - case 'alter': - ; // for future uses - break; - - case 'delete': - db_query('DELETE FROM {video_rendering} WHERE vid = %d AND nid = %d', $node->vid, $node->nid); - if($node->serial_data['video_encoded_fid'] > 0) { - $file = _video_upload_get_file($node->serial_data['video_encoded_fid']); - _video_upload_delete_file($file); - } - break; - - } - } -} - - -/** - * Add a video conversion rendering process to the queue -*/ -function _video_ffmpeg_helper_add_rendering(&$node) { - $file = _video_upload_get_file($node->new_video_upload_file_fid); - //print_r($node); die; - db_query('INSERT INTO {video_rendering} (vid, nid, origfile, pid, status, started, completed) VALUES (%d, %d, "%s", %d, %d, %d, %d)', $node->vid, $node->nid, $file->filepath, 0, VIDEO_RENDERING_PENDING, 0, 0); - - drupal_set_message(t('Video submission queued for processing. Please wait: our servers are preparing your video for web displaying.')); - - // let's add the rendering in progress video - $node->vidfile = variable_get('video_ffmpeg_helper_auto_cvr_busy_video_path', 'busy.flv'); - db_query('UPDATE {video} SET vidfile = "%s" WHERE nid=%d AND vid=%d', $node->vidfile, $node->nid, $node->vid); - -} - - -/** - * Returns true if the video is being encoded or queeded -*/ -function _video_ffmpeg_helper_is_being_processed($node) { - $result = db_query("SELECT status FROM {video_rendering} WHERE vid = %d AND nid = %d", $node->vid, $node->nid); - $status = db_result($result); - if($status == VIDEO_RENDERING_PENDING || $status == VIDEO_RENDERING_ACTIVE) { // video is still being converted - return TRUE; - } - return FALSE; -} - - - -/** - * Get some informations from the video file -*/ -function _video_ffmpeg_helper_get_video_info(&$node, $value=null) { - static $ffmpeg_info; - - if (isset($value)) { - $ffmpeg_info[$node->nid] = $value; - return; - } - - $fileobj = $node->new_video_upload_file ? $node->new_video_upload_file : _video_upload_get_file($node->new_video_upload_file_fid); - - // check if we have some info in the cache for the given node - if(isset($ffmpeg_info[$fileobj->filename])) { - return $ffmpeg_info[$fileobj->filename]; - } - - // escape file name for safety - $file = escapeshellarg($fileobj->filepath); - // create the full command to execute - $command = variable_get('video_ffmpeg_helper_ffmpeg_path', '/usr/bin/ffmpeg') . ' -i ' . $file; - - //execute the command - ob_start(); - passthru($command." 2>&1", $command_return); - $command_output = ob_get_contents(); - ob_end_clean(); - - // cache the result for further calls - $ffmpeg_info[$node->nid] = $command_output; - - return $command_output; -} - - -/** - * Return the video resolution - */ -function _video_ffmpeg_helper_auto_resolution(&$node) { - - if(variable_get('video_ffmpeg_helper_auto_resolution', false)) { - - // call ffmpeg -i - $ffmpeg_output = _video_ffmpeg_helper_get_video_info($node); - - // get resolution - $pattern = '/Video: .*, ([0-9]{2,4}x[0-9]{2,4})/'; - preg_match_all($pattern, $ffmpeg_output, $matches, PREG_PATTERN_ORDER); - $resolution = $matches[1][0]; - - return explode("x", $resolution); - } - return null; -} - - -/** - * Return the playtime seconds of a video -*/ -function _video_ffmpeg_helper_auto_playtime(&$node) { - - if(variable_get('video_ffmpeg_helper_auto_playtime', false)) { - - // call ffmpeg -i - $ffmpeg_output = _video_ffmpeg_helper_get_video_info($node); - - // get playtime - $pattern = '/Duration: ([0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9])/'; - preg_match_all($pattern, $ffmpeg_output, $matches, PREG_PATTERN_ORDER); - $playtime = $matches[1][0]; - - // ffmpeg return lenght as 00:00:31.1 Let's get playtime from that - $hmsmm = explode(":", $playtime); - - $tmp = explode(".", $hmsmm[2]); - $seconds = $tmp[0]; - - $hours = $hmsmm[0]; - $minutes = $hmsmm[1]; - - return $seconds + ($hours * 3600) + ($minutes * 60); - } -} - -/** - * Generates a thumbnail from the video file - * - * @param $node - * object with node information - * - * @return - * a drupal file object - */ -function _video_ffmpeg_helper_auto_thumbnail(&$node) { - if (!$node->new_video_upload_file || - ($node->new_video_upload_file && count($_POST) && $_POST['new_video_upload_file_fid'])) { - // we have already thumbnailed this new upload file - return NULL; - } - if (!$node->new_video_upload_file && $node->current_video_upload_file_fid) { // no new files uploaded. skipping thumnailing stuff - _video_image_thumbnail_debug(t('No new files to thumbnail')); - return NULL; - } - // gets the newly uploaded file object - $uploaded_file = $node->new_video_upload_file; - - // are we debugging? - // escape the filename for safety - $videofile = escapeshellarg($uploaded_file->filepath); - // let's create a temp filename into the drupal temp directory - $thumbfile = tempnam(file_directory_temp(), 'tnail-thumb'); - // get ffmpeg configurations - $seek = variable_get('video_ffmpeg_helper_auto_thumbnail_seek', 2); - $tnail = variable_get('video_ffmpeg_helper_ffmpeg_path', '/usr/bin/ffmpeg'); - $options = preg_replace(array('/%videofile/', '/%thumbfile/', '/%seek/'), array($videofile, $thumbfile, $seek), variable_get('video_image_thumbnailer_options', '-i %videofile -an -y -f mjpeg -ss %seek -vframes 1 %thumbfile')); - - // executes the command - $command = "$tnail $options"; - ob_start(); - passthru($command." 2>&1", $tnail_return); - $tnail_output = ob_get_contents(); - ob_end_clean(); - _video_ffmpeg_helper_get_video_info($node, $tnail_output); - - _video_image_thumbnail_debug(t('Thumbnailer command: ').$command); - _video_image_thumbnail_debug(t('Thumbnailer output: ')."<pre>\n$tnail_output\n</pre>"); - if (!file_exists($thumbfile)) { - $error_param = array( - '%file' => $thumbfile, - '%cmd' => $command, - '%out' => $tnail_output, - ); - $error_msg = t("error generating thumbnail for video: generated file %file does not exist.<br />Command Executed:<br />%cmd<br />Command Output:<br />%out", $error_param); - // let's log this - watchdog('video_ffmpeg_helper',$error_msg); - return false; - } - $file = array( - 'filename' => $uploaded_file->filename . ".video-thumb.jpg", - 'filemime' => 'image/jpeg', - 'filesize' => filesize($thumbfile), - 'filepath' => $thumbfile, - 'nid' => $node->nid, - ); - - if ($tnail_return) { - _video_image_thumbnail_debug(t('Failed to thumbnail video')); - return $false; - } - _video_image_thumbnail_debug(t('Successfully thumbnailed video')); - return (object)$file; -} - -function _video_ffmpeg_helper_check_exe_path($path=NULL) { - if (!$path) { - $path = variable_get('video_ffmpeg_helper_ffmpeg_path', '/usr/bin/ffmpeg'); - } - if (function_exists('is_executable')) { - $test = 'is_executable'; - } else { - $test = 'file_exists'; - } - return $test($path); -} - -/** - * Displays a "encoding in progress message" -*/ -function theme_video_ffmpeg_helper_inprogress($node) { - return '<div class="video-ffmpeg-helper-inprogress">'. t('This video is currently being processed. Please wait.') . '</div>'; -} - - -/** - * Display an "encoding failed" message" -*/ -function theme_video_ffmpeg_helper_encoding_failed($node) { - return '<div class="video-ffmpeg-helper-encoding-failed">'. t('The video conversion process has failed. You might want to submit a simpler video format like <em>mpeg</em> or <em>divx avi</em>.<br />If the problem persists please contact website administrators.') . '</div>'; -} - - -/** - * Implementation of hook_theme(). - */ -function video_ffmpeg_helper_theme() { - return array( - 'video_ffmpeg_helper_encoding_failed' => array( - 'arguments' => array('node' => NULL), - ), - 'video_ffmpeg_helper_inprogress' => array( - 'arguments' => array('node' => NULL), - ), - ); -} diff --git a/plugins/video_ffmpeg_helper/video_render.php b/plugins/video_ffmpeg_helper/video_render.php deleted file mode 100644 index 8aae1cb..0000000 --- a/plugins/video_ffmpeg_helper/video_render.php +++ /dev/null @@ -1,256 +0,0 @@ -<?php -//$Id$ -/** - * @file - * Renders a video. This script is called concurrently by video_scheduler.php - * This script has to be launched with "php video_render.php nid vid" - * If you are not using sites/default/settings.php as your settings file, - * add an optional parameter for the drupal site url: - * "php video_render.php nid vid http://example.com/" or - * "php video_render.php nid vid http://example.org/drupal/" - * - * @author Fabio Varesano <fvaresano at yahoo dot it> - * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw@gmail.com> - * @author Glen Marianko Twitter@demoforum <glenm at demoforum dot com> - * @todo - */ - - -/** - * video_scheduler.php configuration -*/ -// set path to the ffmpeg executable -define('VIDEO_RENDERING_FFMPEG_PATH', '/usr/bin/ffmpeg'); - -// set to the temp file path. -//IMPORTANT: the user who runs this script must have permissions to create files there. If this is not the case the default php temporary folder will be used. -define('VIDEO_RENDERING_TEMP_PATH', '/tmp/video'); - -// nice value to append at the beginning of the command -define('VIDEO_RENDERING_NICE', 'nice -n 19'); - - -/** - * video_scheduler.php configuration ends. - * DO NOT EDIT BELOW THIS LINE -*/ - -/** - * Define some constants -*/ -define('VIDEO_RENDERING_PENDING', 1); -define('VIDEO_RENDERING_ACTIVE', 5); -define('VIDEO_RENDERING_COMPLETE', 10); -define('VIDEO_RENDERING_FAILED', 20); - -if (isset($_SERVER['argv'][3])) { - $url = parse_url($_SERVER['argv'][3]); - $_SERVER['SCRIPT_NAME'] = $url['path']; - $_SERVER['HTTP_HOST'] = $url['host']; -} - -include_once('./includes/bootstrap.inc'); -//module_load_include('/includes/bootstrap.inc', 'video_render', 'includes/bootstrap'); -// -// disable error reporting for bootstrap process -error_reporting(E_ERROR); -// let's bootstrap: we will be able to use drupal apis -drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); -// enable full error reporting again -error_reporting(E_ALL); - - -// allow execution only from the command line! -if(empty($_SERVER['REQUEST_METHOD'])) { - if($_SERVER['argc'] < 3) { // check for command line arguments - watchdog('video_render', 'Incorrect parameters to the video_render.php script.', WATCHDOG_ERROR); - print t('Incorrect parameters'); - } - else { - video_render_main(); - } -} -else { - print t('This script is only executable from the command line.'); - die(); -} - -print("\n"); - -function video_render_main() { - - // get parameters passed from command line - $nid = $_SERVER['argv'][1]; - $vid = $_SERVER['argv'][2]; - - // set the status to active - _video_render_job_change_status($nid, $vid, VIDEO_RENDERING_ACTIVE); - // load the job object - $job = _video_render_load_job($nid, $vid, VIDEO_RENDERING_ACTIVE); - - if($job == NULL) { - watchdog('video_render', 'video_render.php has been called with an invalid job resource. exiting.'); - die; - } - $command = _video_render_get_command($job); - - //print('executing ' . $command); die; - watchdog('video_render', 'executing: ' . $command); - - //execute the command - ob_start(); - passthru($command." 2>&1", $command_return); - $command_output = ob_get_contents(); - ob_end_clean(); - - //print $command_output; - - if (!file_exists($job->convfile) || !filesize($job->convfile)) { - watchdog('video_render', 'video conversion failed. ffmpeg reported the following output: ' . $command_output, WATCHDOG_ERROR); - _video_render_set_video_encoded_fid($job->nid, $job->vid, -1); - _video_render_job_change_status($job->nid, $job->vid, VIDEO_RENDERING_FAILED); - } - else { - // move the video to the definitive location - $file = array( - 'filename' => basename($job->origfile . ".flv"), - 'filemime' => 'application/octet-stream', // is there something better??? - 'filesize' => filesize($job->convfile), - 'filepath' => $job->convfile, - 'nid' => $job->nid, - ); - - $file = ((object) $file); - - //print_r($file); - //$dest_dir = variable_get('video_upload_default_path', 'videos') .'/'; - // the above no more works as token supports - use dirname - $dest_dir = dirname($job->origfile) . '/'; - - if (file_copy($file, $dest_dir)) { - //$file->fid = db_next_id('{files}_fid'); - //print_r($file); - //GMM: fixed added timestamp column for completeness (otherwise 0), D6 FILE_STATUS - db_query("INSERT INTO {files} (fid, uid, filename, filepath, filemime, filesize, status, timestamp) VALUES (%d, %d, '%s', '%s', '%s', %d, %d, %d)", $file->fid, $job->uid, $file->filename, $file->filepath, $file->filemime, $file->filesize, FILE_STATUS_PERMANENT, time()); - - // to know other modules of fid - $file->fid = db_last_insert_id('files', 'fid'); - - db_query("INSERT INTO {video_upload} (vid, nid, fid) VALUES (%d, %d, %d)", $job->vid, $job->vid, $file->fid); - - // update the video table - db_query('UPDATE {video} SET vidfile = "%s", videox = %d, videoy = %d WHERE nid=%d AND vid=%d', "", $job->calculatedx, $job->calculatedy, $job->nid, $job->vid); - - // update the video_encoded_fid in video serial data - _video_render_set_video_encoded_fid($job->nid, $job->vid, $file->fid); - - _video_render_job_change_status($job->nid, $job->vid, VIDEO_RENDERING_COMPLETE); - - watchdog('video_render', 'successfully converted %orig to %dest', array('%orig' => $job->origfile, '%dest' => $file->filepath)); - - // delete the temp file - unlink($job->convfile); - } - else { - // get the username of the process owner - $ownerarray = posix_getpwuid(posix_getuid()); - $owner=$ownerarray['name']; - // get the username of the destination folder owner - $fownerarray = posix_getpwuid(fileowner($dest_dir)); - $fowner=$fownerarray['name']; - // get destination folder permissions - $perms = substr(sprintf('%o', fileperms($dest_dir)), -4); - watchdog('video_render', 'error moving video %vid_file with nid = %nid to %dir the final directory. Check folder permissions.<br />The script was run by %uname .<br />The folder owner is %fowner .<br />The folder permissions are %perms .', array('%vid_file' => $job->origfile, '%nid' => $job->nid, '%dir' => $dest_dir, '%uname' => $owner, '%fowner' => $fowner, '%perms' => $perms), WATCHDOG_ERROR); - - _video_render_set_video_encoded_fid($job->nid, $job->vid, -1); - _video_render_job_change_status($job->nid, $job->vid, VIDEO_RENDERING_FAILED); - } - } -} - - -/** - * Set the video_encoded_fid in the video table - * We store -1 as video_encoded_fid if the encoding failed -*/ -function _video_render_set_video_encoded_fid($nid, $vid, $encoded_fid) { - db_lock_table('video'); - $node = db_fetch_object(db_query("SELECT serialized_data FROM {video} WHERE nid = %d AND vid = %d", $nid, $vid)); - $node->serial_data = unserialize($node->serialized_data); - //GMM: save fid of previously encoded file - $old_fid = $node->serial_data['video_encoded_fid']; - $node->serial_data['video_encoded_fid'] = $encoded_fid; - $node->serialized_data = serialize($node->serial_data); - db_query("UPDATE {video} SET serialized_data = '%s' WHERE nid = %d AND vid = %d", $node->serialized_data, $nid, $vid); - db_unlock_tables(); - // GMM: update status on previously encoded fid to 0 so drupal will delete - if($old_fid > 0) - db_query("UPDATE {files} SET status = %d WHERE fid = %d", 0, $old_fid); -} - - - -/** - * Get a string cointaining the command to be executed including options -*/ -function _video_render_get_command(&$job) { - - $videofile = escapeshellarg($job->origfile); // escape file name for safety - $convfile = tempnam(VIDEO_RENDERING_TEMP_PATH, 'video-rendering'); - $audiobitrate = variable_get('video_ffmpeg_helper_auto_cvr_audio_bitrate', 64); - $videobitrate = variable_get('video_ffmpeg_helper_auto_cvr_video_bitrate', 200); - $size = _video_render_get_size($job); - - - $converter = VIDEO_RENDERING_FFMPEG_PATH; - $options = preg_replace(array('/%videofile/', '/%convertfile/', '/%audiobitrate/', '/%size/', '/%videobitrate/'), array($videofile, $convfile, $audiobitrate, $size, $videobitrate), variable_get('video_ffmpeg_helper_auto_cvr_options', '-y -i %videofile -f flv -ar 22050 -ab %audiobitrate -s %size -b %videobitrate -qscale 1 %convertfile')); - - // set to the converted file output - $job->convfile = $convfile; - - return VIDEO_RENDERING_NICE . " $converter $options"; -} - - - -/** - * Calculate the converted video size basing on the width set on administration. - * Aspect ration is maintained. -*/ -function _video_render_get_size(&$job) { - $def_width = variable_get('video_ffmpeg_helper_auto_cvr_width', 400); - - $height = $def_width * ($job->videoy / $job->videox); // do you remember proportions?? :-) - - - $height = round($height); - // add one if odd - if($height % 2) { - $height++; - } - - $job->calculatedx = $def_width; - $job->calculatedy = $height; - - return $def_width . 'x' . $height; -} - - -/** - * Load a job -*/ -function _video_render_load_job($nid, $vid, $status) { - $result = db_query('SELECT * FROM {video_rendering} vr INNER JOIN {node} n ON vr.vid = n.vid INNER JOIN {video} v ON n.vid = v.vid WHERE n.nid = v.nid AND vr.nid = n.nid AND vr.status = %d AND n.nid = %d AND n.vid = %d', $status, $nid, $vid); - - return db_fetch_object($result); -} - - -/** - * Change the status to $status of the job having nid=$nid and vid=$vid -*/ -function _video_render_job_change_status($nid, $vid, $status) { - $result = db_query('UPDATE {video_rendering} SET status = %d WHERE nid = %d AND vid = %d', $status, $nid, $vid); -} - -?> diff --git a/plugins/video_ffmpeg_helper/video_scheduler.php b/plugins/video_ffmpeg_helper/video_scheduler.php deleted file mode 100644 index 1ebbe02..0000000 --- a/plugins/video_ffmpeg_helper/video_scheduler.php +++ /dev/null @@ -1,115 +0,0 @@ -<?php -//$Id$ -/** - * @file - * Implement video rendering scheduling. - * If you are not using sites/default/settings.php as your settings file, - * add an optional parameter for the drupal site url: - * "php video_scheduler.php http://example.com/" or - * "php video_scheduler.php http://example.org/drupal/" - * - * @author Fabio Varesano <fvaresano at yahoo dot it> - * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw at gmail dot com> - * @todo - */ - - -/** - * video_scheduler.php configuration -*/ - -// number of conversion jobs active at the same time -define('VIDEO_RENDERING_FFMPEG_INSTANCES', 5); - -/** - * video_scheduler.php configuration ends. - * DO NOT EDIT BELOW THIS LINE -*/ - -/** - * Define some constants -*/ -define('VIDEO_RENDERING_PENDING', 1); -define('VIDEO_RENDERING_ACTIVE', 5); -define('VIDEO_RENDERING_COMPLETE', 10); -define('VIDEO_RENDERING_FAILED', 20); - -if (isset($_SERVER['argv'][1])) { - $url = parse_url($_SERVER['argv'][1]); - $_SERVER['SCRIPT_NAME'] = $url['path']; - $_SERVER['HTTP_HOST'] = $url['host']; -} - -include_once('./includes/bootstrap.inc'); -//module_load_include('/includes/bootstrap.inc', 'video_scheduler', 'includes/bootstrap'); -// disable error reporting for bootstrap process -error_reporting(E_ERROR); -// let's bootstrap: we will be able to use drupal apis -drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); -// enable full error reporting again -error_reporting(E_ALL); - - -// allow execution only from the command line! -if(empty($_SERVER['REQUEST_METHOD'])) { - video_scheduler_main(); -} -else { - print t('This script is only executable from the command line.'); - die(); -} - - - -/** - * Main for video_scheduler.php -*/ -function video_scheduler_main() { - - if($jobs = video_scheduler_select()) { - foreach ($jobs as $job) { - video_scheduler_start($job); - } - } - else { - watchdog('video_scheduler', 'no video conversion jobs to schedule.', array(), WATCHDOG_DEBUG); - } -} - - -/** - * Starts rendering for a job -*/ -function video_scheduler_start($job) { - $url = (isset($_SERVER['argv'][1])) ? escapeshellarg($_SERVER['argv'][1]) : ''; - exec("php video_render.php $job->nid $job->vid $url > /dev/null &"); -} - - -/** - * Select VIDEO_RENDERING_FFMPEG_INSTANCES jobs from the queue - * - * @return an array containing jobs -*/ -function video_scheduler_select() { - - $result = db_query('SELECT * FROM {video_rendering} vr INNER JOIN {node} n ON vr.vid = n.vid INNER JOIN {video} v ON n.vid = v.vid WHERE n.nid = v.nid AND vr.nid = n.nid AND vr.status = %d ORDER BY n.created', VIDEO_RENDERING_PENDING); - - // TODO: order jobs by priority - - // TODO: use db_query_range - $jobs = array(); - $i = 0; - $count = db_result(db_query('SELECT COUNT(*) FROM {video_rendering} vr INNER JOIN {node} n ON vr.vid = n.vid INNER JOIN {video} v ON n.vid = v.vid WHERE n.nid = v.nid AND vr.nid = n.nid AND vr.status = %d ORDER BY n.created', VIDEO_RENDERING_PENDING)); - while($i < $count && $i < VIDEO_RENDERING_FFMPEG_INSTANCES) { - $jobs[] = db_fetch_object($result); - $i++; - } -//print_r($jobs); - return $jobs; -} - - - - -?> diff --git a/plugins/video_image/video_image.info b/plugins/video_image/video_image.info deleted file mode 100644 index f158ede..0000000 --- a/plugins/video_image/video_image.info +++ /dev/null @@ -1,8 +0,0 @@ -;$Id$ -name = Video Image -description = Enable thumbnails support for video module. -dependencies[] = image -dependencies[] = video -package = "Video" -core = 6.x - diff --git a/plugins/video_image/video_image.module b/plugins/video_image/video_image.module deleted file mode 100644 index 8ea5945..0000000 --- a/plugins/video_image/video_image.module +++ /dev/null @@ -1,570 +0,0 @@ -<?php -//$Id$ -/** - * @file - * Enable image support for video module. - * - * @author Fabio Varesano <fvaresano at yahoo dot it> - * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw at gmail dot com> - * @author Glen Marianko Twitter@demoforum <glenm at demoforum dot com> - * @todo - * 1. Add jQuery support - * 2. Add styles to thumbnail - * 3. Add imagecache support - * 4. Overlay a play button - * 5. Capturing video support (To get set of captured thumbnails with time) - */ - - -/** - * Implementation of hook_help(). - */ -function video_image_help($path, $arg) { - switch ($path) { - case 'admin/modules#description': - return t('Enable thumbnail support for video module.'); - } -} - -/** - * Implementation of hook_menu() - */ -function video_image_menu() { - $items = array(); - $may_cache=true; - if ($may_cache) { - $items['admin/settings/video/image'] = array( - 'title' => 'Video image', - 'description' => 'Administer video_image module settings', - 'page callback' => 'drupal_get_form', - 'page arguments' => array('video_image_admin_settings'), - 'access arguments' => array('administer site configuration'), - 'type' => MENU_NORMAL_ITEM, - ); - } - return $items; -} - - -/** - * Implementation of hook_perm - */ -//GMM: define positions in perm array to reference later (without misspellings :) -define('OVERRIDE_IMAGE', 0); -function video_image_perm() { - $array = array('override autothumbnailing using uploaded image'); - return $array; -} - - -/** - * Settings form - */ -function video_image_admin_settings() { - if (module_exists('video_upload') && variable_get('video_image_auto_thumbnail', 0)) { - $upload_weight = db_result(db_query("SELECT weight FROM {system} WHERE name='video_upload'")); - db_query("UPDATE {system} SET weight=".($upload_weight+1)." WHERE name='video_image'"); - } - $form = array(); - $form['video_image_publish_thumbnail'] = array( - '#type' => 'checkbox', - '#title' => t('Publish the video thumbnails'), - '#description' => t('Checking this value will cause the video thumbnail image nodes to be published and therefore could show up in blocks. Usually, this is not what you want because then you could end up with both the thumbnail node and the video node showing up and since there is no way to link the image node to the video node, this is not desirable. However, with this unchecked, the administrator will end up with a lot of unpublished nodes.'), - '#default_value' => _video_image_publish_thumbnails(), - ); - $form['video_image_promote_thumbnail'] = array( - '#type' => 'checkbox', - '#title' => t('Promote the thumbnails to the front page'), - '#default_value' => _video_image_promote_thumbnails(), - ); - $form['autothumb'] = array( - '#type' => 'fieldset', - '#title' => t('Automatic video thumbnailing'), - '#collapsible' => TRUE, - '#collapsed' => FALSE, - '#description' => t('This feature requires the \'video_ffmpeg_helper\' module'), - ); - $auto_thumb_disable = !module_exists('video_ffmpeg_helper'); - $form['autothumb']['video_image_auto_thumbnail'] = array( - '#type' => 'checkbox', - '#title' => t('Auto thumbnail for videos'), - '#description' => t('If set up correctly, this will auto-generate a thumbnail for each video created.'), - '#default_value' => variable_get('video_image_auto_thumbnail', false) && !$auto_thumb_disable, - '#disabled' => $auto_thumb_disable, - ); - /* - $form['autothumb']['video_image_auto_thumbnail_only'] = array( - '#type' => 'checkbox', - '#title' => t('Use auto-thumbnailer exclusively for video images'), - '#description' => t('If checked, this will disable the file upload box for the user-supplied thumbnail. Only check this if you have checked to be sure that auto-thumbnailing works. Auto thumbnail must be selected for this to be enabled.'), - '#default_value' => variable_get('video_image_auto_thumbnail_only', false), - '#disabled' => !variable_get('video_image_auto_thumbnail', false), - ); - */ - $form['autothumb']['video_image_auto_thumbnail_debug'] = array( - '#type' => 'checkbox', - '#title' => t('Debug automatic thumbnail process'), - '#default_value' => variable_get('video_image_auto_thumbnail_debug', false), - '#description' => t('Automatic thumbnailing of videos is dependent on the actual video types. Some video types may not be able to be automatically thumbnailed. Setting this option will allow messages to be show when posting and editing of videos that can be automatically thumbnailed.'), - '#disabled' => $auto_thumb_disable, - ); - - - return system_settings_form($form); -} - -function video_image_admin_settings_validate($form, &$form_state) { - if (module_exists('video_ffmpeg_helper')) { - if ($form_state['values']['video_image_auto_thumbnail']) { - $path_ok = _video_ffmpeg_helper_check_exe_path(); - if (!$path_ok) { - drupal_set_message(t('The path for \'ffmpeg\' is not valid. Please check settings on the !ffmpeg_settings_page', array('!ffmpeg_settings_page' => l(t('Video ffmpeg helper settings page'), 'admin/settings/video/ffmpeg_helper'))), 'error'); - } - } - } -} - - -/** - * Return true if the video support authothumbnailing -*/ -function video_image_is_autothumbable($node) { - $info = video_get_type_info($node->vtype); - $has_hook = module_hook('video_' . $node->vtype, 'v_auto_thumbnail'); - return $has_hook && isset($info[$node->vtype]['#autothumbable']) && $info[$node->vtype]['#autothumbable']; -} - - -/** - * Implementation of hook_form_alter() - */ -function video_image_form_alter(&$form, &$form_state, $form_id) { - - if($form_id == 'video_node_form') { - - $node = $form['#node']; - $value = ($node->new_image) ? '#value' : '#default_value'; - $form['iid'] = array('#type' => 'hidden', $value => $node->iid); - - if (!is_array($node->tempimage['fids'])) { - $fids = array('_original' => 0); - foreach (_image_get_sizes() as $size) { - $fids[$size['label']] = 0; - } - $node->tempimage['fids'] = $fids; - } - $form['tempimage']['#tree'] = true; - foreach ($node->tempimage['fids'] as $label => $fid) { - $form['tempimage']['fids'][$label] = array('#type' => 'hidden', $value => $fid); - } - - $auto_thumbable = video_image_is_autothumbable($node); - //GMM: fix permission misspelling - $perm=video_image_perm(); - if(!$auto_thumbable || user_access($perm[OVERRIDE_IMAGE])) { // let's be sure that image directories are ready - if (function_exists('_image_check_settings')) { - _image_check_settings(); - } - // needed for uploading - $form['#attributes'] = array("enctype" => "multipart/form-data"); - - - $form['image'] = array('#type' => 'fieldset', '#title' => t('Image thumbnails'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => -17, '#description' => t('Upload an image to be used as the thumbnail for this video.')); - - $form['image']['image'] = array('#type' => 'file', '#title' => t('Image')); - } - if ($node->nid && $auto_thumbable) { - $form['regenerate_thumbnail'] = array('#type' => 'checkbox', '#title' => t('Auto regenerate thumbnail'), '#default_value' => 0); - } - } -} - - -/** - * Implementation of hook_nodeapi() - */ -function video_image_nodeapi(&$node, $op, $teaser) { - //print_r($op); - //exit; - if($node->type == 'video') { - switch ($op) { - case 'load': - //exit; - return _video_image_load($node); - - case 'prepare': - //exit; - _video_image_prepare($node); - break; - - case 'presave': - //exit; - _video_image_submit($node); - break; - - case 'view': - //exit; - _video_image_view($node, $teaser); - break; - case 'delete': - //exit; - _video_image_delete($node); - break; - } - } -} - - -/** - * Renders thumbnail node with a link to the video node to be used on video teasers. - * - * @param $image - * object with image node information - * @param $video - * the video node associated with image - * - * @return - * string of content to display - */ -function theme_video_image_teaser($image, $video) { - - $image_html = NULL; - - if($image != NULL && $image->type == 'image') { - $image_html = image_display($image, 'thumbnail', array('class' => 'video_image_teaser')); - } - else if($image_node == NULL && $video->serial_data['image_teaser']){ // only for backward compatibility - $image_html = theme('image', $video->serial_data['image_teaser'], $video->title, $video->title, array('class' => 'video_image_teaser'), FALSE); - } - - if($image) { - //Create a link with an image in it. - $output .= l($image_html, "node/$video->nid", array('html' => TRUE)); - $output .= '<br class="video_image_clear" />'; - } - return $output; -} - - -/* nodeapi split out hooks */ -function _video_image_load(&$node) { - $output['iid'] = $node->serial_data['iid']; - return $output; -} - -function _video_image_prepare(&$node) { - // let's check that we have a valid image - //print_r($node); - //exit; - if (count($_POST)) { - - $validators = array( - 'file_validate_is_image' => array() - ); - - $field_name = file_save_upload('image', $validators); - if (!$field_name && video_image_is_autothumbable($node)) { - _video_image_thumbnail_debug(t('video_image_nodeapi: prepare: ready to thumbnail video')); - $field_name = module_invoke('video_' . $node->vtype, 'v_auto_thumbnail', $node); - if ($field_name === false && count($_POST)) { - drupal_set_message(t('The thumbnailing process of your video failed for some reason. Video thumbnail will not be available.'), 'error'); - } - } - } - if ($field_name) { - $node->tempimage = _video_image_temp_image_store($field_name); - $node->new_image = TRUE; - } else if (is_array($_POST['tempimage']) && - ($_POST['op'] == 'Preview' || $_POST['op'] == 'Submit')) { - $node->tempimage = (array)_video_image_temp_image_load(array_values($_POST['tempimage']['fids'])); - } -} - -function _video_image_submit(&$node) { - //print_r($node); - //exit; - // ############# PREPARE ####################### - // ------------- MOVED ------------------------- - if (count($_POST)) { - - $validators = array( - 'file_validate_is_image' => array() - ); - - $field_name = file_save_upload('image', $validators); - if (!$field_name && video_image_is_autothumbable($node)) { - _video_image_thumbnail_debug(t('video_image_nodeapi: prepare: ready to thumbnail video')); - $field_name = module_invoke('video_' . $node->vtype, 'v_auto_thumbnail', $node); - if ($field_name === false && count($_POST)) { - drupal_set_message(t('The thumbnailing process of your video failed for some reason. Video thumbnail will not be available.'), 'error'); - } - } - } - - if ($field_name) { - /* - if($node->iid){ - - // Remove all the existing images. - $result = db_query("SELECT f.fid, f.filepath FROM {image} i INNER JOIN {files} f ON i.fid = f.fid WHERE i.nid = %d", $node->iid); - while ($file = db_fetch_object($result)) { - file_delete(file_create_path($file->filepath)); - db_query("DELETE FROM {files} WHERE fid = %d", $file->fid); - } - //db_query("DELETE FROM {image} WHERE nid = %d", $node->iid); - } - * - */ - $node->tempimage = _video_image_temp_image_store($field_name); - $node->new_image = TRUE; - //print_r($node); - //die; - } else if (is_array($_POST['tempimage']) && ($_POST['op'] == 'Preview' || $_POST['op'] == 'Submit')) { - //print_r($node); - //exit; - $node->tempimage = (array)_video_image_temp_image_load(array_values($_POST['tempimage']['fids'])); - } - - // ########################################################################### - - - if ($node->regenerate_thumbnail) { - _video_image_regenerate_thumbnail($node); - } - if (is_array($node->tempimage['fids']) && $node->tempimage['fids']['_original']) { - $image = _video_image_temp_image_load(array_values($node->tempimage['fids'])); - //print_r($image); - //exit; - - //GMM: This DELETE query causes the uploaded video file to disappear - // especially when using ffmpeg to convert the video - no need to kill the - // tempimage, since its status is 0 in {files} Drupal cron will nix it - //db_query("DELETE FROM {files} WHERE fid in (%s)", - // implode(',', array_values($node->tempimage['fids']))); - - // initialize standard node fields - //print_r($image); - //exit; - $image->uid = $node->uid; - $image->created = time(); - $image->title = t('Video thumbnail for !title', array('!title' => $node->title)); - $image = node_submit($image); - $image->uid = $node->uid; - $image->status = _video_image_publish_thumbnails(); - $image->promote = _video_image_promote_thumbnails(); - // This is a messages hack (we don't want to see what happens under the covers) - _video_image_pause_messages(true); - if ($node->iid) { - - $oldimage = node_load($node->iid); - $oldimage->images = $image->images; - - // delete the old images? - //GMM: Fix to use the proper variable to trigger current Image module to rebuild derivative images - // Tested against Image 6.x-1.0-aplha4 - // $oldimage->new_image = 1; - $oldimage->new_file = true; - node_save($oldimage); - $node->iid = $oldimage->nid; - $node->serial_data['iid'] = $node->iid; - } else { - node_save($image); - - //print_r($image); - //exit; - //image_insert($image); - $node->iid = $image->nid; - // store the iid into the serial_data - $node->serial_data['iid'] = $node->iid; - //print_r($node); - //die; - // needed to set the correct status and promote values even if the user does not have enough permissions. Is there a better solution??? - // db_query('UPDATE {node} SET status = %d, promote = %d WHERE nid = %d AND vid = %d', _video_image_publish_thumbnails(), _video_image_promote_thumbnails(), $image->nid, $image->vid); - } - _video_image_pause_messages(); - } - else { - $node->serial_data['iid'] = $node->iid; - } -} - -function _video_image_view(&$node, $teaser) { - if (is_array($node->tempimage['fids']) && $node->tempimage['fids']['_original']) { - $image = _video_image_temp_image_load(array_values($node->tempimage['fids'])); - } else if ($node->iid) { - $image = node_load($node->iid); - } else { - $image = NULL; // this is for backward compatibility - } - - if($teaser) { - $node->content['video_image_thumbnail'] = array('#value' => theme('video_image_teaser', $image, $node)); - } -} - -function _video_image_regenerate_thumbnail(&$node) { - $field_name = module_invoke('video_' . $node->vtype, 'v_auto_thumbnail', $node); - if ($field_name) { - $node->tempimage = _video_image_temp_image_store($field_name); - $node->new_image = TRUE; - } -} - -function _video_image_delete(&$node) { - _video_image_pause_messages(true); - node_delete(array('nid' => $node->iid)); - _video_image_pause_messages(); -} - -/* At times, when doing sub-node processing (creating/deleting thumbnail nodes) - * we don't really want to show all the messages through to the end user or it - * gets a little bit confusing (image created messages when creating a video) - * so we suppress the messages with this procedure. - */ -function _video_image_pause_messages($snapshot = false) { - static $messages = null; - if ($snapshot) { - $messages = drupal_get_messages(); - } else if (is_array($messages)) { - $_SESSION['messages'] = $messages; - $messages = null; - } -} - -/* debugging framework for troublesome thumbnailing */ -function _video_image_thumbnail_debug($msg) { - static $debug = NULL; - if ($debug == NULL) { - $debug = variable_get('video_image_auto_thumbnail_debug', false); - } - if ($debug) { - $t = debug_backtrace(); - $l = array_shift($t); - drupal_set_message(basename($l['file'], '.module').': '.$msg); - } -} - -function _video_image_temp_image_store(&$file) { - $image = new stdClass(); - $image->images[IMAGE_ORIGINAL] = $file->filepath; - $image->images =_image_build_derivatives($image); - $image->type = 'image'; - $image->uid = 1; - $image->created = time(); - $image->title = t('video image thumbnail'); - // We're good to go. - - $image->rebuild_images = FALSE; - $image->new_file = TRUE; - - - //print_r($image); - //exit; - if ($image->images) { - node_validate($image); - if (!form_get_errors()) { - // save the images in the files table - foreach ($image->images as $l => $f) { - $info = image_get_info($f); - $file->fid = db_last_insert_id('files','fid'); - if($l=="_original"){ - db_query("INSERT INTO {files} (fid, filename, filepath, filemime, filesize) VALUES (%d, '%s', '%s', '%s', '%s')", - $fid, "video_image_temp.$l", $f, $info['mime_type'], $info['file_size']); - } - $image->fids[$l] = $file->fid; - } - } - } - //print_r($image); - //exit; - return (array)$image; -} - -/* Create a fake node object that acts like an image node - * by looking up each file in the array $fids and loading - * them into the images array. - */ -function _video_image_temp_image_load($fids) { - $image = new stdClass(); - $image->type = 'image'; - $image->new_file = 1; - $fids = implode(',', $fids); - $results = db_query("SELECT fid, filename, filepath FROM {files} WHERE fid IN (%s)", $fids); - while ($file = db_fetch_object($results)) { - $label = substr($file->filename, 17); - $image->images[$label] = $file->filepath; - $image->fids[$label] = $file->fid; - } - return $image; -} - -/* If the user has set a promote preference, use that, otherwise return - * if 'promote' is set in the drupal content type settings - * - * @return - * Returns whether we should promote thumbnails or not - */ -function _video_image_promote_thumbnails() { - $settings_override = variable_get('video_image_promote_thumbnail', NULL); - if ($settings_override === NULL) { - //GMM: Don't default to "promote" if no video or Image option specified - //confusing to n00bs seeing two nodes promoted for every video node - $node_options = variable_get('node_options_image', array()); - return in_array('promote', $node_options); - } - return $settings_override; -} - -/* If the user has set a publish preference, use that, otherwise return - * if 'status' is set in the drupal content type settings - * - * @return - * Returns whether we should publish thumbnails or not - */ -function _video_image_publish_thumbnails() { - $settings_override = variable_get('video_image_publish_thumbnail', NULL); - if ($settings_override === NULL) { - $node_options = variable_get('node_options_image', array('status', 'promote')); - return in_array('status', $node_options); - } - return $settings_override; -} - - -/** - * Create an image file object from a given image url -*/ -function _video_image_get_thumb_file_object($thumbnail_url, $id) { - - if($thumbnail_url && $thumbnail_url != '' && $image = image_gd_open($thumbnail_url, 'jpeg')) { - // save image to temp directory for processing - $location = file_directory_temp() .'/'. $id .'.jpg'; - image_gd_close($image, $location, 'jpeg'); - - - // get info and build a file object - $filepath = file_create_path($location, file_directory_temp()); - $info = image_get_info($filepath); - - $file = new stdClass(); - $file->filepath = realpath($filepath); - $file->filename = basename($file->filepath); - $file->filesize = $info['file_size']; - $file->filemime = $info['mime_type']; - - return $file; - } - - return null; -} - -/** - * Implementation of hook_theme(). - */ -function video_image_theme() { - return array( - 'video_image_teaser' => array( - 'arguments' => array('image' => NULL,'video' => NULL), - ), - ); -} diff --git a/plugins/video_multidownload/video_multidownload.info b/plugins/video_multidownload/video_multidownload.info deleted file mode 100644 index 5c87e9c..0000000 --- a/plugins/video_multidownload/video_multidownload.info +++ /dev/null @@ -1,6 +0,0 @@ -;$Id$ -name = Video Multidownload -description = Enable multiple file download in video module. -dependencies[] = video -package = "Video" -core = 6.x diff --git a/plugins/video_multidownload/video_multidownload.module b/plugins/video_multidownload/video_multidownload.module deleted file mode 100644 index 5cce13b..0000000 --- a/plugins/video_multidownload/video_multidownload.module +++ /dev/null @@ -1,393 +0,0 @@ -<?php -//$Id$ -/** - * @file - * Enable multiple file download in video module. - * - * @author Fabio Varesano <fvaresano at yahoo dot it> - * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw at gmail dot com> - * @todo - */ - - -/** - * Implementation of hook_help(). - */ -function video_multidownload_help($path, $arg) { - switch ($path) { - case 'admin/modules#description': - return t('Enable multiple file download in video module.'); - } -} - - -/** - * Implementation of hook_menu(). - * - * @param $may_cache - * boolean indicating whether cacheable menu items should be returned - * - * @return - * array of menu information - */ -function video_multidownload_menu() { - $items = array(); -/* TODO - Non menu code that was placed in hook_menu under the '!$may_cache' block - so that it could be run during initialization, should now be moved to hook_init. - Previously we called hook_init twice, once early in the bootstrap process, second - just after the bootstrap has finished. The first instance is now called boot - instead of init. - - In Drupal 6, there are now two hooks that can be used by modules to execute code - at the beginning of a page request. hook_boot() replaces hook_boot() in Drupal 5 - and runs on each page request, even for cached pages. hook_boot() now only runs - for non-cached pages and thus can be used for code that was previously placed in - hook_menu() with $may_cache = FALSE: - - Dynamic menu items under a '!$may_cache' block can often be simplified - to remove references to arg(n) and use of '%<function-name>' to check - conditions. See http://drupal.org/node/103114. - - The title and description arguments should not have strings wrapped in t(), - because translation of these happen in a later stage in the menu system. -*/ - $may_cache=true; - if ($may_cache) { - $items['admin/content/video/multidownload'] = array( - 'title' => 'Multidownload', - 'description' => 'Administer video_multidownload module settings', - 'page callback' => 'drupal_get_form', - 'page arguments' => array('video_multidownload_settings_form'), - 'access arguments' => array('administer site configuration'), - 'type' => MENU_NORMAL_ITEM, - ); - } - else { - if (arg(0) == 'node' && is_numeric(arg(1))) { - if ($node = node_load(arg(1)) and $node->type == 'video') { - if(isset($node->disable_multidownload) && - !$node->disable_multidownload && - ($node->use_play_folder || $node->download_folder!='') - ) { - $items['node/'.'%'.'/multidownload'] = array( - 'title' => 'download other formats', - 'page callback' => 'video_multidownload_download', - 'access arguments' => array('access video'), - 'weight' => 7, - 'type' => MENU_LOCAL_TASK); - } - } - } - } - return $items; -} - - -/** - * Implementation of hook_perm(). - */ -function video_multidownload_perm() { - return array('create multi-file downloads'); -} - - -/** - * Implementation of hook_settings() - */ -function video_multidownload_settings_form() { - $form = array(); - - $options = array(1 => 'Yes', 0 => 'No'); - - $form['multifile'] = array('#type' => 'fieldset', '#title' => t('Multi-file download options'), '#description' => t('Allows a list of files to be shown on the download page. The list is usually gotten from a specified folder. This ability is useful for providing different sizes and video types for download.')); - $form['multifile']['video_multidownload'] = array( - '#type' => 'radios', - '#title' => t('Allow Multi-file Downloads'), - '#options' => $options, - '#default_value' => variable_get('video_multidownload', 0), - '#description' => t('This feature can be disabled separately for each node. If turned on make sure you set the permissions so users can use this feature.') . ' ' . l(t('access control'), 'admin/access')); - $form['multifile']['video_download_ext'] = array( - '#type' => 'textfield', - '#title' => t('File extensions to show'), - '#default_value' => variable_get('video_download_ext', 'mov,wmv,rm,flv,avi,divx,mpg,mpeg,mp4,zip'), - '#description' => t('The extensions of files to list from the multi-file download folder on the download page. Extensions should be comma seperated with no spaces, for example (mov,wmv,rm).')); - - return system_settings_form($form); -} - - -/** - * Implementation of hook_form_alter() - * We use this to add multidownload fields to the video creation form. - */ -function video_multidownload_form_alter(&$form, &$form_state, $form_id) { - - if ($form_id == 'video_node_form' && isset($form['video']) && user_access('create multi-file downloads')) { - - $node = $form['#node']; - - $form['multi-file'] = array( - '#type' => 'fieldset', - '#title' => t('Multiple files in download tab'), - '#collapsible' => TRUE, - '#collapsed' => TRUE, - '#weight' => -18, - '#description' => t('These options allow you to have multiple files shown on the download page. This is useful for allowing users to download different file sizes and video formats. ') . l(t('More information.'), 'video/help', array('fragment' => 'multi-download')) - ); - $form['multi-file']['disable_multidownload'] = array( - '#type' => 'checkbox', - '#title' => t('Disable multi-file downloads'), - '#default_value' => isset($node->disable_multidownload) ? $node->disable_multidownload : 1, - '#description' => t('Disables multi-file downloads for this video only.') - ); - $form['multi-file']['download_folder'] = array( - '#type' => 'textfield', - '#title' => t('Multi-file download folder'), - '#default_value' => $node->download_folder, - '#maxlength' => 250, - '#description' => t('Enter the folder containing your videos. It must be relative from the drupal directory. If the absolute path is "C:\inetpub\drupal\videos\projectfolder\" or "/usr/htdocs/drupal/videos/projectfolder/" then enter something like "videos/projectfolder/".')); - $form['multi-file']['use_play_folder'] = array( - '#type' => 'checkbox', - '#title' => t('Show files in "play" folder'), - '#default_value' => $node->use_play_folder, - '#description' => t('Display videos in the same directory as the "play" video. If folder above is entered this will be in addition.')); - } -} - - -/** - * Implementation of hook_nodeapi() - */ -function video_multidownload_nodeapi(&$node, $op, $teaser) { - if($node->type == 'video') { - switch ($op) { - - case 'validate': - //Validate multi-file download values. - if (user_access('create multi-file downloads')) { //Make sure the user has permission. - //Checks to make sure either multi-downloads are disabled, or a valid folder is given, or use_play_folder is checked. - if ($node->disable_multidownload == 0 and !is_dir(getcwd() . '/' . $node->download_folder) and $node->use_play_folder == 0) { - form_set_error('disable_multidownload', t("Please disable multi-file downloads if you are not going to use the feature.")); - form_set_error('download_folder', t('Download directory does not exist. Make sure it has a trailing forward slash "/".')); - } - } - break; - } - } -} - - - -function video_multidownload_download() { - if ($node = node_load(arg(1))) { - if (variable_get("video_multidownload", 0) == 0 or $node->disable_multidownload == 1) { - - } - else if (arg(3) != '') { //If we are passed an encoded URL redirect to the downloader. - _video_multidownload_download_goto(arg(3), $node->vid, TRUE); - } - else { //Multiple file downloads is turned on. - $download_error = FALSE; //Initialize and clear the error flag. - $node->file_array = array(); //Initialize the final file array. - global $base_url; - $full_download_folder = getcwd() . '/' . $node->download_folder; //Get absolute path to folder. - //If the download folder is set and valid scan it for files. - if ($node->download_folder != '' and file_exists($full_download_folder)) { - $scan_download_folder = _video_multidownload_scandir($full_download_folder); //Get array of file names in the directory. - $scan_download_folder['local_dir'] = $full_download_folder; //For getting filesize. - $scan_download_folder['dir_stub'] = $node->download_folder; //To put in the URL. - $folder_array[] = $scan_download_folder; - - } - //If option is set to use "play" folder and it exists, scan it for files. - $play_dir_stub = str_replace(basename($node->vidfile), "", $node->vidfile); //Remove the filename from the play file to get directory. - $play_dir = getcwd() . '/' . $play_dir_stub; //Get the local directory path where the file is kept. - if ($node->use_play_folder == 1 and file_exists($play_dir) and $play_dir_stub != '/') { //Make sure play stub won't allow scanning base drupal directory. - $scan_play_folder = _video_multidownload_scandir($play_dir); - $scan_play_folder['local_dir'] = $play_dir; //For getting filesize. - $scan_play_folder['dir_stub'] = $play_dir_stub; //To put in the URL. - $folder_array[] = $scan_play_folder; - } - - if (count($folder_array) > 0) { //Make sure we have a folder to scan. - foreach ($folder_array as $dir_scan) { //Scan through one or both folders results. - foreach ($dir_scan as $file) { //Go through each file in the directory. - if (is_file($dir_scan['local_dir'] . "/" . $file)) { //Make sure it's a valid file. - //Checks the new file with the files already in the array to eliminate dupes. - $match = false; - foreach ($node->file_array as $file_array_file) { - if ($file_array_file['file'] == $file) { //If the file is already in the array. - $match = TRUE; - } - } //If we get here with $match still set FALSE we don't have a dupe. - - $file_ext = substr($file, strrpos($file, '.') + 1); //Get the file extension. - $ext_array = explode(',', variable_get('video_download_ext', 'mov,wmv,avi')); - - if (!$match and in_array($file_ext, $ext_array)) { //Only add file if it's not already in the array and it's extension shouldn't be hidden. - $file_array_size[] = filesize($dir_scan['local_dir'] . $file); //Create an array of the file sizes for sorting. - - global $base_url; - $file_url = $base_url . '/' . $dir_scan['dir_stub'] . $file; //Generate absolute URL to video. - $file_url = str_replace(' ', '%20', $file_url); //Replace any spaces in filename. - $encoded_url = base64_encode($file_url); //Encode URL to base64 MIME value so it can be passed in URL. - $encoded_url = str_replace('/', '-', $encoded_url); //Replace "/" with "-" so it doesn't mess up the URL. - - $node->file_array[] = array( 'file' => $file - , 'type' => $file_ext - , 'size' => filesize($dir_scan['local_dir'] . $file) - , 'encoded_url' => $encoded_url - ); - } - } //Close the valid file check. - } //Close the directory scan. - } //Close scan location array. - - if (count($node->file_array) > 0) { //Make sure atleast 1 file was found. - array_multisort($file_array_size, SORT_ASC, $node->file_array); //Sort based of file size. - - } - else { //Else if no files were found in the directory. - $download_error = TRUE; - } - } - else { //Else if we have no valid folders to scan. - $download_error = TRUE; - } - - //If there was no error send the files array to the theme function for display. - if($download_error == FALSE) { - print theme('video_multidownload_download', $node); //Print to the screen from the theme_video_download function. - } - else { //Else if there is an error download the play file. - _video_download_goto($node->vidfile, $node->vid); - } - - } //Close multi-file downloads is turned on. - } -} - - -/** - * Outputs the HTML for the download page when multi-file download are turned on. - * - * @param $node - * object with node information - * - * @return - * string of content to display - */ -function theme_video_multidownload_download($node) { - $output = ''; - //Replace some common file types with full name and links. - $find = array('mov', 'wmv', 'rm', 'avi', 'zip', 'divx', 'flv', 'ogg'); - $replace = array('<a href="http://www.apple.com/quicktime" title="'. t('QuickTime Homepage') . '">' . t('Quicktime') . '</a>' - , '<a href="http://www.microsoft.com/windowsmedia" title="'. t('Windows Media Homepage') . '">' . t('Windows Media') . '</a>' - , '<a href="http://www.real.com" title="'. t('Real Media Homepage') . '">' . t('Real Media') . '</a>' - , '<a href="http://en.wikipedia.org/wiki/AVI" title="'. t('AVI Information at wikipedia.org') . '">' . t('AVI') . '</a>' - , '<a href="http://en.wikipedia.org/wiki/ZIP_file_format" title="'. t('ZIP Information at wikipedia.org') . '">' . t('ZIP') . '</a>' - , '<a href="http://www.divx.com" title="'. t('Divx Homepage') . '">' . t('DIVX') . '</a>' - , '<a href="http://www.macromedia.com/go/getflashplayer" title="'. t('Macromedia Flash Homepage') . '">' .t('Flash FLV') . '</a>' - , '<a href="http://www.theora.org/theorafaq.html" title="'. t('Ogg Theora FAQ at theora.org') . '">'.t('Ogg Theora FAQ') .'</a>, <a href="http://en.wikipedia.org/wiki/Wikipedia:Media_help_(Ogg)" title="'. t('Ogg Theora media help at Wikipedia') . '">' . t('Ogg Theora help') . '</a>' - ); - $output .= '<br /><div class="videodownload">'; //Enclose all HTML in "videodownload" class. - foreach($node->file_array as $file) { //Goes through the array of video files and gets them ready for display. - $file_type = str_replace($find, $replace, $file['type']); //Match and replace common file types. - $link = l($file['file'], "node/$node->nid/multidownload/" . $file['encoded_url']); //Create link to download file. - $file_array_table[] = array($link, format_size($file['size']), $file_type); //Create table row. - } - $headers = array(t('File Link'), t('File Size'), t('File Type')); - $output .= theme_table($headers, $file_array_table); //Create the table of files. - $output .= '</div>'; //Close the "videodownload" class. - - //Adds a breadcrumb back to view on the download page. This may not be needed but some better breadcrumbs are. - $breadcrumb = drupal_get_breadcrumb(); - $breadcrumb[] = l(t('View'), "node/$node->nid"); - drupal_set_breadcrumb($breadcrumb); - - drupal_set_title(t('Downloading').' '. theme('placeholder', $node->title)); - return theme("page", $output); -} - - - -/** - * Scans a directory and returns an array of all the filenames in the directory. - * This function is only necessary to maintain PHP 4 support. - * - * @param $dir - * The directory. Can be an absolute path or relative from the current working directory. - * - * @return - * array of filenames. - */ -function _video_multidownload_scandir($dir) { - //Try a few different ways to open the directory. - if (is_dir($dir)) { - $dir_open = opendir($dir); - } - else if (is_dir($new_dir = getcwd() . $dir)) { - $dir_open = opendir($new_dir); - } - else if (is_dir($new_dir = getcwd() . '/' . $dir)) { - $dir_open = opendir($new_dir); - } - else { //If directory does not exist. - return FALSE; - } - if (!$dir_open) { //If opendir returned false then return false. - return FALSE; - } - //If it makes it this far $dir_open should be valid. - while (($dir_content = readdir($dir_open)) !== FALSE) { - $files[] = $dir_content; - } - return $files; -} - - -/** - * Forward user directly to the file for downloading - * - * @param $input_url - * string should be either a base64 encoded absolute URL, relative URL, or absolute URL. - * - * @param $vid - * integer node version ID of the node to have it's download counter updated. - * - * @param $base64_encoded - * boolean value determines whether the $input is base64 encoded. - * - * @return - * Nothing - */ -function _video_multidownload_download_goto($input_url, $vid, $base64_encoded) { - if (user_access('download video') && $base64_encoded) { - - $encoded_url = str_replace('-', '/', $input_url); //Replace "-" to "/" for MIME base64. - $location = base64_decode($encoded_url); - - if (variable_get('video_downloadcounter', 1)) { - db_query("UPDATE {video} SET download_counter = download_counter + 1 where vid = '%d'", $vid); //Increment download counter. - } - - header("Location: $location"); //Redirect to the video files URL. - } - else { //If the user does not have access to download videos. - drupal_set_message(t('You do not have permission to download videos.'), 'error'); - $node = node_load(array('vid' => $vid)); //Load a node with the $vid so we can get the nid. - drupal_goto("node/$node->nid"); //Use the nid we just loaded to go back to the node page. - } -} - -/** - * Implementation of hook_theme(). - */ -function video_multidownload_theme() { - return array( - 'video_multidownload_download' => array( - 'arguments' => array('node' => NULL), - ), - ); -} diff --git a/plugins/video_optmetadata/video_optmetadata.info b/plugins/video_optmetadata/video_optmetadata.info deleted file mode 100644 index 7d6bf7f..0000000 --- a/plugins/video_optmetadata/video_optmetadata.info +++ /dev/null @@ -1,7 +0,0 @@ -;$Id$ -name = Video Opt Metadata -description = Enable addition of optional metadata on video nodes created by video module. Optional metadata are Video Bitrate, Audio Bitrate, Audio Sampling Rate and Audio Channels. -dependencies[] = video -package = "Video" -core = 6.x - diff --git a/plugins/video_optmetadata/video_optmetadata.module b/plugins/video_optmetadata/video_optmetadata.module deleted file mode 100644 index 1bf1d69..0000000 --- a/plugins/video_optmetadata/video_optmetadata.module +++ /dev/null @@ -1,146 +0,0 @@ -<?php -//$Id$ -/** - * @file - * Enable addition of optional metadata on video nodes created by video module. - * - * @author Fabio Varesano <fvaresano at yahoo dot it> - * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw at gmail dot com> - * @todo - */ - - -/** - * Implementation of hook_help(). - */ -function video_optmetadata_help($path, $arg) { - switch ($path) { - case 'admin/modules#description': - return t('Enable addition of optional metadata on video nodes created by video module. Optional metadata are Video Bitrate, Audio Bitrate, Audio Sampling Rate and Audio Channels.'); - } -} - - -/** - * Implementation of hook_perm(). - */ -function video_optmetadata_perm() { - return array('insert optional metadata'); -} - - - -/** - * Implementation of hook_form_alter() - * We use this to add some fields to the video creation form. - * In those fields users will be able to insert some video metadatas. - */ -function video_optmetadata_form_alter(&$form, &$form_state, $form_id) { - - if($form_id == 'video_node_form' && isset($form['video']) && user_access('insert optional metadata')) { - - // get node object - $node = $form['#node']; - // Optional Video Metadata. We display this group expanded only if displaying of optional metadata is enabled. - $form['metadata'] = array( - '#type' => 'fieldset', - '#title' => t('Optional Metadata'), - '#collapsible' => TRUE, - '#collapsed' => TRUE, - '#weight' => -16, - '#description' => t('Insert here the metadata informations.') - ); - $form['metadata']['video_bitrate'] = array( - '#type' => 'textfield', - '#title' => t('Video Bitrate'), - '#length' => 11, - '#maxlength' => 11, - '#default_value' => $node->video_bitrate, - '#description' => t('Video bitrate in kbits/sec.') - ); - $form['metadata']['audio_bitrate'] = array( - '#type' => 'textfield', - '#title' => t('Audio Bitrate'), - '#length' => 11, - '#maxlength' => 11, - '#default_value' => $node->audio_bitrate, - '#description' => t('Audio bitrate in kbits/sec.') - ); - $form['metadata']['audio_sampling_rate'] = array( - '#type' => 'select', - '#title' => t('Audio Sampling Rate'), - '#options' => array(0 => 'none', 8000 => '8 kHz', 11025 => '11 kHz', 16000 => '16 kHz', 22050 => '22 kHz', 32000 => '32 kHz', 44100 => '44.1 kHz', 48000 => '48 kHz', 96000 => '96 kHz', 192400 => '192 kHz'), - '#default_value' => $node->audio_sampling_rate, - '#description' => t('Integer value of audio sampling rate in Hz.') - ); - $form['metadata']['audio_channels'] = array( - '#type' => 'select', - '#title' => t('Audio Channels'), - '#options' => array('' => 'none', '5.1' => t('5.1'), 'stereo' => t('Stereo'), 'mono' => t('Mono')), - '#default_value' => $node->audio_channels - ); - // Ends Video Optional Metadata - } -} - - -/** - * Implementation of hook_nodeapi() - */ -function video_optmetadata_nodeapi(&$node, $op, $teaser) { - if($node->type == 'video') { - switch ($op) { - case 'view': - //Add the HTML formatted output of the optional video metadata to the bottom. - $node->body .= theme('video_metadata', $node); - break; - } - } -} - -/** - * Display optional metadata (Video and Audio bitrate,..) on the view page. - * - * @param $node - * object with node information - * - * @return - * string of content to display - $node->video_bitrate, $node->audio_bitrate, $node->audio_sampling_rate, $node->audio_channels, - */ -function theme_video_metadata($node) { - //Make sure atleast one fields had data. - if ($node->video_bitrate != 0 or $node->audio_bitrate != 0 or $node->audio_sampling_rate != 0 or $node->audio_channels != 0) { - $output = "\n\n<div class=\"video_metadata\">\n"; - $output .= ' <div class="title"><h2>'.t('Video Metadata')."</h2></div>\n"; - if($node->video_bitrate != 0) { - $fields[] = array('title' => t('Video Bitrate') . ':', 'body' => $node->video_bitrate . ' ' . t('kbits/sec')); - } - if($node->audio_bitrate != 0) { - $fields[] = array('title' => t('Audio Bitrate') . ':', 'body' => $node->audio_bitrate . ' ' . t('kbits/sec')); - } - if($node->audio_sampling_rate != 0) { - $fields[] = array('title' => t('Audio Sampling Rate') . ':', 'body' => $node->audio_sampling_rate . ' ' . t('Hz')); - } - if($node->audio_channels != '') { - $fields[] = array('title' => t('Audio Channels') . ':', 'body' => $node->audio_channels); - } - $output .= theme('video_fields', $fields); //Generate the fields HTML. - $output .= '</div>'; //Closing div video_metadata - } - else { //If all the fields are blank then display nothing. - $output = ''; - } - return $output; -} - -/** - * Implementation of hook_theme(). - */ -function video_optmetadata_theme() { - return array( - 'video_metadata' => array( - 'arguments' => array('node' => NULL), - ), - ); -}
\ No newline at end of file diff --git a/plugins/video_params/video_params.info b/plugins/video_params/video_params.info deleted file mode 100644 index 612462e..0000000 --- a/plugins/video_params/video_params.info +++ /dev/null @@ -1,7 +0,0 @@ -;$Id$ -name = Video Params -description = Enable addition of html params to object generated by video module. Useful if you need to use swf videos which needs params to be passed. -dependencies[] = video -package = "Video" -core = 6.x - diff --git a/plugins/video_params/video_params.module b/plugins/video_params/video_params.module deleted file mode 100644 index ee19a5c..0000000 --- a/plugins/video_params/video_params.module +++ /dev/null @@ -1,106 +0,0 @@ -<?php -//$Id$ -/** - * @file - * Enable addition of params to object generated by video module - * - * @author Fabio Varesano <fvaresano at yahoo dot it> - * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw at gmail dot com> - * @todo - */ - - - -/** - * Implementation of hook_help(). - */ -function video_params_help($path, $arg) { - switch ($path) { - case 'admin/modules#description': - return t('Enable addition of html params to object generated by video module. Useful if you need to use swf videos which needs params to be passed.'); - } -} - - -/** - * Implementation of hook_perm(). - */ -function video_params_perm() { - return array('insert object params'); -} - - - - -/** - * Implementation of hook_form_alter() - * We use this to add a text area to the video creation form. - * In the text area the user will be able to insert his param value association. - */ -function video_params_form_alter(&$form, &$form_state, $form_id) { - - if($form_id == 'video_node_form' && isset($form['video']) && user_access('insert object params')) { - - // get node object - $node = $form['#node']; - - //We must convert the array data back to something that can go in the textarea. - $textarea = ''; - if(is_array($node->serial_data['object_parameters'])) { - foreach ($node->serial_data['object_parameters'] as $param => $value) { - $textarea .= $param . '=' . $value . "\n"; - } - $textarea = substr($textarea, 0, -1); //Remove the last newline "\n" from the end. - } - $form['parameters'] = array('#type' => 'fieldset', '#title' => t('HTML object parameters'), '#collapsible' => TRUE, '#collapsed' => TRUE, '#weight' => -17); - $form['parameters']['object_parameters'] = array( - '#title' => t('Embedded object parameters'), - '#type' => 'textarea', - '#rows' => 5, - '#default_value' => $textarea, - '#description' => t('Enter the values that you would like to be embedded in <param name="param_1" value="value_1" /> tags. Each parameter should be on a seperate line with an equal sign between the parameter and its assigned value. Like param=value for example.') - ); - } -} - - -/** - * Implementation of hook_nodeapi() - */ -function video_params_nodeapi(&$node, $op, $teaser) { - if($node->type == 'video') { - switch ($op) { - case 'submit': - //Process the data in the object_parameters textarea. - if ($node->object_parameters != '') { //Make sure the textarea was not empty. - $lines = explode("\r\n", $node->object_parameters); //Make an array of each line from the textarea. - foreach ($lines as $line) { //Loop through each line. - $array = explode('=', $line); //Break apart at the "=" sign. $line should be in format param=value - $node->serial_data['object_parameters'][$array[0]] = $array[1]; //Assign the "param" as the key and "value" as the value. - } - } - break; - } - } -} - - -/** - * Implementation of hook_v_get_param() - video module specific hook - */ -function video_params_v_get_params(&$node) { - - $serial_data = $node->serial_data; - - if(is_array($serial_data) && array_key_exists('object_parameters', $serial_data) && !empty($serial_data['object_parameters'])) { - return $serial_data['object_parameters']; - } - else { - return NULL; - } -} - - - - - diff --git a/plugins/zencoder.inc b/plugins/zencoder.inc new file mode 100644 index 0000000..29d6b7c --- /dev/null +++ b/plugins/zencoder.inc @@ -0,0 +1,307 @@ +<?php +//$Id$ + +/** + * @file + * Provide a api for video conversion and auto thumbnailing using ffmpeg. + * + * @author Heshan Wanigasooriya <heshan at heidisoft.com, heshanmw at gmail dot com> + * TODO: add common settings from video module configurations and extend it from ffmpeg.inc + * since we need to have executable path of ffmpeg to ffmpeg.inc we need to have it + */ + +/** + * Define some constants + */ +defined('VIDEO_RENDERING_PENDING') + or define('VIDEO_RENDERING_PENDING', 1); +defined('VIDEO_RENDERING_ACTIVE') + or define('VIDEO_RENDERING_ACTIVE', 5); +defined('VIDEO_RENDERING_COMPLETE') + or define('VIDEO_RENDERING_COMPLETE', 10); +defined('VIDEO_RENDERING_FAILED') + or define('VIDEO_RENDERING_FAILED', 20); + +// nice value to append at the beginning of the command +defined('VIDEO_RENDERING_NICE') + or define('VIDEO_RENDERING_NICE', 'nice -n 19'); + +// curl related data +defined('HTTP_CONNECT_TIMEOUT') + or define('HTTP_CONNECT_TIMEOUT', 600); +defined('HTTP_LOW_SPEED_LIMIT') + or define('HTTP_LOW_SPEED_LIMIT', 256); +defined('HTTP_LOW_SPEED_TIMEOUT') + or define('HTTP_LOW_SPEED_TIMEOUT', 600); + + +// TODO : add cron API to video module +function zencoder_cron() { + global $base_url; + + if(variable_get('video_zencoder_helper_auto_cvr_cron', true)) { + exec("php video_scheduler.php $base_url > /dev/null &"); + } +} + + +/** + * Get some informations from the video file + */ +function zencoder_get_video_info($vidfile) { + static $zencoder_info; + $fid = $vidfile['fid']; + // $command_output = cache_get($fid); + // if(empty($command_output)) { + // escape file name for safety + $file = escapeshellarg($vidfile['filepath']); + // create the full command to execute + $command = variable_get('video_transcoder_path', '/usr/bin/ffmpeg') . ' -i ' . $file; + + //execute the command + ob_start(); + passthru($command." 2>&1", $command_return); + $command_output = ob_get_contents(); + ob_end_clean(); + + // cache the result for further calls + // $zencoder_info[$vidfile['fid']] = $command_output; + // cache_set($vidfile['fid'], $command_output); + // } + + return $command_output; +} + + +/** + * Return the video resolution + */ +function zencoder_auto_resolution(&$node) { + + if(!variable_get('video_zencoder_helper_auto_resolution', false)) { + + // call ffmpeg -i + $zencoder_output = zencoder_get_video_info($node); + + // get resolution + $pattern = '/Video: .*, ([0-9]{2,4}x[0-9]{2,4})/'; + preg_match_all($pattern, $zencoder_output, $matches, PREG_PATTERN_ORDER); + $resolution = $matches[1][0]; + + return explode("x", $resolution); + } + return null; +} + + +/** + * Return the playtime seconds of a video + */ +function zencoder_auto_playtime($file) { + + if(!variable_get('video_zencoder_helper_auto_playtime', false)) { + + // call ffmpeg -i + $zencoder_output = zencoder_get_video_info($file); + + // get playtime + $pattern = '/Duration: ([0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9])/'; + preg_match_all($pattern, $zencoder_output, $matches, PREG_PATTERN_ORDER); + $playtime = $matches[1][0]; + + // ffmpeg return lenght as 00:00:31.1 Let's get playtime from that + $hmsmm = explode(":", $playtime); + + $tmp = explode(".", $hmsmm[2]); + $seconds = $tmp[0]; + + $hours = $hmsmm[0]; + $minutes = $hmsmm[1]; + + return $seconds + ($hours * 3600) + ($minutes * 60); + } +} + +/** + * Generates a thumbnail from the video file + * Implementing hook_auto_thumbnail on inc + * + * @param $vidfile + * object with element information + * + * @return + * a drupal file objects + */ +function zencoder_auto_thumbnail($vidfile) { + global $user; + $uploaded_file = $vidfile; + $fid = $uploaded_file["fid"]; + + // are we debugging? + // escape the filename for safety + $videofile = escapeshellarg($uploaded_file['filepath']); + $thumb_path = variable_get('video_thumb_path', 'video_thumbs'); + //files will save in files/video_thumbs/#fileId folder + $tmp = file_directory_path(). '/' . $thumb_path . '/' . $fid; + // Ensure the destination directory exists and is writable. + $directories = explode('/', $tmp); + // array_pop($directories); // Remove the file itself. + // Get the file system directory. + $file_system = file_directory_path(); + foreach ($directories as $directory) { + $full_path = isset($full_path) ? $full_path . '/' . $directory : $directory; + // Don't check directories outside the file system path. + if (strpos($full_path, $file_system) === 0) { + field_file_check_directory($full_path, FILE_CREATE_DIRECTORY); + } + } + $count = variable_get('no_of_video_thumbs', 5); + $duration = zencoder_auto_playtime($vidfile); + $files = NULL; + for($i = 1; $i <= $count; $i++) { + // get ffmpeg configurations + $seek = ($duration/$count) * $i; + $thumbfile = $tmp . "/video-thumb-for-$fid-$i.png"; + //skip files already exists, this will save ffmpeg traffic + if (!is_file($thumbfile)) { + $tnail = variable_get('video_transcoder_path', '/usr/bin/ffmpeg'); + $options = preg_replace(array('/%videofile/', '/%thumbfile/', '/%seek/'), array($videofile, $thumbfile, $seek), variable_get('video_zencoder_thumbnailer_options', '-i %videofile -an -y -f mjpeg -ss %seek -vframes 1 %thumbfile')); + // $options = preg_replace(array('/%videofile/', '/%tmp/', '/%id/', '/%interval/'), array($videofile, $tmp, $i, ($duration/$count)), variable_get('video_image_thumbnailer_options', '-ss %id*%interval -i %videofile -vframes 1 %thumbfile')); + // ffmpeg -ss $i*$interval -i intro.mov -vframes 1 -s 320x240 thumb_$i.jpg + //ffmpeg -i superstunt_8uiarzrh.mp4 -r 0.1 -ss 00:00:5 -f image2 img/images%02d.png + ////ffmpeg -i superstunt_8uiarzrh.mp4 -r 0.05 -ss 00:00:5 -f image2 img/images%1d.jpg + // executes the command + $command = "$tnail $options"; + ob_start(); + passthru($command." 2>&1", $tnail_return); + $tnail_output = ob_get_contents(); + ob_end_clean(); + if (!file_exists($thumbfile)) { + $error_param = array( + '%file' => $thumbfile, + '%cmd' => $command, + '%out' => $tnail_output, + ); + $error_msg = t("error generating thumbnail for video: generated file %file does not exist.<br />Command Executed:<br />%cmd<br />Command Output:<br />%out", $error_param); + // let's log this + watchdog('video_ffmpeg',$error_msg, array(), WATCHDOG_ERROR); + } + } + // Begin building file object. + //TODO : use file_munge_filename() + $file = new stdClass(); + $file->uid = $user->uid; + $file->status = FILE_STATUS_TEMPORARY; + $file->filename = trim("video-thumb-for-$fid-$i.png"); + $file->filepath = $thumbfile; + $file->filemime = file_get_mimetype("video-thumb-for-$fid-$i.png"); + $file->filesize = filesize($thumbfile); + $file->timestamp = time(); + $files[] = $file; + } + return $files; +} + +/** + * Implementing hook_chcek_exepath() on inc + * To check the the path is executable or not + * @param <type> path to check + * @return bool TRUE/FALSE + */ +function zencoder_check_exe_path($path=NULL) { + if (!$path) { + $path = variable_get('video_transcoder_path', '/usr/bin/ffmpeg'); + } + if (function_exists('is_executable')) { + $test = 'is_executable'; + } else { + $test = 'file_exists'; + } + return $test($path); +} + +/** + * Implementing hook_auto_convert(); + * @param <type> $job + */ +function zencoder_auto_convert(&$job) { + $videofile = escapeshellarg($job->filepath); // escape file name for safety + $convfile = tempnam(file_directory_temp(), 'video-rendering'); + $audiobitrate = variable_get('video_zencoder_helper_auto_cvr_audio_bitrate', 64); + $videobitrate = variable_get('video_zencoder_helper_auto_cvr_video_bitrate', 200); + $size = _video_render_get_size(); + $converter = variable_get('video_transcoder_path', '/usr/bin/ffmpeg'); + + $options = preg_replace(array('/%videofile/', '/%convertfile/', '/%audiobitrate/', '/%size/', '/%videobitrate/'), + array($videofile, $convfile, $audiobitrate, $size, $videobitrate), + variable_get('video_zencoder_helper_auto_cvr_options', + '-y -i %videofile -f flv -ar 22050 -ab %audiobitrate -s %size -b %videobitrate -qscale 1 %convertfile')); + + // set to the converted file output + $job->convfile = $convfile; + + $command = VIDEO_RENDERING_NICE . " $converter $options"; + + //print('executing ' . $command); die; + watchdog('video_render', 'executing: ' . $command, array(), WATCHDOG_DEBUG); +// watchdog('video_render', 'Starting : ' . time()); + //execute the command + ob_start(); + passthru($command." 2>&1", $command_return); + $command_output = ob_get_contents(); + ob_end_clean(); +// watchdog('video_render', 'Completed'); + //print $command_output; + + if (!file_exists($job->convfile) || !filesize($job->convfile)) { + watchdog('video_render', 'video conversion failed. ffmpeg reported the following output: ' . $command_output, array(), WATCHDOG_ERROR); + // _video_render_set_video_encoded_fid($job->nid, $job->vid, -1); + // _video_render_job_change_status($job->nid, $job->vid, VIDEO_RENDERING_FAILED); + } + else { + $file_name = basename($job->filename . ".flv"); + $file = new stdClass(); + $file->uid = $job->uid; + $file->status = FILE_STATUS_PERMANENT; + $file->filename = basename($file_name); + $file->filepath = $job->convfile; + $file->filemime = file_get_mimetype($file_name); + $file->filesize = filesize($job->convfile); + $file->timestamp = time(); + + $job->converted = $file; + } +} + + +/** + * Calculate the converted video size basing on the width set on administration. + * Aspect ration is maintained. + */ +//function _video_render_get_size() { +// return variable_get('video_zencoder_width', 640) . 'x' . variable_get('video_zencoder_height', 480); +//} + + +function _video_curl_post($url, $fields, &$output) { + + $options = array( + CURLOPT_POST => TRUE, + CURLOPT_POSTFIELDS => $fields, + CURLOPT_CONNECTTIMEOUT => HTTP_CONNECT_TIMEOUT, + CURLOPT_LOW_SPEED_LIMIT => HTTP_LOW_SPEED_LIMIT, + CURLOPT_LOW_SPEED_TIME => HTTP_LOW_SPEED_TIMEOUT, + CURLOPT_RETURNTRANSFER => TRUE + ); + + $ch = curl_init($url); + curl_setopt_array($ch, $options); + $output = curl_exec($ch); + $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + + return $http_code; +} + +/** S3 API functions **/ +/** ---------------- **/ diff --git a/po/de.po b/po/de.po deleted file mode 100644 index 3902171..0000000 --- a/po/de.po +++ /dev/null @@ -1,624 +0,0 @@ -# Translation of video-module.pot to German. -# $Id$ -# Uwe Hermann <uwe@hermann-uwe.de>, 2005. -msgid "" -"" -msgstr "Project-Id-Version: de\n" -"POT-Creation-Date: 2005-08-31 21:59+0000\n" -"PO-Revision-Date: 2006-10-28 23:08+0200\n" -"Last-Translator: Norbert Fuerst <nf@fuerstentum.net>\n" -"Language-Team: German\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: video.module:77 -msgid "<p>The video module is used to insert videos as nodes.</p>" -msgstr "<p>Mit dem Video Modul können Video-Einträge erstellt werden.</p>" - -#: video.module:79 -msgid "Allows video nodes." -msgstr "Ermöglicht Video Einträge." - -#: video.module:81 -msgid "Allows you to insert videos as nodes" -msgstr "Ermöglicht das Einfügen von Videos als Knoten" - -#: video.module:84 -msgid "Video File Field" -msgstr "Video-Datei Feld" - -#: video.module:85 -msgid "This is the field where you enter the video file information. The Video module currently supports these file types:" -msgstr "In dieses Feld wird die Video-Datei Information eingetragen. Das Video Modul unterstützt derzeit folgende Dateitypen:" - -#: video.module:86 -msgid ".mov, .wmv, .rm, .flv" -msgstr ".mov, .wmv, .rm, .flv" - -#: video.module:86 -msgid "To play these file types you need to enter in the path to the file. If your video is on the same webserver as drupal, you can use a path relative to the drupal directory, like \"downloads/video.mov\". If your video is on another server you can enter the URI to the video like \"http://www.example.com/videos/my-video.mov\"." -msgstr "" - -#: video.module:87 -msgid "YouTube.com support" -msgstr "YouTube.com Unterstützung" - -#: video.module:87 -msgid "You can host videos on youtube.com and put them on your site. To do this, after you upload the video on youtube.com enter the video ID into the \"Video File\" field. If the URI youtube.com gives you for the video is \"http://www.youtube.com/watch.php?v=XM4QYXPf-s8\" you would enter \"XM4QYXPf-s8\"." -msgstr "Video Dateien können auf YouTube.com hochgeladen und auf der eigenen Seite eingebunden werden. Dazu wird nach dem Hochladen auf YouTube.com die Video ID in das \"Video Datei\" Feld eingetragen. Wenn die URI, die YouTube.com für das Video anzeigt, \"http://www.youtube.com/watch.php?v=XM4QYXPf-s8\" ist, sollte \"XM4QYXPf-s8\" hier eingetragen werden." - -#: video.module:88 -msgid "Multi-file Dowload Help" -msgstr "Multi-Datei Download Hilfe" - -#: video.module:89 -msgid "If enabled, this group holds all the settings for multi-file downloads. Multi-file downloads allows you to have a list of any number of files on the download page. These files are usually scanned from a folder. This allows the listing of multiple sizes and video types for visitors to choose from, you can even zip the files up." -msgstr "Wenn aktiv, hält dieser Abschnitt alle Einstellungen für Multi-Datei Downloads. Diese ermöglichen eine beliebig lange Liste von Dateien auf der Download-Seite. Die Dateien werden üblicherweise aus einem Verzeichnis gelesen. Das ermöglicht das Angebot verschiedener Größen, Video-Typen und sogar komprimierten Dateien, unter denen der Besucher auswählen kann." - -#: video.module:90 -msgid "Disable multi-file downloads" -msgstr "Multi-Datei Downloads abschalten" - -#: video.module:90 -msgid "This checkbox will disable multi-file downloads for this video. This means the download tab and link will send visitors straight to download the same video as is set to play. Use this option if you only have one version of your video." -msgstr "Mit dieser Auswahl werden Multi-Datei Downloads für dieses Video verhindert. Das bedeutet, dass der Download-Reiter und Verweis Besucher direkt zum Download für jenes Video führt, das gerade zum Abspielen ausgewählt ist. " - -#: video.module:91 -msgid "Multi-file download folder" -msgstr "Multi-Datei Download Verzeichnis" - -#: video.module:91 -msgid "Allows you to specify a folder on the local server containing the files you wish to show up on the download tab. This folder should be relative to the drupal root directory, so if the absolute path is \"C:\\inetpub\\drupal\\videos\\projectfolder\\\" or \"/usr/htdocs/drupal/videos/projectfolder/\" then you would enter \"videos/projectfolder/\"." -msgstr "Damit wird ein lokales Verzeichnis am Server festgelegt, das jene Dateien enthält, die auf der Download-Seite gezeigt werden sollen. Dieses Verzeichnis ist relativ zum Drupal Verzeichnis. Wenn also der absolute Pfad \"C:\\inetpub\\drupal\\videos\\projectfolder\\\" oder \"/usr/htdocs/drupal/videos/projectfolder/\" ist, dann sollte hier \"videos/projectfolder/\" eingetragen werden." -"" - -#: video.module:92 -msgid "Show files in \"play\" folder" -msgstr "Dateien im Abspiel-Verzeichnis anzeigen" - -#: video.module:92 -msgid "This option will list all the files in the same folder is the \"play\" file listed in the \"Video File\" field above. You can use this option in addition to the download folder to list the videos in both folders." -msgstr "Mit dieser Einstellung werden alle Dateien gezeigt, die sich im gleichen Verzeichnis wie das im \"Video Feld\" aufgeführte Video befinden. Diese Einstellung kann zusätzlich zum Download-Verzeichnis gewählt werden, um Videos in beiden Verzeichnissen zu listen." - -#: video.module:111 -msgid "videos" -msgstr "Videos" - -#: video.module:117 -msgid "video" -msgstr "Video" - -#: video.module:134 -msgid "play" -msgstr "Abspielen" - -#: video.module:143 -msgid "download" -msgstr "Download" - -#: video.module:180 -msgid "play %link" -msgstr "%link abspielen" - -#: video.module:181 -msgid "or" -msgstr "oder" - -#: video.module:184 -msgid "visit %link" -msgstr "%link besuchen" - -#: video.module:251 -msgid "Location of Flash player skin" -msgstr "Pfad zum Flash Player Skin" - -#: video.module:253 -msgid "The location of the Shockwave skin for player controls on the Flash video. It should be a path relative to the Drupal root directory" -msgstr "Der Ort, an dem die Shockwave Skin für das Abspielmodul, das Flash Video wiedergibt, abgelegt ist. Der Pfad sollte relativ zum Drupal Verzeichnis angegeben werden." - -#: video.module:254 -msgid "Filename of Flash loader" -msgstr "Dateiname des Flash Laders" - -#: video.module:256 -msgid "The name of the Shockwave file that manages loading the FLV movie" -msgstr "Der Name der Shockwave Datei, die das Laden von FLV Videos kontrolliert" - -#: video.module:262 -msgid "Display play menu tab" -msgstr "Abspiel-Reiter anzeigen" - -#: video.module:264 -msgid "Toggle display of menu link to play video from the node page" -msgstr "Schaltet den Reiter für das Abspielen eines Videos von der Eintragsseite aus und ein." - -#: video.module:265 -msgid "Display download menu tab" -msgstr "Download-Reiter anzeigen" - -#: video.module:267 -msgid "Toggle display of menu link to download video from the node page" -msgstr "Schaltet den Reiter für das Herunterladen des Videos auf der Eintragsseite aus und ein. " - -#: video.module:268 -msgid "Display play link" -msgstr "Abspiel-Link anzeigen" - -#: video.module:270 -msgid "Toggle display of \"play\" link (below the node content in most themes)" -msgstr "Schaltet den \"Abspielen\” Link (unter dem Beitrag in den meisten Themes) ein oder aus." - -#: video.module:271 -msgid "Display download link" -msgstr "Link zum Herunterladen anzeigen" - -#: video.module:273 -msgid "Toggle display of \"download\" link (below the node content in most themes)" -msgstr "Schaltet den \"Herunterladen\" Link (unter dem Beitrag in den meisten Themes) ein oder aus." - -#: video.module:274 -msgid "Display playtime" -msgstr "Spieldauer anzeigen" - -#: video.module:276 -msgid "Toggle the display of the playtime for a video" -msgstr "Schaltet die Anzeige der Spieldauer ein oder aus." - -#: video.module:277 -msgid "Display filesize" -msgstr "Dateigröße anzeigen" - -#: video.module:279 -msgid "Toggle the display of the filesize for a video" -msgstr "Schaltet die Anzeige der Dateigröße eines Videos ein oder aus" - -#: video.module:280 -msgid "Count play hits" -msgstr "Anzahl der Wiedergaben zählen" - -#: video.module:282 -msgid "Counts a hit everytime someone views the play page. To allow users to view counter visit: " -msgstr "Der Zähler erhöht sich bei jedem Abspielen. Um Besuchern den Zähler anzuzeigen, besuchen Sie:" - -#: video.module:282 -msgid "access control" -msgstr "Zugriffskontrolle" - -#: video.module:283 -msgid "Count downloads" -msgstr "Downloads zählen" - -#: video.module:285 -msgid "Counts a hit everytime someone downloads a video. To allow users to view counter visit: " -msgstr "Zählt jeden Download des Videos. Um Besuchern den Zähler anzuzeigen, besuchen Sie:" - -#: video.module:286 -msgid "Allow Multi-file Downloads" -msgstr "Multi-Datei Downloads zulassen" - -#: video.module:288 -msgid "Allows a list of files to be shown on the download page. The list is usually gotten from a specified folder. This ability is useful for providing different sizes and video types for download. This can be disabled separately for each node. If turned on make sure you set the permissions so users can use it." -msgstr "Ermöglicht die Anzeige einer Liste von Dateien auf der Download-Seite. Die Liste wird normalerweise von einem angegebenen Verzeichnis generiert. Damit können verschiedene Dateigrößen und Video-Formate zum Download angeboten werden. Diese Einstellung kann für jeden Beitrag gesondert ausgeschaltet werden. Wenn diese Einstellung gewählt wird, sollten die Zugriffsrechte kontrolliert werden, um Besuchern den Zugriff zu ermöglichen." - -#: video.module:289 -msgid "File extensions to show" -msgstr "Angezeigte Datei-Erweiterungen" - -#: video.module:291 -msgid "The extensions of files to list from the multi-file download folder on the download page. Extensions should be comma seperated with no spaces, for example (mov,wmv,rm)." -msgstr "Die Erweiterungen der Dateien, die bei einem Multi-Datei Download angeboten werden sollen. Erweiterungen sollten ohne Leerzstellen, mit Kommata getrennt, eingetragen werden (z.B.: mov,wmv,rm)." - -#: video.module:292 -msgid "Custom field group title" -msgstr "Titel für die Gruppe der zusätzlichen Felder" - -#: video.module:292 -msgid "Title of the group of all custom fields." -msgstr "Titel der Gruppe aller zusätzlichen Felder" - -#: video.module:293 -msgid "Start group initially collapsed" -msgstr "Gruppe anfänglich geschlossen darstellen" - -#: video.module:295 -msgid "Should the custom fields group be initially collapsed when creating and editing video pages?" -msgstr "Soll die Gruppe der zusätzlichen Felder beim Erstellen und Bearbeiten von Video-Einträgen zunächst nur die Überschrift anzeigen? " - -#: video.module:296 -msgid "Custom field 1 title" -msgstr "Titel für zusätzliches Feld 1" - -#: video.module:297 -msgid "Custom field 2 title" -msgstr "Titel für zusätzliches Feld 2" - -#: video.module:298 -msgid "Custom field 3 title" -msgstr "Titel für zusätzliches Feld 3" - -#: video.module:299 -msgid "Custom field 4 title" -msgstr "Titel für zusätzliches Feld 4" - -#: video.module:300 -msgid "Custom field 5 title" -msgstr "Titel für zusätzliches Feld 5" - -#: video.module:301 -msgid "Custom field 6 title" -msgstr "Titel für zusätzliches Feld 6" - -#: video.module:302 -msgid "Custom Fields" -msgstr "Zusätzliche Felder" - -#: video.module:302 -msgid "Creates custom fields. Fields only show up if you give them a name." -msgstr "Erstellt zusätzliche Felder, die nur angezeigt werden, wenn ein Titel eingetragen wurde." - -#: video.module:345 -msgid "Video File" -msgstr "Videodatei" - -#: video.module:345 -msgid "Put here the video file path. You can use either relative to the drupal root directory (something/video.mov) or absolute (http://www.example.com/videos/videos.mov). Windows Media currently requires a fully qualified URL to function. Flash movies may not play with spaces in the path or filename. To add youtube.com videos enter the video ID. If your video was at (http://www.youtube.com/watch.php?v=aBM4QYXPf-s) you would enter (aBM4QYXPf-s). " -msgstr "Hier wird der Pfad zur Video-Datei eingetragen. Dieser Pfad kann relativ zum Drupal Verzeichnis sein (z.B. videos/video.mov) oder ein voll qualifizierter URI (http://www.beispiel.at/videos/video.mov). Windows Media Dateien erfordern jedenfalls die Angabe eines korrekten URI. Flash Filme sollten keine Leerstellen im Dateinamen oder Pfad aufweisen. Um YouTube.com videos einzubinden, wird die YouTube.com Video-ID eingetragen. Wenn der URI zum Video auf YouTube.com http://www.youtube.com/watch.php?v=aBM4QYXPf-s ist, wird hier aBM4QYXPf-s eingetragen." - -#: video.module:345 -msgid "More information." -msgstr "Weitere Informationen" - -#: video.module:346 -msgid "Video Size x" -msgstr "Breite des Videos" - -#: video.module:346 -msgid "Horizontal video pixel size." -msgstr "Die Breite des Videos in Pixel" - -#: video.module:347 -msgid "Video Size y" -msgstr "Höhe des Videos" - -#: video.module:347 -msgid "Vertical video pixel size." -msgstr "Die Höhe des Videos in Pixel" - -#: video.module:350 -msgid "Disables multi-file downloads for this video only." -msgstr "Multi-Datei Downloads nur für dieses Video verhindern. " - -#: video.module:351 -msgid "Enter the folder containing your videos. It must be relative from the drupal directory. If the absolute path is \"C:\\inetpub\\drupal\\videos\\projectfolder\\\" or \"/usr/htdocs/drupal/videos/projectfolder/\" then enter something like \"videos/projectfolder/\"." -msgstr "Hier wird das Verzeichnis, in dem die Videos abgelegt werden, relativ zum Drupal Verzeichnis eingetragen. Wenn der absolute Pfad \"C:\\inetpub\\drupal\\videos\\projectfolder\\\" oder \"/usr/htdocs/drupal/videos/projectfolder/\" ist, sollte beispielsweise \"videos/projectfolder/\" eingetragen werden." - -#: video.module:352 -msgid "Display videos in the same directory as the \"play\" video. If folder above is entered this will be in addition." -msgstr "Videos im selben Verzeichnis wie das abgespielte Video. Wenn oben ein Verzeichnis angegeben wurde, ist dieser Eintrag zusätzlich." - -#: video.module:353 -msgid "Multiple files in download tab" -msgstr "Mehrere Dateien auf der Download-Seite" - -#: video.module:353 -msgid "These options allow you to have multiple files shown on the download page. This is useful for allowing users to download different file sizes and video formats. " -msgstr "Damit können mehrere Dateien auf der Download-Seite angezeigt werden. Dies ermöglicht das Angebot verschiedener Dateigrößen und Video-Formate." - -#: video.module:356 -msgid "Size" -msgstr "Größe" - -#: video.module:356 -msgid "If the video is on the local server the size will be set automatically. Otherwise enter a value, 0 will turn the display off. Must be less than 2GB." -msgstr "Liegt das Video auf dem lokalen Server, wird die Größe automatisch eingetragen. Andernfalls ist die Dateigröße von Hand einzutragen. Die Angabe von 0 (Null) unterdrückt die Anzeige. Die Dateigröße muss kleiner als 2 GB sein." - -#: video.module:357 -msgid "bytes" -msgstr "Bytes" - -#: video.module:357 -msgid "Kilobits" -msgstr "Kilobits" - -#: video.module:357 -msgid "KiloBytes" -msgstr "Kilobytes" - -#: video.module:357 -msgid "Megabits" -msgstr "Megabits" - -#: video.module:357 -msgid "MegaBytes" -msgstr "Megabytes" - -#: video.module:357 -msgid "Gigabits" -msgstr "Gigabits" - -#: video.module:357 -msgid "GigaBytes" -msgstr "Gigabytes" - -#: video.module:358 -msgid "Filesize" -msgstr "Dateigröße" - -#: video.module:361 -msgid "Hours" -msgstr "Stunden" - -#: video.module:361 -msgid "Integer of hours" -msgstr "Ganze Stunden" - -#: video.module:362 -msgid "Minutes" -msgstr "Minuten" - -#: video.module:362 -msgid "Integer of minutes" -msgstr "Ganze Minuten" - -#: video.module:363 -msgid "Seconds" -msgstr "Sekunden" - -#: video.module:363 -msgid "Integer of seconds" -msgstr "Ganze Sekunden" - -#: video.module:364 -msgid "Playtime" -msgstr "Spieldauer" - -#: video.module:364 -msgid "Values may be entered in excess of their normal \"clock maximum\" (the seconds field may be 3600 to represent 1 hour), however each value will be summed for a total of all three." -msgstr "Werte können hier in beliebiger Größe eingegeben werden (z.B. die Angabe von 3600 Sekunden bedeutet eine Spieldauer von einer Stunde). Alle drei Angaben werden summiert." - -#: video.module:389 -msgid "Video Bitrate" -msgstr "Video Bitrate" - -#: video.module:389 -msgid "Integer value of video bitrate" -msgstr "Ganzzahlige Video Bitrate" - -#: video.module:390 -msgid "Audio Bitrate" -msgstr "Audio Bitrate" - -#: video.module:390 -msgid "Integer value of audio bitrate" -msgstr "Ganzzahlige Audio-Bitrate" - -#: video.module:391 -msgid "Audio Sampling Rate" -msgstr "Audio Sampling Rate" - -#: video.module:391 -msgid "Integer value of audio sampling rate in Hz" -msgstr "Ganzzahlige Sampling-rate in Hertz" - -#: video.module:392 -msgid "Audio Channels" -msgstr "Tonspuren" - -#: video.module:392 -msgid "Stereo" -msgstr "Stereo" - -#: video.module:392 -msgid "Mono" -msgstr "Mono" - -#: video.module:393 -msgid "Optional Metadata" -msgstr "Zusätzliche Metadaten" - -#: video.module:393 -msgid "Metadata entered here will not be displayed. It is currently for administrative reference only." -msgstr "Hier eingetragene Metadaten werden nicht angezeigt und dienen nur zur Information des System-Verwalters." - -#: video.module:399 -msgid "Body" -msgstr "Text" - -#: video.module:399 -msgid "Textual description of the video." -msgstr "Beschreibung des Videos." - -#: video.module:450 -msgid "You have to insert a valid file path for this video" -msgstr "Es muss ein gültiger Pfad zu diesem Video eingetragen werden" - -#: video.module:458 -msgid "A video %link-to-existing using that link already exists" -msgstr "Es gibt bereits ein Video %link-to-existing, das diesen Link benutzt." - -#: video.module:463 -msgid "You have to insert a valid horizontal pixel size for this video" -msgstr "Die Breite des Videos muss angegeben werden." - -#: video.module:466 -msgid "You have to insert a valid vertical pixel size for this video" -msgstr "Die Höhe des Video muss angegeben werden." - -#: video.module:473 -msgid "You have to insert a valid file size for this video" -msgstr "Eine zulässige Dateigröße muss für dieses Video eingetragen werden" - -#: video.module:479 -msgid "If you don't select a multi-file download option you must disable the feature." -msgstr "Wenn die Multi-Datei Download Option nicht gewählt wurde, muss diese Einstellung deaktiviert werden." - -#: video.module:480 -msgid "Download directory does not exist. Make sure it has a trailing forward slash \"/\"." -msgstr "Das Verzeichnis für den Download ist nicht vorhanden. Der Pfad muss mit einem Schrägstrich \"/\" beginnen." - -#: video.module:481 -msgid "You must either use the folder of the \"play\" video or enter a folder." -msgstr "Es muss entweder das Verzeichnis des abgespielten Videos gewählt oder ein Verzeichnis angegeben werden." - -#: video.module:492 -msgid "You have to insert valid playtime informations for this video." -msgstr "Eine gültige Spieldauer für dieses Video ist einzutragen." - -#: video.module:530 -msgid "Top videos" -msgstr "Beliebteste Videos" - -#: video.module:531 -msgid "Latest videos" -msgstr "Neueste Videos" - -#: video.module:721 -msgid "There are no files to download for this video." -msgstr "Zu diesem Video wird kein Download angeboten." - -#: video.module:805 -msgid "Playing" -msgstr "Spielt" - -#: video.module:866 -msgid "http://www.macromedia.com/go/getflashplayer" -msgstr "" - -#: video.module:867 -msgid "Link to Macromedia Flash Player Download Page" -msgstr "Link zur Adobe-Macromedia Flash Player Download Seite" - -#: video.module:868 -msgid "Download latest Flash Player" -msgstr "Den aktuellen Flash Player holen" - -#: video.module:889 -msgid "http://www.apple.com/quicktime/download" -msgstr "" - -#: video.module:890 -msgid "Link to QuickTime Download Page" -msgstr "Link zur Apple Quicktime Download Seite" - -#: video.module:891 -msgid "Download latest Quicktime Player" -msgstr "Den aktuellen Quicktime Player holen" - -#: video.module:925 -msgid "http://www.real.com/" -msgstr "" - -#: video.module:926 -msgid "Link to Real" -msgstr "Link zu Real" - -#: video.module:927 -msgid "Download latest Realmedia Player" -msgstr "Den aktuellen Realmedia Player holen" - -#: video.module:963 -msgid "http://windowsupdate.microsoft.com/" -msgstr "" - -#: video.module:964 -msgid "Link to Windows Update" -msgstr "Link zur Microsoft Windows Update Seite" - -#: video.module:965 -msgid "Download latest Windows Media Player" -msgstr "Den aktuellen Windows Media Player holen" - -#: video.module:985 -msgid "http://www.youtube.com/help.php" -msgstr "" - -#: video.module:985 -msgid "Link to youtube.com" -msgstr "Link zu YouTube.com" - -#: video.module:985 -msgid "youtube.com" -msgstr "YouTube.com" - -#: video.module:1006 -msgid "Problems viewing videos?" -msgstr "Kein Video zu sehen?" - -#: video.module:1140 -msgid "QuickTime Homepage" -msgstr "Quicktime Seite im Web" - -#: video.module:1140 -msgid "Quicktime" -msgstr "Quicktime" - -#: video.module:1141 -msgid "Windows Media Homepage" -msgstr "Windows Media Seite im Web" - -#: video.module:1141 -msgid "Windows Media" -msgstr "Windows Media" - -#: video.module:1142 -msgid "Real Media Homepage" -msgstr "Real Media Seite im Web" - -#: video.module:1142 -msgid "Real Media" -msgstr "Real Media" - -#: video.module:1143 -msgid "AVI Information at wikipedia.org" -msgstr "AVI Information bei Wikipedia.org" - -#: video.module:1143 -msgid "AVI" -msgstr "AVI" - -# foo -#: video.module:1144 -msgid "ZIP Information at wikipedia.org" -msgstr "ZIP Information auf wikipedia.org" - -#: video.module:1144 -msgid "ZIP" -msgstr "ZIP" - -#: video.module:1145 -msgid "Divx Homepage" -msgstr "DIVX Homepage" - -#: video.module:1145 -msgid "DIVX" -msgstr "DIVX" - -#: video.module:1146 -msgid "Macromedia Flash Homepage" -msgstr "Macromedia Flash Homepage" - -#: video.module:1146 -msgid "Flash FLV" -msgstr "Flash FLV" - -#: video.module:1154 -msgid "File Link" -msgstr "Link zur Datei" - -#: video.module:1154 -msgid "File Size" -msgstr "Dateigröße" - -#: video.module:1154 -msgid "File Type" -msgstr "Dateityp" - -#: video.module:1173 -msgid "View" -msgstr "Ansehen" - -#: video.module:1176 -msgid "Downloading" -msgstr "Lädt vom Server" diff --git a/po/es.po b/po/es.po deleted file mode 100644 index 1a0f9a8..0000000 --- a/po/es.po +++ /dev/null @@ -1,623 +0,0 @@ -# Translation of video-module.pot to Spanish. -# Jorge Saldivar Galli <augus_21@yahoo.com>, 2009. -msgid "" -"" -msgstr "Project-Id-Version: de\n" -"POT-Creation-Date: 2009-07-20\n" -"PO-Revision-Date: 2006-10-28 23:08+0200\n" -"Last-Translator: Jorge Saldivar Galli <augus_21@yahoo.com>\n" -"Language-Team: Spanish\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#: video.module:77 -msgid "<p>The video module is used to insert videos as nodes.</p>" -msgstr "<p>El modulo video es utilizado para insertar videos como nodos.</p>" - -#: video.module:79 -msgid "Allows video nodes." -msgstr "Permitir nodos de video." - -#: video.module:81 -msgid "Allows you to insert videos as nodes" -msgstr "Permitir a usted insertar videos como nodos." - -#: video.module:84 -msgid "Video File Field" -msgstr "Campo de Archivo Video" - -#: video.module:85 -msgid "This is the field where you enter the video file information. The Video module currently supports these file types:" -msgstr "Es es el campo donde ustede debe introducir inforamción sobre el archivo de video. El modulo video actualmente soporta estos tipos de arhivo:" - -#: video.module:86 -msgid ".mov, .wmv, .rm, .flv" -msgstr ".mov, .wmv, .rm, .flv" - -#: video.module:86 -msgid "To play these file types you need to enter in the path to the file. If your video is on the same webserver as drupal, you can use a path relative to the drupal directory, like \"downloads/video.mov\". If your video is on another server you can enter the URI to the video like \"http://www.example.com/videos/my-video.mov\"." -msgstr "" - -#: video.module:87 -msgid "YouTube.com support" -msgstr "Soporte YouTube.com" - -#: video.module:87 -msgid "You can host videos on youtube.com and put them on your site. To do this, after you upload the video on youtube.com enter the video ID into the \"Video File\" field. If the URI youtube.com gives you for the video is \"http://www.youtube.com/watch.php?v=XM4QYXPf-s8\" you would enter \"XM4QYXPf-s8\"." -msgstr "Puede alojar videos de youtube.com y colcarlos en su sitio. Para hacer esto, después de subir el video a youtube.com ingrese el video ID en el campo de \"Archivo de Video\". Si el URI de youtube.com para el video es \"http://www.youtube.com/watch.php?v=XM4QYXPf-s8\" usted puede ingresar \"XM4QYXPf-s8\"." - -#: video.module:88 -msgid "Multi-file Dowload Help" -msgstr "Ayuda para subir multiples archivos" - -#: video.module:89 -msgid "If enabled, this group holds all the settings for multi-file downloads. Multi-file downloads allows you to have a list of any number of files on the download page. These files are usually scanned from a folder. This allows the listing of multiple sizes and video types for visitors to choose from, you can even zip the files up." -msgstr "" - -#: video.module:90 -msgid "Disable multi-file downloads" -msgstr "Deshabilitar subir multiples archivos" - -#: video.module:90 -msgid "This checkbox will disable multi-file downloads for this video. This means the download tab and link will send visitors straight to download the same video as is set to play. Use this option if you only have one version of your video." -msgstr "" - -#: video.module:91 -msgid "Multi-file download folder" -msgstr "Carpeta para subir múltiples archivos." - -#: video.module:91 -msgid "Allows you to specify a folder on the local server containing the files you wish to show up on the download tab. This folder should be relative to the drupal root directory, so if the absolute path is \"C:\\inetpub\\drupal\\videos\\projectfolder\\\" or \"/usr/htdocs/drupal/videos/projectfolder/\" then you would enter \"videos/projectfolder/\"." -msgstr "" -"" - -#: video.module:92 -msgid "Show files in \"play\" folder" -msgstr "Mostrar archivos de la carpeta \"play\"" - -#: video.module:92 -msgid "This option will list all the files in the same folder is the \"play\" file listed in the \"Video File\" field above. You can use this option in addition to the download folder to list the videos in both folders." -msgstr "" - -#: video.module:111 -msgid "videos" -msgstr "Videos" - -#: video.module:117 -msgid "video" -msgstr "Video" - -#: video.module:134 -msgid "play" -msgstr "Visto" - -#: video.module:143 -msgid "download" -msgstr "Descargar" - -#: video.module:180 -msgid "play %link" -msgstr "ver %link" - -#: video.module:181 -msgid "or" -msgstr "o" - -#: video.module:184 -msgid "visit %link" -msgstr "visitar %link" - -#: video.module:251 -msgid "Location of Flash player skin" -msgstr "Directorio del skin del reproductor Flash" - -#: video.module:253 -msgid "The location of the Shockwave skin for player controls on the Flash video. It should be a path relative to the Drupal root directory" -msgstr "" - -#: video.module:254 -msgid "Filename of Flash loader" -msgstr "Nombre de archivo de Flash Laders" - -#: video.module:256 -msgid "The name of the Shockwave file that manages loading the FLV movie" -msgstr "" - -#: video.module:262 -msgid "Display play menu tab" -msgstr "Mostrar Ver Tab Menu" - -#: video.module:264 -msgid "Toggle display of menu link to play video from the node page" -msgstr "" - -#: video.module:265 -msgid "Display download menu tab" -msgstr "Mostrar Descargar Tab Menu" - -#: video.module:267 -msgid "Toggle display of menu link to download video from the node page" -msgstr "" - -#: video.module:268 -msgid "Display play link" -msgstr "Mostar Enlace Ver" - -#: video.module:270 -msgid "Toggle display of \"play\" link (below the node content in most themes)" -msgstr "" - -#: video.module:271 -msgid "Display download link" -msgstr "Mostrar Enlace Descargar" - -#: video.module:273 -msgid "Toggle display of \"download\" link (below the node content in most themes)" -msgstr "" - -#: video.module:274 -msgid "Display playtime" -msgstr "Mostrar Tiempo de Duración" - -#: video.module:276 -msgid "Toggle the display of the playtime for a video" -msgstr "" - -#: video.module:277 -msgid "Display filesize" -msgstr "Mostrar Tamaño del Archivo" - -#: video.module:279 -msgid "Toggle the display of the filesize for a video" -msgstr "" - -#: video.module:280 -msgid "Count play hits" -msgstr "Contador de cantidad de visitas" - -#: video.module:282 -msgid "Counts a hit everytime someone views the play page. To allow users to view counter visit: " -msgstr "Contar cada vez que alguien ve la página del video. Permitir a los usuarios ver el contador de visitas:" - -#: video.module:282 -msgid "access control" -msgstr "Control de Acceso" - -#: video.module:283 -msgid "Count downloads" -msgstr "Contador de Descargas" - -#: video.module:285 -msgid "Counts a hit everytime someone downloads a video. To allow users to view counter visit: " -msgstr "Contar cada vez que alguien descarga el video. Permitir a los usuarios ver el contador de descargas." - -#: video.module:286 -msgid "Allow Multi-file Downloads" -msgstr "Permitir descarfa múltiple de archivos" - -#: video.module:288 -msgid "Allows a list of files to be shown on the download page. The list is usually gotten from a specified folder. This ability is useful for providing different sizes and video types for download. This can be disabled separately for each node. If turned on make sure you set the permissions so users can use it." -msgstr "" - -#: video.module:289 -msgid "File extensions to show" -msgstr "Extensiones de archivo a mostrar" - -#: video.module:291 -msgid "The extensions of files to list from the multi-file download folder on the download page. Extensions should be comma seperated with no spaces, for example (mov,wmv,rm)." -msgstr "" - -#: video.module:292 -msgid "Custom field group title" -msgstr "" - -#: video.module:292 -msgid "Title of the group of all custom fields." -msgstr "" - -#: video.module:293 -msgid "Start group initially collapsed" -msgstr "Mostar grupo inicialmente no extendido" - -#: video.module:295 -msgid "Should the custom fields group be initially collapsed when creating and editing video pages?" -msgstr "" - -#: video.module:296 -msgid "Custom field 1 title" -msgstr "" - -#: video.module:297 -msgid "Custom field 2 title" -msgstr "" - -#: video.module:298 -msgid "Custom field 3 title" -msgstr "" - -#: video.module:299 -msgid "Custom field 4 title" -msgstr "" - -#: video.module:300 -msgid "Custom field 5 title" -msgstr "" - -#: video.module:301 -msgid "Custom field 6 title" -msgstr "" - -#: video.module:302 -msgid "Custom Fields" -msgstr "" - -#: video.module:302 -msgid "Creates custom fields. Fields only show up if you give them a name." -msgstr "" - -#: video.module:345 -msgid "Video File" -msgstr "Archivo de Video" - -#: video.module:345 -msgid "Put here the video file path. You can use either relative to the drupal root directory (something/video.mov) or absolute (http://www.example.com/videos/videos.mov). Windows Media currently requires a fully qualified URL to function. Flash movies may not play with spaces in the path or filename. To add youtube.com videos enter the video ID. If your video was at (http://www.youtube.com/watch.php?v=aBM4QYXPf-s) you would enter (aBM4QYXPf-s). " -msgstr "" - -#: video.module:345 -msgid "More information." -msgstr "Más información" - -#: video.module:346 -msgid "Video Size x" -msgstr "Tamaño x del Video" - -#: video.module:346 -msgid "Horizontal video pixel size." -msgstr "Tamaño horizontal del video en pixeles" - -#: video.module:347 -msgid "Video Size y" -msgstr "Tamaño y del Video" - -#: video.module:347 -msgid "Vertical video pixel size." -msgstr "Tamaño vertical del video en pixeles" - -#: video.module:350 -msgid "Disables multi-file downloads for this video only." -msgstr "Deshabilitar solo para este video descargas multiples de archivos" - -#: video.module:351 -msgid "Enter the folder containing your videos. It must be relative from the drupal directory. If the absolute path is \"C:\\inetpub\\drupal\\videos\\projectfolder\\\" or \"/usr/htdocs/drupal/videos/projectfolder/\" then enter something like \"videos/projectfolder/\"." -msgstr "" - -#: video.module:352 -msgid "Display videos in the same directory as the \"play\" video. If folder above is entered this will be in addition." -msgstr "" - -#: video.module:353 -msgid "Multiple files in download tab" -msgstr "" - -#: video.module:353 -msgid "These options allow you to have multiple files shown on the download page. This is useful for allowing users to download different file sizes and video formats. " -msgstr "" - -#: video.module:356 -msgid "Size" -msgstr "Tamaño" - -#: video.module:356 -msgid "If the video is on the local server the size will be set automatically. Otherwise enter a value, 0 will turn the display off. Must be less than 2GB." -msgstr "Si el vídeo está en el servidor local el tamaño se ajusta automáticamente. De lo contrario introduzca un valor, 0 apagará la pantalla. Debe ser inferior a 2 GB." - -#: video.module:357 -msgid "bytes" -msgstr "Bytes" - -#: video.module:357 -msgid "Kilobits" -msgstr "Kilobits" - -#: video.module:357 -msgid "KiloBytes" -msgstr "Kilobytes" - -#: video.module:357 -msgid "Megabits" -msgstr "Megabits" - -#: video.module:357 -msgid "MegaBytes" -msgstr "Megabytes" - -#: video.module:357 -msgid "Gigabits" -msgstr "Gigabits" - -#: video.module:357 -msgid "GigaBytes" -msgstr "Gigabytes" - -#: video.module:358 -msgid "Filesize" -msgstr "Tamaño de Archivo" - -#: video.module:361 -msgid "Hours" -msgstr "Horas" - -#: video.module:361 -msgid "Integer of hours" -msgstr "Entero de horas" - -#: video.module:362 -msgid "Minutes" -msgstr "Minutos" - -#: video.module:362 -msgid "Integer of minutes" -msgstr "Entero de minutos" - -#: video.module:363 -msgid "Seconds" -msgstr "Segundos" - -#: video.module:363 -msgid "Integer of seconds" -msgstr "Entero de segundos" - -#: video.module:364 -msgid "Playtime" -msgstr "Tiempo de ejecución" - -#: video.module:364 -msgid "Values may be entered in excess of their normal \"clock maximum\" (the seconds field may be 3600 to represent 1 hour), however each value will be summed for a total of all three." -msgstr "Se puede introducir valores por encima de su \"máximo normal de reloj\" (el segundo campo puede ser 3600 para representar a 1 hora), sin embargo cada uno de los valores se suman para un total de los tres." - -#: video.module:389 -msgid "Video Bitrate" -msgstr "Video Bitrate" - -#: video.module:389 -msgid "Integer value of video bitrate" -msgstr "Valor entero para el video bitrate" - -#: video.module:390 -msgid "Audio Bitrate" -msgstr "Audio Bitrate" - -#: video.module:390 -msgid "Integer value of audio bitrate" -msgstr "Valor entero para el audio bitrate" - -#: video.module:391 -msgid "Audio Sampling Rate" -msgstr "Audio Sampling Rate" - -#: video.module:391 -msgid "Integer value of audio sampling rate in Hz" -msgstr "Valor entero para el sampling rate en Hz" - -#: video.module:392 -msgid "Audio Channels" -msgstr "Canales de Audio" - -#: video.module:392 -msgid "Stereo" -msgstr "Stereo" - -#: video.module:392 -msgid "Mono" -msgstr "Mono" - -#: video.module:393 -msgid "Optional Metadata" -msgstr "Metadato opcional" - -#: video.module:393 -msgid "Metadata entered here will not be displayed. It is currently for administrative reference only." -msgstr "Los metadatos aquí ingresados no se mostrará. Es sólo para referencia administrativa." - -#: video.module:399 -msgid "Body" -msgstr "Texto" - -#: video.module:399 -msgid "Textual description of the video." -msgstr "Descripción del Video" - -#: video.module:450 -msgid "You have to insert a valid file path for this video" -msgstr "Debe ingresar una ruta válida al archivo de video" - -#: video.module:458 -msgid "A video %link-to-existing using that link already exists" -msgstr "" - -#: video.module:463 -msgid "You have to insert a valid horizontal pixel size for this video" -msgstr "Debe introducir un tamaño válido en píxeles horizontales para este vídeo" - -#: video.module:466 -msgid "You have to insert a valid vertical pixel size for this video" -msgstr "Debe introducir un tamaño válido en píxeles verticales para este vídeo" - -#: video.module:473 -msgid "You have to insert a valid file size for this video" -msgstr "Debe introducir un tamaño válido de archivo para este vídeo" - -#: video.module:479 -msgid "If you don't select a multi-file download option you must disable the feature." -msgstr "Si no selecciona la opción de descargas múltiples debe deshabilitar esta prestación." - -#: video.module:480 -msgid "Download directory does not exist. Make sure it has a trailing forward slash \"/\"." -msgstr "" - -#: video.module:481 -msgid "You must either use the folder of the \"play\" video or enter a folder." -msgstr "Debe ingresar la carpeta de los video o ingresar una carpeta" - -#: video.module:492 -msgid "You have to insert valid playtime informations for this video." -msgstr "Debe introducir un tiempo válido de duración para este vídeo" - -#: video.module:530 -msgid "Top videos" -msgstr "Mejores Videos" - -#: video.module:531 -msgid "Latest videos" -msgstr "Últimos Videos" - -#: video.module:721 -msgid "There are no files to download for this video." -msgstr "No éxiste un archivo para descargar asociado a este video." - -#: video.module:805 -msgid "Playing" -msgstr "Viendo" - -#: video.module:866 -msgid "http://www.macromedia.com/go/getflashplayer" -msgstr "" - -#: video.module:867 -msgid "Link to Macromedia Flash Player Download Page" -msgstr "Enlace a Macromedia Flash Player Download Page" - -#: video.module:868 -msgid "Download latest Flash Player" -msgstr "Descargar la última versión de Flash Player" - -#: video.module:889 -msgid "http://www.apple.com/quicktime/download" -msgstr "" - -#: video.module:890 -msgid "Link to QuickTime Download Page" -msgstr "Enlace QuickTime Download Page" - -#: video.module:891 -msgid "Download latest Quicktime Player" -msgstr "Descargar la última versión de Quicktime Player" - -#: video.module:925 -msgid "http://www.real.com/" -msgstr "" - -#: video.module:926 -msgid "Link to Real" -msgstr "Enlace a Real" - -#: video.module:927 -msgid "Download latest Realmedia Player" -msgstr "Descargar la última versión de Realmedia Player" - -#: video.module:963 -msgid "http://windowsupdate.microsoft.com/" -msgstr "" - -#: video.module:964 -msgid "Link to Windows Update" -msgstr "Enlace a Windows Update" - -#: video.module:965 -msgid "Download latest Windows Media Player" -msgstr "Descargar la última versión de Windows Media Player" - -#: video.module:985 -msgid "http://www.youtube.com/help.php" -msgstr "" - -#: video.module:985 -msgid "Link to youtube.com" -msgstr "Enlace a YouTube.com" - -#: video.module:985 -msgid "youtube.com" -msgstr "YouTube.com" - -#: video.module:1006 -msgid "Problems viewing videos?" -msgstr "Problemas para ver el video?" - -#: video.module:1140 -msgid "QuickTime Homepage" -msgstr "" - -#: video.module:1140 -msgid "Quicktime" -msgstr "Quicktime" - -#: video.module:1141 -msgid "Windows Media Homepage" -msgstr "" - -#: video.module:1141 -msgid "Windows Media" -msgstr "Windows Media" - -#: video.module:1142 -msgid "Real Media Homepage" -msgstr "" - -#: video.module:1142 -msgid "Real Media" -msgstr "Real Media" - -#: video.module:1143 -msgid "AVI Information at wikipedia.org" -msgstr "" - -#: video.module:1143 -msgid "AVI" -msgstr "AVI" - -# foo -#: video.module:1144 -msgid "ZIP Information at wikipedia.org" -msgstr "" - -#: video.module:1144 -msgid "ZIP" -msgstr "ZIP" - -#: video.module:1145 -msgid "Divx Homepage" -msgstr "DIVX Homepage" - -#: video.module:1145 -msgid "DIVX" -msgstr "DIVX" - -#: video.module:1146 -msgid "Macromedia Flash Homepage" -msgstr "Macromedia Flash Homepage" - -#: video.module:1146 -msgid "Flash FLV" -msgstr "Flash FLV" - -#: video.module:1154 -msgid "File Link" -msgstr "Enlace al archivo" - -#: video.module:1154 -msgid "File Size" -msgstr "Tamaño del Archivo" - -#: video.module:1154 -msgid "File Type" -msgstr "Tipo de Archivo" - -#: video.module:1173 -msgid "View" -msgstr "Ver" - -#: video.module:1176 -msgid "Downloading" -msgstr "Descargando" diff --git a/po/fr.po b/po/fr.po deleted file mode 100644 index 719f8b5..0000000 --- a/po/fr.po +++ /dev/null @@ -1,1520 +0,0 @@ -# $Id$ -# -# LANGUAGE translation of Drupal (general) -# Copyright YEAR NAME <EMAIL@ADDRESS> -# Generated from files: -# video.module,v 1.68.2.2 2007/04/11 11:50:31 fax8 -# video_multidownload.module,v 1.8 2007/01/12 16:35:40 fax8 -# video_image.module,v 1.14 2007/02/18 14:45:47 fax8 -# video_customfields.module,v 1.7 2007/01/03 18:20:55 fax8 -# video_render.php,v 1.7.2.1 2007/02/19 00:18:43 fax8 -# video_scheduler.php,v 1.4 2007/02/18 13:31:29 fax8 -# video_ffmpeg_helper.module,v 1.7 2007/02/18 13:31:29 fax8 -# video_optmetadata.module,v 1.1 2006/06/18 14:41:32 fax8 -# video_params.module,v 1.1 2006/06/18 14:41:32 fax8 -# video_upload.module,v 1.16 2007/01/14 17:30:40 fax8 -# -msgid "" -msgstr "" -"Project-Id-Version: Video module 5.x\n" -"POT-Creation-Date: 2007-06-27 16:16+0000\n" -"PO-Revision-Date: 2007-06-28 13:27-0500\n" -"Last-Translator: Pierre-Etienne Paradis <mediameriquat@hotmail.com>\n" -"Language-Team: Koumbit <peparadis@koumbit.org>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"X-Poedit-Language: French\n" -"X-Poedit-Country: CANADA\n" -"X-Poedit-SourceCharset: utf-8\n" - -#: views_video.inc:26 -msgid "Video: Play count" -msgstr "Vidéo: Compteur" - -#: views_video.inc:28 -msgid "This will display the number of times this has been played." -msgstr "Cette option affichera le nombre de fois que ce fichier a été lu." - -#: views_video.inc:31 -msgid "Video: Download count" -msgstr "Vidéo: Compteur de téléchargements" - -#: views_video.inc:33 -msgid "This will display the number of times this has been downloaded." -msgstr "Cette option affichera le nombre de fois que ce fichier a été téléchargé." - -#: views_video.inc:36 -msgid "Video: Length" -msgstr "Vidéo: Durée" - -#: views_video.inc:39 -msgid "This will display the play length of the video." -msgstr "Cette option affichera la durée du vidéo." - -#: views_video.inc:42 -msgid "Video: Download link" -msgstr "Vidéo: Lien de téléchargement" - -#: views_video.inc:46 -msgid "This will display a download link if the node allows it." -msgstr "Cette option affichera un lien de téléchargement, si le noeud le permet." - -#: views_video.inc:49 -msgid "Video: Play link" -msgstr "Vidéo: Lien de lecture" - -#: views_video.inc:53 -msgid "This will display a play link if the node allows it." -msgstr "Cette option affichera un lien de lecture du vidéo, si le noeud le permet." - -#: views_video.inc:56 -msgid "Video: Width (x)" -msgstr "Vidéo: Largeur (x)" - -#: views_video.inc:58 -msgid "This will display the width (x) of the video" -msgstr "Cette option affichera la largeur (x) du vidéo." - -#: views_video.inc:61 -msgid "Video: Height (y)" -msgstr "Vidéo: Hauteur (y)" - -#: views_video.inc:63 -msgid "This will display the height (y) of the video" -msgstr "Cette option affichera la hauteur (y) du vidéo." - -#: views_video.inc:71 -msgid "Video: Thumbnail" -msgstr "Vidéo: Vignette" - -#: views_video.inc:75 -msgid "This will display the thumbnail image for the video." -msgstr "Cette option affichera la vignette du vidéo." - -#: views_video.inc:95 -msgid "Shows all recent video activity (table format)" -msgstr "Affiche les plus récentes actions reliées au module vidéo (en format table)" - -#: views_video.inc:99 -msgid "Recent video activity" -msgstr "Activités vidéo récentes" - -#: views_video.inc:104 -msgid "There is no recent video activity" -msgstr "Il n'y a pas eu d'activité reliée au module vidéo" - -#: views_video.inc:116 -#: video.module:461 -msgid "Title" -msgstr "Titre" - -#: views_video.inc:123 -msgid "Last Updated" -msgstr "Plus récente mise à jour" - -#: views_video.inc:131 -msgid "Author" -msgstr "Auteur" - -#: views_video.inc:136 -msgid "Preview / Play" -msgstr "Aperçu / Lecture" - -#: views_video.inc:170 -msgid "Download" -msgstr "Télécharger" - -#: views_video.inc:179 -msgid "Play" -msgstr "Visionner" - -#: video.module:30 -msgid "The video module (4.7 or with backport patch to 4.6) allows users to post video content to their site. The emergence of portable phones with video capture capabilities has made video capture ubiquitous. Video logging, or <a href=\"%elink-en-wikipedia-org\">vlogging</a> as a medium for personal video broadcasting has proven to be popular and is following the blogging, and podcasting phenomena's. Videos are useful for creative collaboration among community members. If community members can not meet in person videos of meetings are valuable for enhancing the interaction between community members." -msgstr "Le module vidéo (4.7 ou corrections de 4.6) permet aux usagers de publier des vidéos dans leur site Web. L'émergence des téléphones portables avec fonctionnalités vidéo a rendu la capture vidéo omniprésente. Le <a href=\"%elink-en-wikipedia-org\">vlogging</a> en tant que mode d'expression populaire prend désormais le relais des blogues et de la baladodiffusion. Les vidéos sont un outil efficace pour la collaboration et la création collective. Si les membres d'une communauté en ligne ne peuvent se rencontrer en personne, les téléconférences peuvent alors stimuler leurs échanges et leur productivité." - -#: video.module:31 -msgid "The video module can be administered to flash player settings. There are a number of page and menu links which can be added to play and download video content on the site. Other configurable options include play and download counters. Multi-file downloads can also be configured under settings. There are also up to six custom fields and a group name which can be added." -msgstr "Le module vidéo peut être configuré pour correspondre à des paramètres Flash. Un certain nombre de liens peuvent être insérés dans les pages et les menus pour permettre le visionnement et le téléchargement du contenu. Les autres options configurables incluent les compteurs de visionnement et de téléchargement. Le téléchargement de fichiers multiples peut également être réglé avec précision, de même que six champs personnalisés supplémentaires pouvant être regoupés dans une boîte renommée en conséquence." - -#: video.module:32 -msgid "" -"<p>You can:</p>\n" -"<ul>\n" -"<li>Enable <em>most played videos</em>, <em>latest videos</em>, and <em>top videos</em> blocks at <a href=\"%admin-block\">administer >> block</a>.</li>\n" -"<li>Create video posts at <a href=\"%node-add-video\">create content >> video</a>.</li>\n" -"<li>Administer video module settings at <a href=\"%admin-settings-video\">administer >> settings >> video</a>.</li>\n" -"</ul>\n" -msgstr "" -"<p>Vous pouvez :</p>\n" -"<ul>\n" -"<li>Activer les blocs <em>Vidéos les plus visionnés</em>, <em>Plus récents vidéos</em>, et <em>Top des vidéos</em> dans la page <a href=\"%admin-block\">Administrer >> Construction du site >> Blocs</a>.</li>\n" -"<li>Créer des noeuds vidéos dans la page <a href=\"%node-add-video\">Créer un contenu >> Vidéo</a>.</li>\n" -"<li>Administrer les paramètres du module vidéo dans <a href=\"%admin-settings-video\">Administrer >> Gestion du contenu >> Paramètres vidéo</a>.</li>\n" -"</ul>\n" - -#: video.module:39 -msgid "For more information please read the configuration and customization handbook <a href=\"%video\">Video page</a>." -msgstr "Pour plus de détails, veuillez lire le <a href=\"%video\">manuel de configuration vidéo</a>." - -#: video.module:42 -msgid "Allows video nodes." -msgstr "Permet la création de noeuds vidéo." - -#: video.module:44 -msgid "Allows you to insert videos as nodes." -msgstr "Permet d'insérer des fichiers vidéo en tant que noeuds." - -#: video.module:47 -msgid "Video File Field" -msgstr "Champ du fichier vidéo" - -#: video.module:48 -msgid "This is the field where you enter the video file information. The Video module currently supports these file types:" -msgstr "Champ où vous devez entrer les informations relatives au fichier vidéo. Le module Vidéo prend en charge les formats de fichiers suivants :" - -#: video.module:49 -msgid ".mov, .wmv, .rm, .flv, .swf, .dir, .dcr" -msgstr ".mov, .wmv, .rm, .flv, .swf, .dir, .dcr" - -#: video.module:49 -msgid "To play these file types you need to enter in the path to the file. If your video is on the same webserver as drupal, you can use a path relative to the drupal directory, like \"downloads/video.mov\". If your video is on another server you can enter the URI to the video like \"http://www.example.com/videos/my-video.mov\"." -msgstr "Pour pouvoir lire ces formats vidéo, vous devrez entrer le chemin du fichier vidéo. Si votre vidéo est hébergé sur le même serveur que cette installation de Drupal, vous pouvez entrer le chemin relatif à la racine Drupal, comme par exemple \"downloads/video.mov\". Si votre vidéo est hébergé sur un serveur différent, vous pouvez entrer une URL comme \"http://www.exemple.fr/videos/mon-video.mov\"." - -#: video.module:50 -msgid "YouTube.com support" -msgstr "Prise en charge des vidéos YouTube" - -#: video.module:50 -msgid "You can host videos on youtube.com and put them on your site. To do this, after you upload the video on youtube.com enter the video ID into the \"Video File\" field. If the URI youtube.com gives you for the video is \"http://www.youtube.com/watch.php?v=XM4QYXPf-s8\" you would enter \"XM4QYXPf-s8\"." -msgstr "Vous pouvez héberger des vidéos sur YouTube et les afficher ensuite dans votre site. Pour ce faire, entrez l'identifiant du vidéo dans le champ Video File après l'avoir installé sur youtube.com. Si l'URL que YouTube a donné à votre vidéo est \"http://www.youtube.com/watch.php?v=XM4QYXPf-s8\", vous devriez entrer le suffixe \"XM4QYXPf-s8\"." - -#: video.module:51 -msgid "Google Video support" -msgstr "Prise en charge des vidéos Google" - -#: video.module:51 -msgid "" -"You can host videos on video.google.com and put them on your site.\n" -" To do this, after you upload the video on Google video enter get the\n" -" the embed code. In this code you will find an attribute like\n" -" src=\"http://video.google.com/googleplayer.swf?docId=-1591729516923874694\" .\n" -" You will need the -1591729516923874694 like number just after docId= .\n" -" Then use \"google:-1591729516923874694\" as video file value." -msgstr "" -"Vous pouvez héberger des vidéos sur video.google.com puis les afficher dans votre site.\n" -"Pour ce faire, récupérez et entrez le code fourni par Google après que vous y ayez placé votre fichier. Dans ce code, vous trouverez un attribut du type\n" -"src=\"http://video.google.com/googleplayer.swf?docId=-1591729516923874694\" .\n" -"Vous devrez alors entrer le nombre de type -1591729516923874694 se trouvant après docId=.\n" -"Autrement dit, utilisez la valeur \"google:-1591729516923874694\"." - -#: video.module:57 -msgid "Multi-file Dowload Help" -msgstr "Aide du téléchargement de fichiers multiples" - -#: video.module:58 -msgid "If enabled, this group holds all the settings for multi-file downloads. Multi-file downloads allows you to have a list of any number of files on the download page. These files are usually scanned from a folder. This allows the listing of multiple sizes and video types for visitors to choose from, you can even zip the files up." -msgstr "Si elle est activée, cette boîte contient tous les paramètres de téléchargement de fichiers multiples. Cette fonctionnalité permet de dresser une liste de fichiers aussi nombreux que vous le désirez dans la page de téléchargement. Ces fichiers sont généralement récupérés à partir d'un même répertoire. Cela permet aux usagers de sélectionner le format et la taille de fichier qui leur convient le mieux. Il est même possible de créer des archives zip." - -#: video.module:59 -#: plugins/video_multidownload/video_multidownload.module:119 -msgid "Disable multi-file downloads" -msgstr "Désactiver le téléchargement de fichiers multiples" - -#: video.module:59 -msgid "This checkbox will disable multi-file downloads for this video. This means the download tab and link will send visitors straight to download the same video as is set to play. Use this option if you only have one version of your video." -msgstr "Cette case permet de désactiver le téléchargement de fichiers multiples pour ce vidéo. Cela veut dire que l'onglet et le lien de téléchargement appelleront le même vidéo qui a été paramétré pour la lecture en ligne. Utilisez cette option si vous n'avez qu'un seul format de vidéo à votre disposition." - -#: video.module:60 -#: plugins/video_multidownload/video_multidownload.module:125 -msgid "Multi-file download folder" -msgstr "Dossier de téléchargement de fichiers multiples" - -#: video.module:60 -msgid "Allows you to specify a folder on the local server containing the files you wish to show up on the download tab. This folder should be relative to the drupal root directory, so if the absolute path is \"C:\\inetpub\\drupal\\videos\\projectfolder\\\" or \"/usr/htdocs/drupal/videos/projectfolder/\" then you would enter \"videos/projectfolder/\"." -msgstr "Cette option vous permet de spécifier un répertoire du serveur local contenant les fichiers devant apparaître sous l'onglet télécharger. Ce répertoire doit être relatif à la racine du site Drupal, donc si le chemin absolu est \"C:\\inetpub\\drupal\\videos\\repertoire_projet\\\" ou \"/usr/htdocs/drupal/videos/repertoire_projet/\" vous devez entrer \"videos/repertoire_projet/\"." - -#: video.module:61 -#: plugins/video_multidownload/video_multidownload.module:131 -msgid "Show files in \"play\" folder" -msgstr "Afficher les fichiers dans la page Visionnement" - -#: video.module:61 -msgid "This option will list all the files in the same folder is the \"play\" file listed in the \"Video File\" field above. You can use this option in addition to the download folder to list the videos in both folders." -msgstr "Cette option affichera tous les fichiers sous le même onglet que le fichier de visionnement principal, entré dans le champ Fichier vidéo ci-dessus. Vous pouvez utiliser cette option en sus de l'onglet de téléchargement, pour lister les vidéos dans les deux endroits." - -#: video.module:81;257;273 -msgid "videos" -msgstr "vidéos" - -#: video.module:87 -msgid "videos feed" -msgstr "flux de vidéos" - -#: video.module:93;401 -msgid "Video" -msgstr "Vidéo" - -#: video.module:97 -msgid "Video settings" -msgstr "Paramètres vidéo" - -#: video.module:98 -msgid "Configure different aspects of the video module and its plugins" -msgstr "Configurer les différents aspects du module Vidéo et de ses extensions." - -#: video.module:115;182 -#: plugins/video_image/video_image.module:206 -msgid "play" -msgstr "Visionner" - -#: video.module:130;205 -msgid "download" -msgstr "Télécharger" - -#: video.module:186 -msgid "play %link" -msgstr "lire %link" - -#: video.module:191;726 -msgid "login" -msgstr "connexion" - -#: video.module:191;726 -msgid "login to your account" -msgstr "connexion à votre compte" - -#: video.module:192;727 -msgid "or" -msgstr "ou" - -#: video.module:193;728 -msgid "register" -msgstr "s'enregistrer" - -#: video.module:193;728 -msgid "create a new account" -msgstr "créer un nouveau compte" - -#: video.module:194;729 -msgid " to play video" -msgstr " pour lire le vidéo" - -#: video.module:209 -msgid "download %link" -msgstr "télécharger %link" - -#: video.module:274 -msgid "Latest videos on" -msgstr "Plus récents vidéos de" - -#: video.module:309 -msgid "Tab menu options" -msgstr "Options des onglets" - -#: video.module:312 -msgid "Play in node" -msgstr "Visionner dans le noeud" - -#: video.module:315 -msgid "Toggle display of video in the body of the node." -msgstr "Option permettant de visionner ou non le vidéo directement dans le corps des noeuds." - -#: video.module:318 -msgid "Display play menu tab" -msgstr "Afficher l'onglet Visionner" - -#: video.module:321 -msgid "Toggle display of menu link to play video from the node page. If you have chosen to display the video in the body of the node, then this is redundant and must be set to \"No.\"" -msgstr "Option permettant d'afficher ou non l'onglet de lecture du vidéo. Si vous avez choisi de visionner le vidéo directement dans le corps du noeud, cette option est inutile et il vaut mieux ne pas la sélectionner." - -#: video.module:324 -msgid "Display download menu tab" -msgstr "Afficher l'onglet Télécharger" - -#: video.module:327 -msgid "Toggle display of menu link to download video from the node page." -msgstr "Option permettant d'afficher ou non l'onglet Télécharger dans le noeud." - -#: video.module:329 -msgid "Flash settings" -msgstr "Paramètres Flash" - -#: video.module:332 -msgid "Filename of Flash loader" -msgstr "Chemin de l'application FlowPlayer" - -#: video.module:334 -msgid "The name of the Shockwave file that manages loading the FLV movie." -msgstr "Le chemin du fichier Flash permettant de lire les vidéos de type FLV." - -#: video.module:337 -msgid "Fullscreen URL to use with FlowPlayer" -msgstr "URL plein écran à utiliser avec FlowPlayer" - -#: video.module:339 -msgid "The URL that takes care of the fullscreen display." -msgstr "L'URL absolue prenant en charge l'affichage en mode plein écran." - -#: video.module:340 -msgid "Ogg Theora settings" -msgstr "Paramètres Ogg Theora" - -#: video.module:343 -msgid "Filename of Cortado Java Applet" -msgstr "Nom du fichier de l'applet Java Cortado" - -#: video.module:345 -msgid "The path to the Cortado Applet to play Ogg Theora Files." -msgstr "Le chemin de l'applet Cortado permettant de lire les fichiers Ogg Theora." - -#: video.module:346 -msgid "Items to display in the node menu" -msgstr "Éléments à afficher dans le menu du noeud" - -#: video.module:349 -msgid "Display play link" -msgstr "Afficher le lien de lecture" - -#: video.module:352 -msgid "Toggle display of \"play\" link (below the node content in most themes). If you choose to display the video in the body of the node, then this is redundant and must be set to \"No.\"" -msgstr "Option permettant d'afficher ou non le lien de lecture du fichier (situé sous le contenu du noeud dans la plupart des thèmes). Si vous choisissez d'afficher le vidéo directement dans le corps du noeud, cette option sera inutile et ne devrait pas être sélectionnée." - -#: video.module:355 -msgid "Display download link" -msgstr "Afficher le lien de téléchargement" - -#: video.module:358 -msgid "Toggle display of \"download\" link (below the node content in most themes)." -msgstr "Option permettant d'afficher ou non le lien Télécharger (situé sous le contenu du noeud dans la plupart des thèmes)." - -#: video.module:361 -msgid "Display playtime" -msgstr "Afficher la durée" - -#: video.module:364 -msgid "Toggle the display of the playtime for a video." -msgstr "Option permettant d'afficher ou non la durée du vidéo." - -#: video.module:367 -msgid "Display filesize" -msgstr "Afficher la taille du fichier" - -#: video.module:370 -msgid "Toggle the display of the filesize for a video." -msgstr "Option permettant d'afficher ou non la taille du fichier vidéo." - -#: video.module:372 -msgid "Statistics counters" -msgstr "Compteurs statistiques" - -#: video.module:372 -msgid "To allow users to view counters visit: " -msgstr "Pour permettre aux usagers de voir les statistiques des compteurs, configurez le " - -#: video.module:372 -#: plugins/video_multidownload/video_multidownload.module:88 -msgid "access control" -msgstr "contrôle d'accès." - -#: video.module:375 -msgid "Count play hits" -msgstr "Compter le nombre de visionnements" - -#: video.module:378 -msgid "Counts a hit everytime someone views the play page." -msgstr "Le compteur peut calculer chaque affichage de la page de visionnement." - -#: video.module:381 -msgid "Count downloads" -msgstr "Compter le nombre de téléchargements" - -#: video.module:384 -msgid "Counts a hit everytime someone downloads a video." -msgstr "Le compteur peut calculer chaque téléchargement du fichier." - -#: video.module:403 -msgid "Allow a variety of video formats to be posted as nodes in your site" -msgstr "Permet à divers formats vidéo d'être publiés en tant que noeuds dans votre site." - -#: video.module:465 -msgid "Body" -msgstr "Corps" - -#: video.module:468 -msgid "Log message" -msgstr "Message de journal" - -#: video.module:472 -msgid "An explanation of the additions or updates being made to help other authors understand your motivations." -msgstr "Une explication des ajouts et modifications que vous apportez pour aider d'autres auteurs à comprendre vos motivations." - -#: video.module:475;478 -msgid "Video File" -msgstr "Fichier vidéo" - -#: video.module:483 -msgid "Put here the video file path. You can use either relative to the drupal root directory (something/video.mov) or absolute (http://www.example.com/videos/videos.mov). Windows Media currently requires a fully qualified URL to function. Flash movies may not play with spaces in the path or filename. To add youtube.com videos enter the video ID. If your video was at (http://www.youtube.com/watch.php?v=aBM4QYXPf-s) you would enter (aBM4QYXPf-s). To add Google videos you will need the docId values available on the embed code google provide with \"google:\" as heading. " -msgstr "Insérez le chemin du fichier vidéo ici. Vous pouvez utiliser le chemin relatif à la racine du site Drupal (exemple : fichers/video.mov) ou l'adresse absolue (comme http://www.exemple.fr/videos/videos.mov). L'application Windows Media requiert présentement une URL entière pour fonctionner. Les vidéos Flash risquent par ailleurs de ne pas se charger si le chemin ou le nom du fichier contiennent des espaces. Pour insérer des vidéos YouTube, entrez l'identifiant fourni pour ce vidéo. Par exemple, si l'URL de votre vidéo est (http://www.youtube.com/watch.php?v=aBM4QYXPf-s), vous pouvez entrer le suffixe (aBM4QYXPf-s). Pour ajouter des vidéos Google, vous devrez entrer les paramètres docId disponibles dans le code dont l'en-tête commence par «google:». " - -#: video.module:483 -#: plugins/video_multidownload/video_multidownload.module:115 -msgid "More information." -msgstr "Plus d'informations." - -#: video.module:486 -msgid "Video Size Width (x)" -msgstr "Largeur du vidéo (x)" - -#: video.module:491 -msgid "Horizontal video pixel size." -msgstr "Taille horizontale du vidéo en pixels." - -#: video.module:494 -msgid "Video Size Height (y)" -msgstr "Hauteur du vidéo (y)" - -#: video.module:499 -msgid "Vertical video pixel size." -msgstr "Taille verticale du vidéo en pixels." - -#: video.module:501 -msgid "Filesize" -msgstr "Taille du fichier" - -#: video.module:504 -msgid "Size" -msgstr "Taille" - -#: video.module:509 -msgid "If the video is on the local server the size will be set automatically. Otherwise enter a value. Entering 0 will turn the display off. Must be less than 2GB." -msgstr "Si le fichier vidéo réside sur le serveur local, la taille sera ajustée automatiquement. Sinon, entrez une valeur (qui doit être inférieure à 2 Go). Si vous entrez le nombre 0, l'affichage de la taille sera désactivé." - -#: video.module:512 -msgid "size units" -msgstr "Unités de taille" - -#: video.module:513 -msgid "bytes" -msgstr "octets" - -#: video.module:513 -msgid "Kilobits" -msgstr "Kilobits (Kb)" - -#: video.module:513 -msgid "KiloBytes" -msgstr "Kilooctets (Ko)" - -#: video.module:513 -msgid "Megabits" -msgstr "Mégabits (Mb)" - -#: video.module:513 -msgid "MegaBytes" -msgstr "Mégaoctets (Mo)" - -#: video.module:513 -msgid "Gigabits" -msgstr "Gigabits (Gb)" - -#: video.module:513 -msgid "GigaBytes" -msgstr "Gigaoctets (Go)" - -#: video.module:516 -msgid "Playtime" -msgstr "Durée" - -#: video.module:516 -msgid "Values may be entered in excess of their normal \"clock maximum\" (the seconds field may be 3600 to represent 1 hour), however each value will be summed for a total of all three." -msgstr "Les valeurs peuvent être entrées au-delà de leur maximum habituel (exemple : 120 secondes au lieu de deux minutes, 3600 secondes au lieu d'une heure), mais le système les additionnera tout de même de manière à faire le total des heures, minutes et secondes." - -#: video.module:520 -msgid "Hours" -msgstr "Heures" - -#: video.module:524 -msgid "Integer of hours." -msgstr "Nombre d'heures" - -#: video.module:527 -msgid "Minutes" -msgstr "Minutes" - -#: video.module:531 -msgid "Integer of minutes." -msgstr "Nombre de minutes" - -#: video.module:534 -msgid "Seconds" -msgstr "Secondes" - -#: video.module:539 -msgid "Integer of seconds." -msgstr "Nombre de secondes" - -#: video.module:563 -msgid "You cannot have the play link turned on if you are playing videos in the node body." -msgstr "Vous ne pouvez activer le lien Visionner si vous avez choisi de faire jouer directement le vidéo dans le corps du noeud." - -#: video.module:566 -msgid "You cannot have the play tab turned on if you are playing videos in the node body." -msgstr "Vous ne pouvez activer l'onglet Visionner si vous avez choisi de faire jouer directement le vidéo dans le corps du noeud." - -#: video.module:570 -msgid "You have NOT selected a method to display videos. Please choose at least one play option below. If you only want users to download videos, you can ignore this message, but usually you will want at least one option turned on. The current possible options are: Display play link, Display in node, and Display play menu tab." -msgstr "Vous n'avez pas choisi de méthode d'affichage des vidéos. Veuillez en choisir au moins une ci-dessous. Si vous voulez que les usagers ne puissent que télécharger les vidéos (sans les visionner), vous pouvez ignorer ce message. Mais habituellement, il est souhaitable d'activer au moins une option." - -#: video.module:663 -msgid "You have to insert a valid horizontal pixel size for this video" -msgstr "Vous devez entrer un format horizontal valide (en pixels) pour ce vidéo." - -#: video.module:666 -msgid "You have to insert a valid vertical pixel size for this video" -msgstr "Vous devez entrer un format vertical valide (en pixels) pour ce vidéo." - -#: video.module:672 -msgid "You have to insert a valid file size for this video." -msgstr "Vous devez entrer une taille de fichier valide pour ce vidéo." - -#: video.module:678 -msgid "Please enter valid playtime information for this video." -msgstr "Vous devez entrer une durée valide pour ce vidéo." - -#: video.module:760;771;799 -msgid "Latest videos" -msgstr "Plus récents vidéos" - -#: video.module:761;776;802 -msgid "Top videos" -msgstr "Top des vidéos" - -#: video.module:762;781;805 -msgid "Most played videos" -msgstr "Vidéos les plus visionnés" - -#: video.module:763;786;808 -msgid "Most downloaded" -msgstr "Vidéos les plus téléchargés" - -#: video.module:764;791;811 -msgid "Random video" -msgstr "Vidéo au hasard" - -#: video.module:815 -msgid "Block display title" -msgstr "Titre du bloc" - -#: video.module:819 -msgid "Number of videos to list in block" -msgstr "Nombre de vidéos à afficher dans le bloc" - -#: video.module:875 -msgid "There are no files to download for this video." -msgstr "Il n'y a pas eu de téléchargement de ce vidéo." - -#: video.module:889;951 -msgid "Playing" -msgstr "Visionnement de" - -#: video.module:1039;1077;1116;1191;1252;1297;1339;1387 -msgid "Your browser is not able to display this multimedia content." -msgstr "Votre fureteur ne peut afficher ce type de contenu multimédia." - -#: video.module:1042;1080 -msgid "http://www.macromedia.com/go/getflashplayer" -msgstr "http://www.adobe.com/shockwave/download" - -#: video.module:1043 -msgid "Link to Macromedia Flash Player Download Page" -msgstr "Lien vers la page de téléchargement du lecteur Adobe Flash" - -#: video.module:1044 -msgid "Download latest Flash Player" -msgstr "Téléchargez le plus récent lecteur Flash" - -#: video.module:1080 -msgid "Link to Flash player download" -msgstr "Lien vers la page de téléchargement de Flash" - -#: video.module:1080 -msgid "Download the latest Flash player" -msgstr "Téléchargez le plus récent lecteur Flash" - -#: video.module:1119 -msgid "http://www.macromedia.com/shockwave/download/" -msgstr "http://www.adobe.com/shockwave/download/" - -#: video.module:1120 -msgid "Link to Macromedia Shockwave Player Download Page" -msgstr "Lien vers la page de téléchargement du lecteur Adobe Shockwave" - -#: video.module:1121 -msgid "Download latest Shockwave Player" -msgstr "Téléchargez le plus récent lecteur Shockwave" - -#: video.module:1152 -msgid "http://www.divx.com/divx/webplayer/" -msgstr "http://www.divx.com/divx/webplayer" - -#: video.module:1153 -msgid "Link to DivX Download Page" -msgstr "Lien vers la page de téléchargement de DivX" - -#: video.module:1154 -msgid "Download latest DivX Web Player" -msgstr "Télécharger le plus récent lecteur DivX pour le Web" - -#: video.module:1202 -msgid "http://www.apple.com/quicktime/download" -msgstr "http://www.apple.com/quicktime/download" - -#: video.module:1203 -msgid "Link to QuickTime Download Page" -msgstr "Lien vers la page de téléchargement de QuickTime" - -#: video.module:1204 -msgid "Download latest Quicktime Player" -msgstr "Téléchargez le plus récent lecteur QuickTime" - -#: video.module:1256 -msgid "http://www.real.com/" -msgstr "http://www.real.com" - -#: video.module:1257 -msgid "Link to Real" -msgstr "Lien vers la page de téléchargement de Real" - -#: video.module:1258 -msgid "Download latest Realmedia Player" -msgstr "Télécharger le plus récent lecteur RealMedia" - -#: video.module:1301 -msgid "http://windowsupdate.microsoft.com/" -msgstr "http://windowsupdate.microsoft.com" - -#: video.module:1302 -msgid "Link to Windows Update" -msgstr "Lien vers Windows Update" - -#: video.module:1303 -msgid "Download latest Windows Media Player" -msgstr "Téléchargez la plus récente version du lecteur Windows Media." - -#: video.module:1343 -msgid "http://www.google.com/support/youtube" -msgstr "http://www.google.com/support/youtube" - -#: video.module:1343 -msgid "Link to youtube.com" -msgstr "Lien vers YouTube.com" - -#: video.module:1343 -msgid "youtube.com" -msgstr "Aide de youtube.com" - -#: video.module:1391 -msgid "http://video.google.com/support" -msgstr "http://video.google.com/support" - -#: video.module:1391 -msgid "Link to video.google.com" -msgstr "Lien vers video.google.com" - -#: video.module:1391 -msgid "video.google.com" -msgstr "video.google.com" - -#: video.module:1446 -msgid "http://java.com/download/" -msgstr "http://java.com/download" - -#: video.module:1446 -msgid "Link to java.com" -msgstr "Lien vers java.com" - -#: video.module:1446 -msgid "Download Java" -msgstr "Téléchargez Java" - -#: video.module:1467 -msgid "Problems viewing videos?" -msgstr "Vous éprouvez des problèmes de visionnement ?" - -#: video.module:1557 -#: plugins/video_multidownload/video_multidownload.module:357 -msgid "You do not have permission to download videos." -msgstr "Vous n'avez pas le droit de télécharger des vidéos." - -#: video.module:225 -msgid "1 play" -msgid_plural "@count plays" -msgstr[0] "" -msgstr[1] "" - -#: video.module:230 -msgid "1 download" -msgid_plural "@count downloads" -msgstr[0] "" -msgstr[1] "" - -#: video.module:289 -msgid "create video" -msgstr "créer un vidéo" - -#: video.module:289 -msgid "access video" -msgstr "accéder aux vidéos" - -#: video.module:289 -msgid "administer video" -msgstr "administrer les vidéos" - -#: video.module:289 -msgid "play video" -msgstr "visionner les vidéos" - -#: video.module:289 -msgid "download video" -msgstr "télécharger les vidéos" - -#: video.module:289 -msgid "view play counter" -msgstr "voir le compteur de visionnements" - -#: video.module:289 -msgid "view download counter" -msgstr "voir le compteur de téléchargements" - -#: video.module:289 -msgid "edit own video" -msgstr "éditer ses propres vidéos" - -#: video.module:0 -msgid "video" -msgstr "vidéo" - -#: plugins/video_customfields/video_customfields.module:18 -msgid "Enable addition of custom fileds on video nodes created by video module." -msgstr "Permet l'ajout de champs sur mesure dans les noeuds créés par le module Vidéo." - -#: plugins/video_customfields/video_customfields.module:38 -msgid "Customfields" -msgstr "Champs personnalisés" - -#: plugins/video_customfields/video_customfields.module:39 -msgid "Administer video_customfields module settings" -msgstr "Administrer les paramètres du module video_customfields" - -#: plugins/video_customfields/video_customfields.module:66 -msgid "Custom display fields" -msgstr "Champs d'affichage personnalisés" - -#: plugins/video_customfields/video_customfields.module:67 -msgid "Creates custom fields. Fields only show up if you give them a name." -msgstr "Cette option permet de créer des champs sur mesure. Les champs apparaîtront seulement si vous leur donnez un nom." - -#: plugins/video_customfields/video_customfields.module:71 -msgid "Custom field group title" -msgstr "Titre du groupe des champs personnalisés" - -#: plugins/video_customfields/video_customfields.module:73 -msgid "Title of the group of all custom fields." -msgstr "Titre de la boîte regroupant tous les champs personnalisés" - -#: plugins/video_customfields/video_customfields.module:76 -msgid "Custom field 1 title" -msgstr "Titre du champ personnalisé 1" - -#: plugins/video_customfields/video_customfields.module:80 -msgid "Custom field 2 title" -msgstr "Titre du champ personnalisé 2" - -#: plugins/video_customfields/video_customfields.module:84 -msgid "Custom field 3 title" -msgstr "Titre du champ personnalisé 3" - -#: plugins/video_customfields/video_customfields.module:88 -msgid "Custom field 4 title" -msgstr "Titre du champ personnalisé 4" - -#: plugins/video_customfields/video_customfields.module:92 -msgid "Custom field 5 title" -msgstr "Titre du champ personnalisé 5" - -#: plugins/video_customfields/video_customfields.module:96 -msgid "Custom field 6 title" -msgstr "Titre du champ personnalisé 6" - -#: plugins/video_customfields/video_customfields.module:104 -msgid "Start group initially collapsed" -msgstr "Groupe de départ replié par défaut" - -#: plugins/video_customfields/video_customfields.module:107 -msgid "Should the custom fields group be initially collapsed when creating and editing video nodes?" -msgstr "Est-ce que le groupe de champs personnalisés doit être replié par défaut, dans la page de publication de noeuds vidéo?" - -#: plugins/video_customfields/video_customfields.module:27 -msgid "insert custom fields" -msgstr "insérer des champs personnalisés" - -#: plugins/video_customfields/video_customfields.module:0 -msgid "video_customfields" -msgstr "video_customfields" - -#: plugins/video_ffmpeg_helper/video_render.php:56 -msgid "Incorrect parameters to the video_render.php script." -msgstr "Des paramètres erronés ont été envoyés au script video_render.php." - -#: plugins/video_ffmpeg_helper/video_render.php:57 -msgid "Incorrect parameters" -msgstr "Paramètres erronés" - -#: plugins/video_ffmpeg_helper/video_render.php:64 -#: plugins/video_ffmpeg_helper/video_scheduler.php:54 -msgid "This script is only executable from the command line." -msgstr "Ce script ne peut être exécuté qu'à partir de la ligne de commande." - -#: plugins/video_ffmpeg_helper/video_render.php:77 -msgid "video_render.php has been called with an invalid job resource. exiting." -msgstr "video_render.php a été invoqué avec une ressource invalide. Fin de l'exécution." - -#: plugins/video_ffmpeg_helper/video_render.php:83 -msgid "executing: " -msgstr "exécution en cours :" - -#: plugins/video_ffmpeg_helper/video_render.php:91 -msgid "command output value : " -msgstr "valeur de sortie :" - -#: plugins/video_ffmpeg_helper/video_render.php:97 -msgid "video conversion failed. ffmpeg reported the following output: " -msgstr "La conversion du fichier vidéo a échoué. FFmpeg a rapporté le résultat suivant :" - -#: plugins/video_ffmpeg_helper/video_render.php:131 -msgid "error moving video to the final directory. Check folder permissions." -msgstr "Il y a eu une erreur lors du transfert du fichier vidéo vers son répertoire final. Veuillez réviser vos permissions d'accès." - -#: plugins/video_ffmpeg_helper/video_render.php:56;77;83;91;97 -msgid "video_render" -msgstr "video_render" - -#: plugins/video_ffmpeg_helper/video_render.php:131 -#: plugins/video_ffmpeg_helper/video_scheduler.php:71 -msgid "video_scheduler" -msgstr "video_scheduler" - -#: plugins/video_ffmpeg_helper/video_scheduler.php:71 -msgid "no video conversion jobs to schedule." -msgstr "Il n'y a pas de tâches de conversion à planifier." - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:25 -#: plugins/video_image/video_image.module:18 -msgid "Enable thumbnails support for video module." -msgstr "Permet la création de vignettes pour le module vidéo." - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:37 -msgid "Video ffmpeg Helper" -msgstr "Assistant vidéo ffmpeg" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:38 -msgid "Administer video_ffmpeg_helper module settings" -msgstr "Administrer les paramètres du module video_ffmpeg_helper" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:59 -msgid "Set correct path for thumbnailer" -msgstr "Insérer le chemin exact du générateur de vignettes" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:62 -msgid "Seek time must be an integer" -msgstr "Le temps de recherche doit être un nombre entier" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:66 -msgid "Thumbnail options must contain mandatory arguments %videofile and %thumbfile" -msgstr "Les options de vignette doivent absolument contenir les paramètres %videofile et %thumbfile" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:86 -msgid "FFmpeg executable path" -msgstr "Chemin de l'exécutable FFmpeg" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:87 -msgid "Set the full path to the ffmpeg executable here." -msgstr "Entrez ici le chemin complet de l'exécutable FFmpeg." - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:94 -msgid "Enable resolution helper" -msgstr "Activer l'assistant de résolution" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:95 -msgid "Use ffmpeg Helper to automaticcally get the resolution from the video." -msgstr "Utilisez FFmpeg pour détecter automatiquement la résolution du fichier vidéo." - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:101 -msgid "Enable playtime helper" -msgstr "Activer l'assistant de durée" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:102 -msgid "Use ffmpeg Helper to automaticcally get the playtime from the video." -msgstr "Utilisez FFmpeg pour détecter automatiquement la durée du fichier vidéo." - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:108 -msgid "Automatic video thumbnailing" -msgstr "Génération automatique de vignettes" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:114 -msgid "Auto thumbnail for videos" -msgstr "Génération automatique de vignettes pour les vidéos" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:115 -msgid "If set up correctly, this will auto-generate a thumbnail for each video created." -msgstr "Si cette option est activée, FFmpeg générera automatiquement une vignette pour chaque vidéo créé." - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:120 -msgid "Use auto-thumbnailer exclusively for video images" -msgstr "Utiliser le générateur de vignettes pour les images tirées du vidéo uniquement" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:121 -msgid "If checked, this will disable the file upload box for the user-supplied thumbnail. Only check this if you have checked to be sure that auto-thumbnailing works. Auto thumbnail must be selected for this to be enabled." -msgstr "Si cette option est activée, la boîte de téléchargement de vignettes soumises par les usagers disparaîtra. Cochez cette case seulement si vous êtes certain(e) que la génération de vignettes s'effectue correctement. (L'option de génération automatique doit bien entendu être sélectionnée elle aussi.)" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:127 -msgid "Video thumbnailer options" -msgstr "Options du générateur de vignettes" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:128 -msgid "Provide the options for the thumbnailer. Available argument values are: " -msgstr "Entrez ici les options de création automatique de vignettes. Les paramètres autorisés sont :" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:128 -msgid "%videofile (the video file to thumbnail)" -msgstr "%videofile (le fichier vidéo à partir duquel créer une vignette)" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:128 -msgid "%thumbfile (a newly created temporary file to overwrite with the thumbnail)" -msgstr "%thumbfile (le nouveau fichier temporaire écrasé par la vignette)" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:128 -msgid "%seek (seconds to seek into video before extracting image)." -msgstr "%seek (le temps de recherche en secondes dans le fichier vidéo pour générer la vignette)." - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:128 -msgid "Only the first two are mandatory. For example, older versions of ffmpeg should use something like: !old While newer versions should use something like: !new" -msgstr "Ce sont uniquement les deux premiers paramètres qui sont obligatoires. Les anciennes versions de FFmpeg devraient utiliser la formule : !old alors que les nouvelles versions devraient utiliser la formule : !new" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:133 -msgid "Video seek offset for thumbnail" -msgstr "Temps de recherche dans le fichier vidéo pour générer la vignette" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:134 -msgid "Time in seconds to seek into video before extracting the thumbnail" -msgstr "Le positionnement en secondes dans le fichier vidéo, à partir duquel le module générera une vignette." - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:139 -msgid "Debug auto-thumbnail process" -msgstr "Déboguage des processus de génération automatique de vignettes" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:146 -msgid "Automatic video conversion" -msgstr "Conversion automatique des formats vidéo" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:152 -msgid "Auto conversion for videos" -msgstr "Conversion automatique des formats vidéo" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:153 -msgid "If set up correctly, this will auto-convert each uploaded video to the configured format." -msgstr "Si cette option est choisie et configurée correctement, chaque vidéo téléversé sera converti au format désiré." - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:153 -msgid "IMPORTANT: you will need the video_render.php correctly configured and run by cron. See README.txt for more informations." -msgstr "IMPORTANT : Vous devez configurer le fichier video_render.php correctement et le faire exécuter par cron. Lire le fichier README.txt pour plus de détails." - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:158 -msgid "Video rendering width" -msgstr "Largeur de rendu du vidéo" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:159 -msgid "The width of the converted video. The height will be automatically calculated to maintain aspect ratio." -msgstr "La largeur du vidéo une fois converti. La hauteur sera calculée automatiquement de manière à conserver les proportions d'origine." - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:166 -msgid "Video bitrate" -msgstr "Débit vidéo" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:167 -msgid "The video bitrate in kbit/s of the converted video." -msgstr "Le débit vidéo du fichier vidéo converti (en Kb/s)." - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:174 -msgid "Audio bitrate" -msgstr "Débit vidéo" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:175 -msgid "The audio bitrate in kbit/s of the converted video." -msgstr "Le débit audio du fichier vidéo converti (en Kb/s)." - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:182 -msgid "Busy video path" -msgstr "Chemin du vidéo « occupé »" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:183 -msgid "Provide the relative path to a video displayed when the video is being rendered." -msgstr "Entrez ici le chemin du vidéo qui sera affiché temporairement, pendant que la conversion de votre vidéo est effectuée." - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:188 -msgid "Advanced settings" -msgstr "Paramètres avancés" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:194 -msgid "Video converter options" -msgstr "Options de conversion vidéo" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:195 -msgid "Provide the ffmpeg options to configure the video conversion. Available argument values are: " -msgstr "Entrez les options FFmpeg nécessaires à la conversion du fichier vidéo. Les paramètres autorisés sont :" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:196 -msgid "%videofile (the video file to convert)" -msgstr "%videofile (le fichier vidéo à convertir)" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:197 -msgid "%convertfile (a newly created file to store the converted file)" -msgstr "%convertfile (un nouveau fichier créé pour héberger le fichier converti)" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:198 -msgid "%size (video resolution of the converted file)" -msgstr "%size (résolution du fichier converti)" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:200 -msgid "For further informations refer to the !ffmpegdoc" -msgstr "Pour plus de détails, veuillez vous référer à la !ffmpegdoc" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:200 -msgid "Official FFMpeg documentation." -msgstr "documentation officielle FFmpeg." - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:370 -msgid "no video has been uploaded: make sure that video_image weight is greater than video_upload weight; make sure that the video file is not too large to be uploaded." -msgstr "Aucun vidéo n'a été téléversé. Veuillez vous assurer que la taille de video_image est supérieure à la taille de video_upload. Veuillez vous assurer également que le fichier n'est pas trop lourd pour être accepté par le système." - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:388 -msgid "Thumbnailer command: " -msgstr "Commande du générateur de vignettes :" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:389 -msgid "Thumbnailer output: " -msgstr "Résultat du générateur de vignettes :" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:392 -msgid "video_image_auto_thumbnail: file %file does not exist" -msgstr "video_image_auto_thumbnail : le fichier %file n'existe pas" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:404 -msgid "Failed to thumbnail video" -msgstr "La création de vignette a échoué" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:406 -msgid "Successfully thumbnailed video" -msgstr "La création de vignette a été complétée avec succès" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:0 -msgid "video_ffmpeg_helper" -msgstr "video_ffmpeg_helper" - -#: plugins/video_image/video_image.module:30 -msgid "Video image" -msgstr "Image vidéo" - -#: plugins/video_image/video_image.module:31 -msgid "Administer video_image module settings" -msgstr "Administrer les paramètres du module video_image" - -#: plugins/video_image/video_image.module:55 -msgid "Publish the video thumbnails" -msgstr "Publier les vignettes" - -#: plugins/video_image/video_image.module:56 -msgid "Checking this value will cause the video thumbnail image nodes to be published and therefore could show up in blocks. Usually, this is not what you want because then you could end up with both the thumbnail node and the video node showing up and since there is no way to link the image node to the video node, this is not desirable. However, with this unchecked, the administrator will end up with a lot of unpublished nodes." -msgstr "Sélectionner cette option pourrait faire en sorte que les noeuds correspondant aux vignettes des vidéos soient affichées dans les blocs. Ce n'est généralement pas ce qui est souhaité par les usagers, puisque ce sont à la fois les noeuds de vignettes et les noeuds du fichier vidéo qui apparaîtraient en même temps. Puisqu'il n'y a pas moyen de faire pointer le noeud image vers le vidéo correspondant, il vaut mieux éviter cette situation. Toutefois, laisser cette case décochée fera en sorte que l'administrateur doive gérer un grand nombre de noeuds non publiés. " - -#: plugins/video_image/video_image.module:61 -msgid "Promote the thumbnails to the front page" -msgstr "Promouvoir les vignettes en page d'accueil" - -#: plugins/video_image/video_image.module:84 -msgid "Image thumbnails" -msgstr "Vignettes" - -#: plugins/video_image/video_image.module:84 -msgid "Use this form to upload an image." -msgstr "Utilisez ce formulaire pour téléverser une image." - -#: plugins/video_image/video_image.module:86 -msgid "Image" -msgstr "Image" - -#: plugins/video_image/video_image.module:87 -msgid "Image title" -msgstr "Titre de l'image" - -#: plugins/video_image/video_image.module:105 -msgid "video_image_nodeapi: prepare: ready to thumbnail image" -msgstr "video_image_nodeapi : preparation : prêt à générer la vignette" - -#: plugins/video_image/video_image.module:0 -msgid "video_image" -msgstr "video_image" - -#: plugins/video_multidownload/video_multidownload.module:18 -msgid "Enable multiple file download in video module." -msgstr "Permettre le téléchargement de fichiers multiples dans le module Vidéo." - -#: plugins/video_multidownload/video_multidownload.module:37 -msgid "Multidownload" -msgstr "Téléchargements multiples" - -#: plugins/video_multidownload/video_multidownload.module:38 -msgid "Administer video_multidownload module settings" -msgstr "Administrer les paramètres du module video_multidownload" - -#: plugins/video_multidownload/video_multidownload.module:53 -msgid "download other formats" -msgstr "Télécharger d'autres formats" - -#: plugins/video_multidownload/video_multidownload.module:82 -msgid "Multi-file download options" -msgstr "Options de téléchargement de fichiers multiples" - -#: plugins/video_multidownload/video_multidownload.module:82 -msgid "Allows a list of files to be shown on the download page. The list is usually gotten from a specified folder. This ability is useful for providing different sizes and video types for download." -msgstr "Cette fonctionnalité permet à une liste de fichiers d'être affichée dans la page de téléchargement. La liste est généralement dressée à partir d'un dossier spécifique. Cette fonctionnalité est pratique dans le cas où vous souhaitez rendre disponible une variété de tailles et de formats." - -#: plugins/video_multidownload/video_multidownload.module:85 -msgid "Allow Multi-file Downloads" -msgstr "Permet le téléchargement de fichiers multiples" - -#: plugins/video_multidownload/video_multidownload.module:88 -msgid "This feature can be disabled separately for each node. If turned on make sure you set the permissions so users can use this feature." -msgstr "Cette fonctionnalité peut être désactivée séparément dans chaque noeud. Mais si vous décidez de l'activer, assurez-vous d'avoir bien configurer les droits d'accès de manière à ce que le public puisse en bénéficier." - -#: plugins/video_multidownload/video_multidownload.module:91 -msgid "File extensions to show" -msgstr "Extensions à afficher" - -#: plugins/video_multidownload/video_multidownload.module:93 -msgid "The extensions of files to list from the multi-file download folder on the download page. Extensions should be comma seperated with no spaces, for example (mov,wmv,rm)." -msgstr "Les extensions de fichier qui seront affichées dans le dossier de téléchargement de fichiers multiples de la page de téléchargement. Les extensions doivent être séparées par des virgules, sans espace. Exemple : (mov,wmv,rm)." - -#: plugins/video_multidownload/video_multidownload.module:111 -msgid "Multiple files in download tab" -msgstr "Fichiers multiples dans l'onglet de téléchargement" - -#: plugins/video_multidownload/video_multidownload.module:115 -msgid "These options allow you to have multiple files shown on the download page. This is useful for allowing users to download different file sizes and video formats. " -msgstr "Les options suivantes vous permettent d'afficher plusieurs fichiers dans la page de téléchargement. Ceci rend possible l'accès à plusieurs tailles et formats d'un même vidéo, par exemple. " - -#: plugins/video_multidownload/video_multidownload.module:121 -msgid "Disables multi-file downloads for this video only." -msgstr "Cette option désactive le téléchargement de fichiers multiples pour ce vidéo seulement." - -#: plugins/video_multidownload/video_multidownload.module:128 -msgid "Enter the folder containing your videos. It must be relative from the drupal directory. If the absolute path is \"C:\\inetpub\\drupal\\videos\\projectfolder\\\" or \"/usr/htdocs/drupal/videos/projectfolder/\" then enter something like \"videos/projectfolder/\"." -msgstr "Entrez le chemin du dossier contenant vos vidéos. Celui-ci doit être relatif à la racine de votre site Drupal. Si le chemin absolu est \"C:\\inetpub\\drupal\\videos\\repertoire_projet\\\" ou \"/usr/htdocs/drupal/videos/repertoire_projet/\"alors entrez quelque chose comme \"videos/repertoire_projet/\"." - -#: plugins/video_multidownload/video_multidownload.module:133 -msgid "Display videos in the same directory as the \"play\" video. If folder above is entered this will be in addition." -msgstr "Afficher les vidéos dans la page Visionnement au même titre que le vidéo principal. Si un répertoire de téléchargement multiple a été spécifié, les fichiers n'en seront que plus faciles d'accès." - -#: plugins/video_multidownload/video_multidownload.module:150 -msgid "Please disable multi-file downloads if you are not going to use the feature." -msgstr "Veuillez désactiver la fonction de téléchargement de fichiers multiples si vous ne comptez pas l'utiliser." - -#: plugins/video_multidownload/video_multidownload.module:151 -msgid "Download directory does not exist. Make sure it has a trailing forward slash \"/\"." -msgstr "Le répertoire de téléversement n'existe pas ou a été spécifié de manière erronnée. Veuillez vous assurer qu'il a été entré avec une barre oblique à la fin \"/\"." - -#: plugins/video_multidownload/video_multidownload.module:264 -msgid "QuickTime Homepage" -msgstr "Page d'accueil de QuickTime" - -#: plugins/video_multidownload/video_multidownload.module:264 -msgid "Quicktime" -msgstr "QuickTime" - -#: plugins/video_multidownload/video_multidownload.module:265 -msgid "Windows Media Homepage" -msgstr "Page d'accueil de Windows Media" - -#: plugins/video_multidownload/video_multidownload.module:265 -msgid "Windows Media" -msgstr "Windows Media" - -#: plugins/video_multidownload/video_multidownload.module:266 -msgid "Real Media Homepage" -msgstr "Page d'accueil de Real Media" - -#: plugins/video_multidownload/video_multidownload.module:266 -msgid "Real Media" -msgstr "Real Media" - -#: plugins/video_multidownload/video_multidownload.module:267 -msgid "AVI Information at wikipedia.org" -msgstr "Informations au sujet du format AVI dans wikipedia.org" - -#: plugins/video_multidownload/video_multidownload.module:267 -msgid "AVI" -msgstr "AVI" - -#: plugins/video_multidownload/video_multidownload.module:268 -msgid "ZIP Information at wikipedia.org" -msgstr "Informations au sujet du format ZIP dans wikipedia.org" - -#: plugins/video_multidownload/video_multidownload.module:268 -msgid "ZIP" -msgstr "ZIP" - -#: plugins/video_multidownload/video_multidownload.module:269 -msgid "Divx Homepage" -msgstr "Page d'accueil de DivX" - -#: plugins/video_multidownload/video_multidownload.module:269 -msgid "DIVX" -msgstr "DIVX" - -#: plugins/video_multidownload/video_multidownload.module:270 -msgid "Macromedia Flash Homepage" -msgstr "Page d'accueil d'Adobe Flash" - -#: plugins/video_multidownload/video_multidownload.module:270 -msgid "Flash FLV" -msgstr "Flash FLV" - -#: plugins/video_multidownload/video_multidownload.module:271 -msgid "Ogg Theora FAQ at theora.org" -msgstr "FAQ du format Theora sur theora.org" - -#: plugins/video_multidownload/video_multidownload.module:271 -msgid "Ogg Theora FAQ" -msgstr "FAQ du format Theora" - -#: plugins/video_multidownload/video_multidownload.module:271 -msgid "Ogg Theora media help at Wikipedia" -msgstr "Informations au sujet du format Theora dans wikipedia.org" - -#: plugins/video_multidownload/video_multidownload.module:271 -msgid "Ogg Theora help" -msgstr "Informations sur le format Theora" - -#: plugins/video_multidownload/video_multidownload.module:279 -msgid "File Link" -msgstr "Lien du fichier" - -#: plugins/video_multidownload/video_multidownload.module:279 -msgid "File Size" -msgstr "Taille du fichier" - -#: plugins/video_multidownload/video_multidownload.module:279 -msgid "File Type" -msgstr "Type de fichier" - -#: plugins/video_multidownload/video_multidownload.module:285 -msgid "View" -msgstr "Voir" - -#: plugins/video_multidownload/video_multidownload.module:288 -msgid "Downloading" -msgstr "Téléchargement en cours" - -#: plugins/video_multidownload/video_multidownload.module:70 -msgid "create multi-file downloads" -msgstr "permettre le téléchargements de fichiers multiples" - -#: plugins/video_multidownload/video_multidownload.module:0 -msgid "video_multidownload" -msgstr "video_multidownload" - -#: plugins/video_optmetadata/video_optmetadata.module:18 -msgid "Enable addition of optional metadata on video nodes created by video module. Optional metadata are Video Bitrate, Audio Bitrate, Audio Sampling Rate and Audio Channels." -msgstr "Permet l'ajout de métadonnées optionnelles dans les noeuds créés par le module Vidéo, telles que le débit vidéo, le débit audio, la fréquence de saisie audio et les canaux audio." - -#: plugins/video_optmetadata/video_optmetadata.module:46 -msgid "Optional Metadata" -msgstr "Métadonnées optionnelles" - -#: plugins/video_optmetadata/video_optmetadata.module:50 -msgid "Insert here the metadata informations." -msgstr "Insérez les métadonnées ici." - -#: plugins/video_optmetadata/video_optmetadata.module:54;116 -msgid "Video Bitrate" -msgstr "Débit vidéo" - -#: plugins/video_optmetadata/video_optmetadata.module:58 -msgid "Video bitrate in kbits/sec." -msgstr "Débit vidéo en Kb/s." - -#: plugins/video_optmetadata/video_optmetadata.module:62;119 -msgid "Audio Bitrate" -msgstr "Débit audio" - -#: plugins/video_optmetadata/video_optmetadata.module:66 -msgid "Audio bitrate in kbits/sec." -msgstr "Débit audio en Kb/s." - -#: plugins/video_optmetadata/video_optmetadata.module:70;122 -msgid "Audio Sampling Rate" -msgstr "Fréquence d'échantillonage audio" - -#: plugins/video_optmetadata/video_optmetadata.module:73 -msgid "Integer value of audio sampling rate in Hz." -msgstr "Valeur numérique de la fréquence d'échantillonage audio (en Hz)" - -#: plugins/video_optmetadata/video_optmetadata.module:77;125 -msgid "Audio Channels" -msgstr "Canaux audio" - -#: plugins/video_optmetadata/video_optmetadata.module:78 -msgid "5.1" -msgstr "5.1" - -#: plugins/video_optmetadata/video_optmetadata.module:78 -msgid "Stereo" -msgstr "Stéréo" - -#: plugins/video_optmetadata/video_optmetadata.module:78 -msgid "Mono" -msgstr "Mono" - -#: plugins/video_optmetadata/video_optmetadata.module:114 -msgid "Video Metadata" -msgstr "Métadonnées vidéo" - -#: plugins/video_optmetadata/video_optmetadata.module:116;119 -msgid "kbits/sec" -msgstr "Kb/sec" - -#: plugins/video_optmetadata/video_optmetadata.module:122 -msgid "Hz" -msgstr "Hz" - -#: plugins/video_optmetadata/video_optmetadata.module:27 -msgid "insert optional metadata" -msgstr "insérer des métadonnées optionnelles" - -#: plugins/video_optmetadata/video_optmetadata.module:0 -msgid "video_optmetadata" -msgstr "video_optmetadata" - -#: plugins/video_params/video_params.module:19 -msgid "Enable addition of html params to object generated by video module. Useful if you need to use swf videos which needs params to be passed." -msgstr "Permet l'ajout de paramètres HTML aux objets générés par le module Vidéo. Fonctionnalité utile si vous publiez des vidéos en format swf et ayant besoin de paramètres pour être transmis." - -#: plugins/video_params/video_params.module:54 -msgid "HTML object parameters" -msgstr "Paramètres HTML de l'objet" - -#: plugins/video_params/video_params.module:56 -msgid "Embedded object parameters" -msgstr "Paramètres incorporés à l'objet" - -#: plugins/video_params/video_params.module:60 -msgid "Enter the values that you would like to be embedded in <param name=\"param_1\" value=\"value_1\" /> tags. Each parameter should be on a seperate line with an equal sign between the parameter and its assigned value. Like param=value for example." -msgstr "Entrez ici les valeurs que vous souhaitez incorporer dans les balises <param name=\"param_1\" value=\"value_1\" />. Chaque paramètre doit être sur une ligne séparée, avec le symbole égal entre le paramètre lui-même et sa valeur. Exemple : param=value." - -#: plugins/video_params/video_params.module:28 -msgid "insert object params" -msgstr "insérer les paramètres de l'objet" - -#: plugins/video_params/video_params.module:0 -msgid "video_params" -msgstr "video_params" - -#: plugins/video_upload/video_upload.module:18 -msgid "Enable video files uploading in video module." -msgstr "Permet le téléversement de fichiers vidéo dans le module Vidéo." - -#: plugins/video_upload/video_upload.module:31 -msgid "Upload" -msgstr "Téléversement" - -#: plugins/video_upload/video_upload.module:32 -msgid "Administer video_upload module settings" -msgstr "Administrer les paramètres du module video_upload" - -#: plugins/video_upload/video_upload.module:58 -msgid "override video file" -msgstr "Ignorer le chemin du fichier vidéo" - -#: plugins/video_upload/video_upload.module:59 -msgid "Check this if your users must only submit videos through uploading. This disables path insertion." -msgstr "Cochez cette case si vous voulez que les utilisateurs ne puissent soumettre des vidéos que par téléversement. Cela désactivera la fonction d'insertion par indication du chemin." - -#: plugins/video_upload/video_upload.module:157 -msgid "If you want to upload a video simply ignore this field and select your video file at the \"Upload video file\" field." -msgstr "Si vous voulez ajouter un vidéo, ignorez ce champ et entrez votre vidéo dans le champ « Téléverser un vidéo »." - -#: plugins/video_upload/video_upload.module:160 -msgid "Upload video" -msgstr "Téléverser un vidéo" - -#: plugins/video_upload/video_upload.module:189 -msgid "A file must be provided." -msgstr "Un fichier doit être fourni." - -#: plugins/video_upload/video_upload.module:244 -msgid "An error occurred during file saving. Your video file has not been stored." -msgstr "Une erreur est survenue lors de l'enregistrement. Votre fichier vidéo n'a pas été emmagasiné." - -#: plugins/video_upload/video_upload.module:274 -msgid "Upload video file" -msgstr "Téléverser un fichier vidéo" - -#: plugins/video_upload/video_upload.module:277 -msgid "The uploaded file will be used as video file for this node.<br /><b>NOTE:</b> The max upload size is" -msgstr "Le fichier téléversé deviendra le film correspondant à ce noeud.<br /><b>NOTE :</b> La taille maximale permise de ce fichier est" - -#: plugins/video_upload/video_upload.module:282 -msgid "Replace with" -msgstr "Remplacer par" - -#: plugins/video_upload/video_upload.module:293 -msgid "A video file has been already uploaded." -msgstr "Un fichier vidéo a déjà été téléversé." - -#: plugins/video_upload/video_upload.module:297 -msgid "file name" -msgstr "nom du fichier" - -#: plugins/video_upload/video_upload.module:298 -msgid "file path" -msgstr "chemin du fichier" - -#: plugins/video_upload/video_upload.module:299 -msgid "file size" -msgstr "taille du fichier" - -#: plugins/video_upload/video_upload.module:300 -msgid "file mime" -msgstr "type MIME du fichier" - -#: plugins/video_upload/video_upload.module:304 -msgid "uploaded video informations:" -msgstr "informations du vidéo ajoutées :" - -#: plugins/video_upload/video_upload.module:372;373 -msgid "Sending video... please wait." -msgstr "Envoi du vidéo en cours. Veuillez patienter." - -#: plugins/video_upload/video_upload.module:374 -msgid "Video upload could take some minutes." -msgstr "Le téléversement du fichier vidéo pourrait prendre quelques minutes." - -#: plugins/video_upload/video_upload.module:71 -msgid "upload video files" -msgstr "video_tracker_block" - -#: plugins/video_upload/video_upload.module:0 -msgid "video_upload" -msgstr "video_upload" - diff --git a/po/video-module.pot b/po/video-module.pot deleted file mode 100644 index 136c95d..0000000 --- a/po/video-module.pot +++ /dev/null @@ -1,1525 +0,0 @@ -# $Id$ -# -# LANGUAGE translation of Drupal (general) -# Copyright YEAR NAME <EMAIL@ADDRESS> -# Generated from files: -# video.module,v 1.68.2.2 2007/04/11 11:50:31 fax8 -# video_multidownload.module,v 1.8 2007/01/12 16:35:40 fax8 -# video_image.module,v 1.14 2007/02/18 14:45:47 fax8 -# video_customfields.module,v 1.7 2007/01/03 18:20:55 fax8 -# video_render.php,v 1.7.2.1 2007/02/19 00:18:43 fax8 -# video_scheduler.php,v 1.4 2007/02/18 13:31:29 fax8 -# video_ffmpeg_helper.module,v 1.7 2007/02/18 13:31:29 fax8 -# video_optmetadata.module,v 1.1 2006/06/18 14:41:32 fax8 -# video_params.module,v 1.1 2006/06/18 14:41:32 fax8 -# video_upload.module,v 1.16 2007/01/14 17:30:40 fax8 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PROJECT VERSION\n" -"POT-Creation-Date: 2007-06-27 16:16+0000\n" -"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n" -"Last-Translator: NAME <EMAIL@ADDRESS>\n" -"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" - -#: video.views.inc:26 -msgid "Play count" -msgstr "" - -#: video.views.inc:28 -msgid "This will display the number of times this has been played." -msgstr "" - -#: video.views.inc:31 -msgid "Download count" -msgstr "" - -#: video.views.inc:33 -msgid "This will display the number of times this has been downloaded." -msgstr "" - -#: video.views.inc:36 -msgid "Length" -msgstr "" - -#: video.views.inc:39 -msgid "This will display the play length of the video." -msgstr "" - -#: video.views.inc:42 -msgid "Download link" -msgstr "" - -#: video.views.inc:46 -msgid "This will display a download link if the node allows it." -msgstr "" - -#: video.views.inc:49 -msgid "Play link" -msgstr "" - -#: video.views.inc:53 -msgid "This will display a play link if the node allows it." -msgstr "" - -#: video.views.inc:56 -msgid "Width (x)" -msgstr "" - -#: video.views.inc:58 -msgid "This will display the width (x) of the video" -msgstr "" - -#: video.views.inc:61 -msgid "Height (y)" -msgstr "" - -#: video.views.inc:63 -msgid "This will display the height (y) of the video" -msgstr "" - -#: video.views.inc:71 video_views_handler_field_image.inc:38 -msgid "Thumbnail" -msgstr "" - -#: video.views.inc:75 -msgid "This will display the thumbnail image for the video." -msgstr "" - -#: video.views.inc:95 -msgid "Shows all recent video activity (table format)" -msgstr "" - -#: video.views.inc:99 -msgid "Recent video activity" -msgstr "" - -#: video.views.inc:104 -msgid "There is no recent video activity" -msgstr "" - -#: video.views.inc:116 video.module:461 -msgid "Title" -msgstr "" - -#: video.views.inc:123 -msgid "Last Updated" -msgstr "" - -#: video.views.inc:131 -msgid "Author" -msgstr "" - -#: video.views.inc:136 -msgid "Preview / Play" -msgstr "" - -#: video.views.inc:170 -msgid "Download" -msgstr "" - -#: video.views.inc:179 -msgid "Play" -msgstr "" - -#: video_views_handler_field_image.inc:35 -msgid "Show image as" -msgstr "" - -#: video_views_handler_field_image.inc:39 -msgid "Preview" -msgstr "" - -#: video_views_handler_field_image.inc:44 -msgid "Link image to video" -msgstr "" - -#: video_views_handler_field_playtime_seconds.inc:34 -msgid "Show playtime as" -msgstr "" - -#: video_views_handler_field_playtime_seconds.inc:37 -msgid "Hour:min:sec" -msgstr "" - -#: video.module:30 -msgid "The video module (4.7 or with backport patch to 4.6) allows users to post video content to their site. The emergence of portable phones with video capture capabilities has made video capture ubiquitous. Video logging, or <a href=\"%elink-en-wikipedia-org\">vlogging</a> as a medium for personal video broadcasting has proven to be popular and is following the blogging, and podcasting phenomena's. Videos are useful for creative collaboration among community members. If community members can not meet in person videos of meetings are valuable for enhancing the interaction between community members." -msgstr "" - -#: video.module:31 -msgid "The video module can be administered to flash player settings. There are a number of page and menu links which can be added to play and download video content on the site. Other configurable options include play and download counters. Multi-file downloads can also be configured under settings. There are also up to six custom fields and a group name which can be added." -msgstr "" - -#: video.module:32 -msgid "<p>You can:</p>\n<ul>\n<li>Enable <em>most played videos</em>, <em>latest videos</em>, and <em>top videos</em> blocks at <a href=\"%admin-block\">administer >> block</a>.</li>\n<li>Create video posts at <a href=\"%node-add-video\">create content >> video</a>.</li>\n<li>Administer video module settings at <a href=\"%admin-settings-video\">administer >> settings >> video</a>.</li>\n</ul>\n" -msgstr "" - -#: video.module:39 -msgid "For more information please read the configuration and customization handbook <a href=\"%video\">Video page</a>." -msgstr "" - -#: video.module:42 -msgid "Allows video nodes." -msgstr "" - -#: video.module:44 -msgid "Allows you to insert videos as nodes." -msgstr "" - -#: video.module:47 -msgid "Video File Field" -msgstr "" - -#: video.module:48 -msgid "This is the field where you enter the video file information. The Video module currently supports these file types:" -msgstr "" - -#: video.module:49 -msgid ".mov, .wmv, .rm, .flv, .swf, .dir, .dcr" -msgstr "" - -#: video.module:49 -msgid "To play these file types you need to enter in the path to the file. If your video is on the same webserver as drupal, you can use a path relative to the drupal directory, like \"downloads/video.mov\". If your video is on another server you can enter the URI to the video like \"http://www.example.com/videos/my-video.mov\"." -msgstr "" - -#: video.module:50 -msgid "YouTube.com support" -msgstr "" - -#: video.module:50 -msgid "You can host videos on youtube.com and put them on your site. To do this, after you upload the video on youtube.com enter the video ID into the \"Video File\" field. If the URI youtube.com gives you for the video is \"http://www.youtube.com/watch.php?v=XM4QYXPf-s8\" you would enter \"XM4QYXPf-s8\"." -msgstr "" - -#: video.module:51 -msgid "Google Video support" -msgstr "" - -#: video.module:51 -msgid "You can host videos on video.google.com and put them on your site.\n To do this, after you upload the video on Google video enter get the\n the embed code. In this code you will find an attribute like\n src=\"http://video.google.com/googleplayer.swf?docId=-1591729516923874694\" .\n You will need the -1591729516923874694 like number just after docId= .\n Then use \"google:-1591729516923874694\" as video file value." -msgstr "" - -#: video.module:57 -msgid "Multi-file Dowload Help" -msgstr "" - -#: video.module:58 -msgid "If enabled, this group holds all the settings for multi-file downloads. Multi-file downloads allows you to have a list of any number of files on the download page. These files are usually scanned from a folder. This allows the listing of multiple sizes and video types for visitors to choose from, you can even zip the files up." -msgstr "" - -#: video.module:59 plugins/video_multidownload/video_multidownload.module:119 -msgid "Disable multi-file downloads" -msgstr "" - -#: video.module:59 -msgid "This checkbox will disable multi-file downloads for this video. This means the download tab and link will send visitors straight to download the same video as is set to play. Use this option if you only have one version of your video." -msgstr "" - -#: video.module:60 plugins/video_multidownload/video_multidownload.module:125 -msgid "Multi-file download folder" -msgstr "" - -#: video.module:60 -msgid "Allows you to specify a folder on the local server containing the files you wish to show up on the download tab. This folder should be relative to the drupal root directory, so if the absolute path is \"C:\\inetpub\\drupal\\videos\\projectfolder\\\" or \"/usr/htdocs/drupal/videos/projectfolder/\" then you would enter \"videos/projectfolder/\"." -msgstr "" - -#: video.module:61 plugins/video_multidownload/video_multidownload.module:131 -msgid "Show files in \"play\" folder" -msgstr "" - -#: video.module:61 -msgid "This option will list all the files in the same folder is the \"play\" file listed in the \"Video File\" field above. You can use this option in addition to the download folder to list the videos in both folders." -msgstr "" - -#: video.module:81;257;273 -msgid "videos" -msgstr "" - -#: video.module:87 -msgid "videos feed" -msgstr "" - -#: video.module:93;401 -msgid "Video" -msgstr "" - -#: video.module:97 -msgid "Video settings" -msgstr "" - -#: video.module:98 -msgid "Configure different aspects of the video module and its plugins" -msgstr "" - -#: video.module:115;182 plugins/video_image/video_image.module:206 -msgid "play" -msgstr "" - -#: video.module:130;205 -msgid "download" -msgstr "" - -#: video.module:186 -msgid "play %link" -msgstr "" - -#: video.module:191;726 -msgid "login" -msgstr "" - -#: video.module:191;726 -msgid "login to your account" -msgstr "" - -#: video.module:192;727 -msgid "or" -msgstr "" - -#: video.module:193;728 -msgid "register" -msgstr "" - -#: video.module:193;728 -msgid "create a new account" -msgstr "" - -#: video.module:194;729 -msgid " to play video" -msgstr "" - -#: video.module:209 -msgid "download %link" -msgstr "" - -#: video.module:274 -msgid "Latest videos on" -msgstr "" - -#: video.module:309 -msgid "Tab menu options" -msgstr "" - -#: video.module:312 -msgid "Play in node" -msgstr "" - -#: video.module:315 -msgid "Toggle display of video in the body of the node." -msgstr "" - -#: video.module:318 -msgid "Display play menu tab" -msgstr "" - -#: video.module:321 -msgid "Toggle display of menu link to play video from the node page. If you have chosen to display the video in the body of the node, then this is redundant and must be set to \"No.\"" -msgstr "" - -#: video.module:324 -msgid "Display download menu tab" -msgstr "" - -#: video.module:327 -msgid "Toggle display of menu link to download video from the node page." -msgstr "" - -#: video.module:329 -msgid "Flash settings" -msgstr "" - -#: video.module:332 -msgid "Filename of Flash loader" -msgstr "" - -#: video.module:334 -msgid "The name of the Shockwave file that manages loading the FLV movie." -msgstr "" - -#: video.module:337 -msgid "Fullscreen URL to use with FlowPlayer" -msgstr "" - -#: video.module:339 -msgid "The URL that takes care of the fullscreen display." -msgstr "" - -#: video.module:340 -msgid "Ogg Theora settings" -msgstr "" - -#: video.module:343 -msgid "Filename of Cortado Java Applet" -msgstr "" - -#: video.module:345 -msgid "The path to the Cortado Applet to play Ogg Theora Files." -msgstr "" - -#: video.module:346 -msgid "Items to display in the node menu" -msgstr "" - -#: video.module:349 -msgid "Display play link" -msgstr "" - -#: video.module:352 -msgid "Toggle display of \"play\" link (below the node content in most themes). If you choose to display the video in the body of the node, then this is redundant and must be set to \"No.\"" -msgstr "" - -#: video.module:355 -msgid "Display download link" -msgstr "" - -#: video.module:358 -msgid "Toggle display of \"download\" link (below the node content in most themes)." -msgstr "" - -#: video.module:361 -msgid "Display playtime" -msgstr "" - -#: video.module:364 -msgid "Toggle the display of the playtime for a video." -msgstr "" - -#: video.module:367 -msgid "Display filesize" -msgstr "" - -#: video.module:370 -msgid "Toggle the display of the filesize for a video." -msgstr "" - -#: video.module:372 -msgid "Statistics counters" -msgstr "" - -#: video.module:372 -msgid "To allow users to view counters visit: " -msgstr "" - -#: video.module:372 plugins/video_multidownload/video_multidownload.module:88 -msgid "access control" -msgstr "" - -#: video.module:375 -msgid "Count play hits" -msgstr "" - -#: video.module:378 -msgid "Counts a hit everytime someone views the play page." -msgstr "" - -#: video.module:381 -msgid "Count downloads" -msgstr "" - -#: video.module:384 -msgid "Counts a hit everytime someone downloads a video." -msgstr "" - -#: video.module:403 -msgid "Allow a variety of video formats to be posted as nodes in your site" -msgstr "" - -#: video.module:465 -msgid "Body" -msgstr "" - -#: video.module:468 -msgid "Log message" -msgstr "" - -#: video.module:472 -msgid "An explanation of the additions or updates being made to help other authors understand your motivations." -msgstr "" - -#: video.module:475;478 -msgid "Video File" -msgstr "" - -#: video.module:483 -msgid "Put here the video file path. You can use either relative to the drupal root directory (something/video.mov) or absolute (http://www.example.com/videos/videos.mov). Windows Media currently requires a fully qualified URL to function. Flash movies may not play with spaces in the path or filename. To add youtube.com videos enter the video ID. If your video was at (http://www.youtube.com/watch.php?v=aBM4QYXPf-s) you would enter (aBM4QYXPf-s). To add Google videos you will need the docId values available on the embed code google provide with \"google:\" as heading. " -msgstr "" - -#: video.module:483 plugins/video_multidownload/video_multidownload.module:115 -msgid "More information." -msgstr "" - -#: video.module:486 -msgid "Video Size Width (x)" -msgstr "" - -#: video.module:491 -msgid "Horizontal video pixel size." -msgstr "" - -#: video.module:494 -msgid "Video Size Height (y)" -msgstr "" - -#: video.module:499 -msgid "Vertical video pixel size." -msgstr "" - -#: video.module:501 -msgid "Filesize" -msgstr "" - -#: video.module:504 -msgid "Size" -msgstr "" - -#: video.module:509 -msgid "If the video is on the local server the size will be set automatically. Otherwise enter a value. Entering 0 will turn the display off. Must be less than 2GB." -msgstr "" - -#: video.module:512 -msgid "size units" -msgstr "" - -#: video.module:513 -msgid "bytes" -msgstr "" - -#: video.module:513 -msgid "Kilobits" -msgstr "" - -#: video.module:513 -msgid "KiloBytes" -msgstr "" - -#: video.module:513 -msgid "Megabits" -msgstr "" - -#: video.module:513 -msgid "MegaBytes" -msgstr "" - -#: video.module:513 -msgid "Gigabits" -msgstr "" - -#: video.module:513 -msgid "GigaBytes" -msgstr "" - -#: video.module:516 -msgid "Playtime" -msgstr "" - -#: video.module:516 -msgid "Values may be entered in excess of their normal \"clock maximum\" (the seconds field may be 3600 to represent 1 hour), however each value will be summed for a total of all three." -msgstr "" - -#: video.module:520 -msgid "Hours" -msgstr "" - -#: video.module:524 -msgid "Integer of hours." -msgstr "" - -#: video.module:527 -msgid "Minutes" -msgstr "" - -#: video.module:531 -msgid "Integer of minutes." -msgstr "" - -#: video.module:534 video_views_handler_field_playtime_seconds.inc:38 -msgid "Seconds" -msgstr "" - -#: video.module:539 -msgid "Integer of seconds." -msgstr "" - -#: video.module:563 -msgid "You cannot have the play link turned on if you are playing videos in the node body." -msgstr "" - -#: video.module:566 -msgid "You cannot have the play tab turned on if you are playing videos in the node body." -msgstr "" - -#: video.module:570 -msgid "You have NOT selected a method to display videos. Please choose at least one play option below. If you only want users to download videos, you can ignore this message, but usually you will want at least one option turned on. The current possible options are: Display play link, Display in node, and Display play menu tab." -msgstr "" - -#: video.module:663 -msgid "You have to insert a valid horizontal pixel size for this video" -msgstr "" - -#: video.module:666 -msgid "You have to insert a valid vertical pixel size for this video" -msgstr "" - -#: video.module:672 -msgid "You have to insert a valid file size for this video." -msgstr "" - -#: video.module:678 -msgid "Please enter valid playtime information for this video." -msgstr "" - -#: video.module:760;771;799 -msgid "Latest videos" -msgstr "" - -#: video.module:761;776;802 -msgid "Top videos" -msgstr "" - -#: video.module:762;781;805 -msgid "Most played videos" -msgstr "" - -#: video.module:763;786;808 -msgid "Most downloaded" -msgstr "" - -#: video.module:764;791;811 -msgid "Random video" -msgstr "" - -#: video.module:815 -msgid "Block display title" -msgstr "" - -#: video.module:819 -msgid "Number of videos to list in block" -msgstr "" - -#: video.module:875 -msgid "There are no files to download for this video." -msgstr "" - -#: video.module:889;951 -msgid "Playing" -msgstr "" - -#: video.module:1039;1077;1116;1191;1252;1297;1339;1387 -msgid "Your browser is not able to display this multimedia content." -msgstr "" - -#: video.module:1042;1080 -msgid "http://www.macromedia.com/go/getflashplayer" -msgstr "" - -#: video.module:1043 -msgid "Link to Macromedia Flash Player Download Page" -msgstr "" - -#: video.module:1044 -msgid "Download latest Flash Player" -msgstr "" - -#: video.module:1080 -msgid "Link to Flash player download" -msgstr "" - -#: video.module:1080 -msgid "Download the latest Flash player" -msgstr "" - -#: video.module:1119 -msgid "http://www.macromedia.com/shockwave/download/" -msgstr "" - -#: video.module:1120 -msgid "Link to Macromedia Shockwave Player Download Page" -msgstr "" - -#: video.module:1121 -msgid "Download latest Shockwave Player" -msgstr "" - -#: video.module:1152 -msgid "http://www.divx.com/divx/webplayer/" -msgstr "" - -#: video.module:1153 -msgid "Link to DivX Download Page" -msgstr "" - -#: video.module:1154 -msgid "Download latest DivX Web Player" -msgstr "" - -#: video.module:1202 -msgid "http://www.apple.com/quicktime/download" -msgstr "" - -#: video.module:1203 -msgid "Link to QuickTime Download Page" -msgstr "" - -#: video.module:1204 -msgid "Download latest Quicktime Player" -msgstr "" - -#: video.module:1256 -msgid "http://www.real.com/" -msgstr "" - -#: video.module:1257 -msgid "Link to Real" -msgstr "" - -#: video.module:1258 -msgid "Download latest Realmedia Player" -msgstr "" - -#: video.module:1301 -msgid "http://windowsupdate.microsoft.com/" -msgstr "" - -#: video.module:1302 -msgid "Link to Windows Update" -msgstr "" - -#: video.module:1303 -msgid "Download latest Windows Media Player" -msgstr "" - -#: common.inc:0 -msgid "http://support.mozilla.com/en-US/kb/Using+the+Windows+Media+Player+plugin+with+Firefox" -msgstr "" - -#: common.inc:367 -msgid "Link to Firefox Plug-in" -msgstr "" - -#: common.inc:367 -msgid "Download the plug-in for Firefox" -msgstr "" - -#: video.module:1343 -msgid "http://www.google.com/support/youtube" -msgstr "" - -#: video.module:1343 -msgid "Link to youtube.com" -msgstr "" - -#: video.module:1343 -msgid "youtube.com" -msgstr "" - -#: video.module:1391 -msgid "http://video.google.com/support" -msgstr "" - -#: video.module:1391 -msgid "Link to video.google.com" -msgstr "" - -#: video.module:1391 -msgid "video.google.com" -msgstr "" - -#: video.module:1446 -msgid "http://java.com/download/" -msgstr "" - -#: video.module:1446 -msgid "Link to java.com" -msgstr "" - -#: video.module:1446 -msgid "Download Java" -msgstr "" - -#: video.module:1467 -msgid "Problems viewing videos?" -msgstr "" - -#: video.module:1557 plugins/video_multidownload/video_multidownload.module:357 -msgid "You do not have permission to download videos." -msgstr "" - -#: video.module:225 -msgid "1 play" -msgid_plural "@count plays" -msgstr[0] "" -msgstr[1] "" - -#: video.module:230 -msgid "1 download" -msgid_plural "@count downloads" -msgstr[0] "" -msgstr[1] "" - -#: video.module:289 -msgid "create video" -msgstr "" - -#: video.module:289 -msgid "access video" -msgstr "" - -#: video.module:289 -msgid "administer video" -msgstr "" - -#: video.module:289 -msgid "play video" -msgstr "" - -#: video.module:289 -msgid "download video" -msgstr "" - -#: video.module:289 -msgid "view play counter" -msgstr "" - -#: video.module:289 -msgid "view download counter" -msgstr "" - -#: video.module:289 -msgid "edit own video" -msgstr "" - -#: video.module:0 -msgid "video" -msgstr "" - -#: plugins/video_customfields/video_customfields.module:18 -msgid "Enable addition of custom fileds on video nodes created by video module." -msgstr "" - -#: plugins/video_customfields/video_customfields.module:38 -msgid "Customfields" -msgstr "" - -#: plugins/video_customfields/video_customfields.module:39 -msgid "Administer video_customfields module settings" -msgstr "" - -#: plugins/video_customfields/video_customfields.module:66 -msgid "Custom display fields" -msgstr "" - -#: plugins/video_customfields/video_customfields.module:67 -msgid "Creates custom fields. Fields only show up if you give them a name." -msgstr "" - -#: plugins/video_customfields/video_customfields.module:71 -msgid "Custom field group title" -msgstr "" - -#: plugins/video_customfields/video_customfields.module:73 -msgid "Title of the group of all custom fields." -msgstr "" - -#: plugins/video_customfields/video_customfields.module:76 -msgid "Custom field 1 title" -msgstr "" - -#: plugins/video_customfields/video_customfields.module:80 -msgid "Custom field 2 title" -msgstr "" - -#: plugins/video_customfields/video_customfields.module:84 -msgid "Custom field 3 title" -msgstr "" - -#: plugins/video_customfields/video_customfields.module:88 -msgid "Custom field 4 title" -msgstr "" - -#: plugins/video_customfields/video_customfields.module:92 -msgid "Custom field 5 title" -msgstr "" - -#: plugins/video_customfields/video_customfields.module:96 -msgid "Custom field 6 title" -msgstr "" - -#: plugins/video_customfields/video_customfields.module:104 -msgid "Start group initially collapsed" -msgstr "" - -#: plugins/video_customfields/video_customfields.module:107 -msgid "Should the custom fields group be initially collapsed when creating and editing video nodes?" -msgstr "" - -#: plugins/video_customfields/video_customfields.module:27 -msgid "insert custom fields" -msgstr "" - -#: plugins/video_customfields/video_customfields.module:0 -msgid "video_customfields" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_render.php:56 -msgid "Incorrect parameters to the video_render.php script." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_render.php:57 -msgid "Incorrect parameters" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_render.php:64 plugins/video_ffmpeg_helper/video_scheduler.php:54 -msgid "This script is only executable from the command line." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_render.php:77 -msgid "video_render.php has been called with an invalid job resource. exiting." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_render.php:83 -msgid "executing: " -msgstr "" - -#: plugins/video_ffmpeg_helper/video_render.php:91 -msgid "command output value : " -msgstr "" - -#: plugins/video_ffmpeg_helper/video_render.php:97 -msgid "video conversion failed. ffmpeg reported the following output: " -msgstr "" - -#: plugins/video_ffmpeg_helper/video_render.php:131 -msgid "error moving video to the final directory. Check folder permissions." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_render.php:56;77;83;91;97 -msgid "video_render" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_render.php:131 plugins/video_ffmpeg_helper/video_scheduler.php:71 -msgid "video_scheduler" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_scheduler.php:71 -msgid "no video conversion jobs to schedule." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:25 plugins/video_image/video_image.module:18 -msgid "Enable thumbnails support for video module." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:37 -msgid "Video ffmpeg Helper" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:38 -msgid "Administer video_ffmpeg_helper module settings" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:59 -msgid "Set correct path for thumbnailer" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:62 -msgid "Seek time must be an integer" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:66 -msgid "Thumbnail options must contain mandatory arguments %videofile and %thumbfile" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:86 -msgid "FFmpeg executable path" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:87 -msgid "Set the full path to the ffmpeg executable here." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:94 -msgid "Enable resolution helper" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:95 -msgid "Use ffmpeg Helper to automaticcally get the resolution from the video." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:101 -msgid "Enable playtime helper" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:102 -msgid "Use ffmpeg Helper to automaticcally get the playtime from the video." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:108 -msgid "Automatic video thumbnailing" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:114 -msgid "Auto thumbnail for videos" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:115 -msgid "If set up correctly, this will auto-generate a thumbnail for each video created." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:120 -msgid "Use auto-thumbnailer exclusively for video images" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:121 -msgid "If checked, this will disable the file upload box for the user-supplied thumbnail. Only check this if you have checked to be sure that auto-thumbnailing works. Auto thumbnail must be selected for this to be enabled." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:127 -msgid "Video thumbnailer options" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:128 -msgid "Provide the options for the thumbnailer. Available argument values are: " -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:128 -msgid "%videofile (the video file to thumbnail)" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:128 -msgid "%thumbfile (a newly created temporary file to overwrite with the thumbnail)" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:128 -msgid "%seek (seconds to seek into video before extracting image)." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:128 -msgid "Only the first two are mandatory. For example, older versions of ffmpeg should use something like: !old While newer versions should use something like: !new" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:133 -msgid "Video seek offset for thumbnail" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:134 -msgid "Time in seconds to seek into video before extracting the thumbnail" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:139 -msgid "Debug auto-thumbnail process" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:146 -msgid "Automatic video conversion" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:152 -msgid "Auto conversion for videos" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:153 -msgid "If set up correctly, this will auto-convert each uploaded video to the configured format." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:153 -msgid "IMPORTANT: you will need the video_render.php correctly configured and run by cron. See README.txt for more informations." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:158 -msgid "Video rendering width" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:159 -msgid "The width of the converted video. The height will be automatically calculated to maintain aspect ratio." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:166 -msgid "Video bitrate" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:167 -msgid "The video bitrate in kbit/s of the converted video." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:174 -msgid "Audio bitrate" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:175 -msgid "The audio bitrate in kbit/s of the converted video." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:182 -msgid "Busy video path" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:183 -msgid "Provide the relative path to a video displayed when the video is being rendered." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:188 -msgid "Advanced settings" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:194 -msgid "Video converter options" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:195 -msgid "Provide the ffmpeg options to configure the video conversion. Available argument values are: " -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:196 -msgid "%videofile (the video file to convert)" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:197 -msgid "%convertfile (a newly created file to store the converted file)" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:198 -msgid "%size (video resolution of the converted file)" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:200 -msgid "For further informations refer to the !ffmpegdoc" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:200 -msgid "Official FFMpeg documentation." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:370 -msgid "no video has been uploaded: make sure that video_image weight is greater than video_upload weight; make sure that the video file is not too large to be uploaded." -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:388 -msgid "Thumbnailer command: " -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:389 -msgid "Thumbnailer output: " -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:392 -msgid "video_image_auto_thumbnail: file %file does not exist" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:404 -msgid "Failed to thumbnail video" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:406 -msgid "Successfully thumbnailed video" -msgstr "" - -#: plugins/video_ffmpeg_helper/video_ffmpeg_helper.module:0 -msgid "video_ffmpeg_helper" -msgstr "" - -#: plugins/video_image/video_image.module:30 -msgid "Video image" -msgstr "" - -#: plugins/video_image/video_image.module:31 -msgid "Administer video_image module settings" -msgstr "" - -#: plugins/video_image/video_image.module:55 -msgid "Publish the video thumbnails" -msgstr "" - -#: plugins/video_image/video_image.module:56 -msgid "Checking this value will cause the video thumbnail image nodes to be published and therefore could show up in blocks. Usually, this is not what you want because then you could end up with both the thumbnail node and the video node showing up and since there is no way to link the image node to the video node, this is not desirable. However, with this unchecked, the administrator will end up with a lot of unpublished nodes." -msgstr "" - -#: plugins/video_image/video_image.module:61 -msgid "Promote the thumbnails to the front page" -msgstr "" - -#: plugins/video_image/video_image.module:84 -msgid "Image thumbnails" -msgstr "" - -#: plugins/video_image/video_image.module:84 -msgid "Use this form to upload an image." -msgstr "" - -#: plugins/video_image/video_image.module:86 -msgid "Image" -msgstr "" - -#: plugins/video_image/video_image.module:87 -msgid "Image title" -msgstr "" - -#: plugins/video_image/video_image.module:105 -msgid "video_image_nodeapi: prepare: ready to thumbnail image" -msgstr "" - -#: plugins/video_image/video_image.module:0 -msgid "video_image" -msgstr "" - -#: types/video_upload/video_upload.module:0 -msgid "encoded" -msgstr "" - -#: types/video_upload/video_upload.module:0 -msgid "Auto-encoded to @ext" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:18 -msgid "Enable multiple file download in video module." -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:37 -msgid "Multidownload" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:38 -msgid "Administer video_multidownload module settings" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:53 -msgid "download other formats" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:82 -msgid "Multi-file download options" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:82 -msgid "Allows a list of files to be shown on the download page. The list is usually gotten from a specified folder. This ability is useful for providing different sizes and video types for download." -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:85 -msgid "Allow Multi-file Downloads" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:88 -msgid "This feature can be disabled separately for each node. If turned on make sure you set the permissions so users can use this feature." -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:91 -msgid "File extensions to show" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:93 -msgid "The extensions of files to list from the multi-file download folder on the download page. Extensions should be comma seperated with no spaces, for example (mov,wmv,rm)." -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:111 -msgid "Multiple files in download tab" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:115 -msgid "These options allow you to have multiple files shown on the download page. This is useful for allowing users to download different file sizes and video formats. " -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:121 -msgid "Disables multi-file downloads for this video only." -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:128 -msgid "Enter the folder containing your videos. It must be relative from the drupal directory. If the absolute path is \"C:\\inetpub\\drupal\\videos\\projectfolder\\\" or \"/usr/htdocs/drupal/videos/projectfolder/\" then enter something like \"videos/projectfolder/\"." -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:133 -msgid "Display videos in the same directory as the \"play\" video. If folder above is entered this will be in addition." -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:150 -msgid "Please disable multi-file downloads if you are not going to use the feature." -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:151 -msgid "Download directory does not exist. Make sure it has a trailing forward slash \"/\"." -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:264 -msgid "QuickTime Homepage" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:264 -msgid "Quicktime" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:265 -msgid "Windows Media Homepage" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:265 -msgid "Windows Media" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:266 -msgid "Real Media Homepage" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:266 -msgid "Real Media" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:267 -msgid "AVI Information at wikipedia.org" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:267 -msgid "AVI" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:268 -msgid "ZIP Information at wikipedia.org" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:268 -msgid "ZIP" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:269 -msgid "Divx Homepage" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:269 -msgid "DIVX" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:270 -msgid "Macromedia Flash Homepage" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:270 -msgid "Flash FLV" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:271 -msgid "Ogg Theora FAQ at theora.org" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:271 -msgid "Ogg Theora FAQ" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:271 -msgid "Ogg Theora media help at Wikipedia" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:271 -msgid "Ogg Theora help" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:279 -msgid "File Link" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:279 -msgid "File Size" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:279 -msgid "File Type" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:285 -msgid "View" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:288 -msgid "Downloading" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:70 -msgid "create multi-file downloads" -msgstr "" - -#: plugins/video_multidownload/video_multidownload.module:0 -msgid "video_multidownload" -msgstr "" - -#: plugins/video_optmetadata/video_optmetadata.module:18 -msgid "Enable addition of optional metadata on video nodes created by video module. Optional metadata are Video Bitrate, Audio Bitrate, Audio Sampling Rate and Audio Channels." -msgstr "" - -#: plugins/video_optmetadata/video_optmetadata.module:46 -msgid "Optional Metadata" -msgstr "" - -#: plugins/video_optmetadata/video_optmetadata.module:50 -msgid "Insert here the metadata informations." -msgstr "" - -#: plugins/video_optmetadata/video_optmetadata.module:54;116 -msgid "Video Bitrate" -msgstr "" - -#: plugins/video_optmetadata/video_optmetadata.module:58 -msgid "Video bitrate in kbits/sec." -msgstr "" - -#: plugins/video_optmetadata/video_optmetadata.module:62;119 -msgid "Audio Bitrate" -msgstr "" - -#: plugins/video_optmetadata/video_optmetadata.module:66 -msgid "Audio bitrate in kbits/sec." -msgstr "" - -#: plugins/video_optmetadata/video_optmetadata.module:70;122 -msgid "Audio Sampling Rate" -msgstr "" - -#: plugins/video_optmetadata/video_optmetadata.module:73 -msgid "Integer value of audio sampling rate in Hz." -msgstr "" - -#: plugins/video_optmetadata/video_optmetadata.module:77;125 -msgid "Audio Channels" -msgstr "" - -#: plugins/video_optmetadata/video_optmetadata.module:78 -msgid "5.1" -msgstr "" - -#: plugins/video_optmetadata/video_optmetadata.module:78 -msgid "Stereo" -msgstr "" - -#: plugins/video_optmetadata/video_optmetadata.module:78 -msgid "Mono" -msgstr "" - -#: plugins/video_optmetadata/video_optmetadata.module:114 -msgid "Video Metadata" -msgstr "" - -#: plugins/video_optmetadata/video_optmetadata.module:116;119 -msgid "kbits/sec" -msgstr "" - -#: plugins/video_optmetadata/video_optmetadata.module:122 -msgid "Hz" -msgstr "" - -#: plugins/video_optmetadata/video_optmetadata.module:27 -msgid "insert optional metadata" -msgstr "" - -#: plugins/video_optmetadata/video_optmetadata.module:0 -msgid "video_optmetadata" -msgstr "" - -#: plugins/video_params/video_params.module:19 -msgid "Enable addition of html params to object generated by video module. Useful if you need to use swf videos which needs params to be passed." -msgstr "" - -#: plugins/video_params/video_params.module:54 -msgid "HTML object parameters" -msgstr "" - -#: plugins/video_params/video_params.module:56 -msgid "Embedded object parameters" -msgstr "" - -#: plugins/video_params/video_params.module:60 -msgid "Enter the values that you would like to be embedded in <param name=\"param_1\" value=\"value_1\" /> tags. Each parameter should be on a seperate line with an equal sign between the parameter and its assigned value. Like param=value for example." -msgstr "" - -#: plugins/video_params/video_params.module:28 -msgid "insert object params" -msgstr "" - -#: plugins/video_params/video_params.module:0 -msgid "video_params" -msgstr "" - -#: plugins/video_upload/video_upload.module:18 -msgid "Enable video files uploading in video module." -msgstr "" - -#: plugins/video_upload/video_upload.module:31 -msgid "Upload" -msgstr "" - -#: plugins/video_upload/video_upload.module:32 -msgid "Administer video_upload module settings" -msgstr "" - -#: plugins/video_upload/video_upload.module:58 -msgid "override video file" -msgstr "" - -#: plugins/video_upload/video_upload.module:59 -msgid "Check this if your users must only submit videos through uploading. This disables path insertion." -msgstr "" - -#: plugins/video_upload/video_upload.module:157 -msgid "If you want to upload a video simply ignore this field and select your video file at the \"Upload video file\" field." -msgstr "" - -#: plugins/video_upload/video_upload.module:160 -msgid "Upload video" -msgstr "" - -#: plugins/video_upload/video_upload.module:189 -msgid "A file must be provided." -msgstr "" - -#: plugins/video_upload/video_upload.module:244 -msgid "An error occurred during file saving. Your video file has not been stored." -msgstr "" - -#: plugins/video_upload/video_upload.module:274 -msgid "Upload video file" -msgstr "" - -#: plugins/video_upload/video_upload.module:277 -msgid "The uploaded file will be used as video file for this node.<br /><b>NOTE:</b> The max upload size is" -msgstr "" - -#: plugins/video_upload/video_upload.module:282 -msgid "Replace with" -msgstr "" - -#: plugins/video_upload/video_upload.module:293 -msgid "A video file has been already uploaded." -msgstr "" - -#: plugins/video_upload/video_upload.module:297 -msgid "file name" -msgstr "" - -#: plugins/video_upload/video_upload.module:298 -msgid "file path" -msgstr "" - -#: plugins/video_upload/video_upload.module:299 -msgid "file size" -msgstr "" - -#: plugins/video_upload/video_upload.module:300 -msgid "file mime" -msgstr "" - -#: plugins/video_upload/video_upload.module:304 -msgid "uploaded video informations:" -msgstr "" - -#: plugins/video_upload/video_upload.module:372;373 -msgid "Sending video... please wait." -msgstr "" - -#: plugins/video_upload/video_upload.module:374 -msgid "Video upload could take some minutes." -msgstr "" - -#: plugins/video_upload/video_upload.module:71 -msgid "upload video files" -msgstr "" - -#: plugins/video_upload/video_upload.module:0 -msgid "video_upload" -msgstr "" - diff --git a/translations/de.po b/translations/de.po new file mode 100644 index 0000000..b6ae698 --- /dev/null +++ b/translations/de.po @@ -0,0 +1,560 @@ +# $Id$ +# +# German translation of Drupal (general) +# Copyright YEAR NAME <EMAIL@ADDRESS> +# Generated from files: +# video_render.php,v 1.1.2.7 2010/01/08 00:25:24 heshanmw +# video_scheduler.php,v 1.1.2.5 2009/12/25 08:35:25 heshanmw +# video.admin.inc,v 1.1.2.11 2010/01/08 00:05:37 heshanmw +# video.module,v 1.69.4.17.2.7 2009/12/23 18:01:58 heshanmw +# video.info,v 1.3.4.1.4.1 2009/12/13 12:59:22 heshanmw +# uploadfield.module,v 1.1.2.23 2010/01/09 15:18:55 heshanmw +# uploadfield.info,v 1.1.2.2 2009/12/23 11:16:59 heshanmw +# video.install,v 1.4.4.1.4.6 2009/12/24 12:35:03 heshanmw +# apiclient.inc,v 1.2.4.4 2009/11/13 14:39:03 heshanmw +# common.inc,v 1.2.4.10.2.9 2009/12/27 06:46:26 heshanmw +# ffmpeg.inc,v 1.1.2.12 2010/01/08 00:35:04 heshanmw +# uploadfield_convert.inc,v 1.1.2.12 2009/12/24 16:16:22 heshanmw +# uploadfield_file.inc,v 1.1.2.5 2009/12/23 13:46:09 heshanmw +# uploadfield_formatter.inc,v 1.1.2.11 2009/12/24 16:34:39 heshanmw +# uploadfield_thumb.inc,v 1.1.2.4 2009/12/24 16:16:22 heshanmw +# uploadfield_widget.inc,v 1.1.2.32 2010/01/17 02:46:46 heshanmw +# +msgid "" +msgstr "" +"Project-Id-Version: Drupal Video 3.6\n" +"POT-Creation-Date: 2010-02-14 16:02+0100\n" +"PO-Revision-Date: 2010-02-14 18:48+0100\n" +"Last-Translator: rastatt <rastatt@drupal.org>\n" +"Language-Team: Frank Tartler <frank.tartler@googlemail.com>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n!=1);\n" +"X-Poedit-Language: German\n" +"X-Poedit-Country: GERMANY\n" +"X-Poedit-SourceCharset: utf-8\n" + +#: video_render.php:56;82;91;113;127 +#: video_scheduler.php:132;141;165;179 +msgid "video_render" +msgstr "" + +#: video_render.php:56 +msgid "Incorrect parameters to the video_render.php script." +msgstr "Fehlerhafte Parameter für as video_render.php-Skript." + +#: video_render.php:82 +#: video_scheduler.php:132 +msgid "video_render.php has been called with an invalid job resource. exiting." +msgstr "video_render.php wurde mit einer ungültigen Job-Ressource aufgerufen; wird beendet." + +#: video_render.php:91 +#: video_scheduler.php:141 +msgid "converted file is an empty file." +msgstr "Die konvertierte Datei ist eine leere Datei." + +#: video_render.php:113 +#: video_scheduler.php:165 +msgid "successfully converted %orig to %dest" +msgstr "%orig erfolgreich in %dest konvertiert" + +#: video_render.php:127 +#: video_scheduler.php:179 +msgid "error moving video %vid_file with nid = %nid to %dir the final directory. Check folder permissions.<br />The script was run by %uname .<br />The folder owner is %fowner .<br />The folder permissions are %perms ." +msgstr "Fehler beim Verschieben des Videos %vid_file (nid = %nid) ins finale Verzeichnis %dir. Die Ordner-Berechtigungen sollten geprüft werden.<br />. Das Skript wurde durch %uname ausgeführt.<br />Der Eigentümer des Ordners ist %fowner.<br />Die Ordner-Berechtigungen sind %perms." + +#: video_scheduler.php:80 +msgid "video_scheduler" +msgstr "" + +#: video_scheduler.php:80 +msgid "no video conversion jobs to schedule." +msgstr "Es stehen keine Jobs zur Video-Konverierung an." + +#: video.admin.inc:22 +msgid "General Behavior" +msgstr "Allgemeines Verhalten" + +#: video.admin.inc:53 +msgid "Automatically start video on page load" +msgstr "Video autmomatisch beim Laden der Seite starten" + +#: video.admin.inc:55 +msgid "Start the video when the page and video loads" +msgstr "Video starten wenn die Seite und das Video geladen wird" + +#: video.admin.inc:60 +msgid "Automatically start video buffering" +msgstr "Video automatisch beim Laden der Seite puffern" + +#: video.admin.inc:62 +msgid "Start buffering video when the page and video loads" +msgstr "Das Puffern des Videos starten wenn die Seite und das Video geladen wird" + +#: video.admin.inc:67 +msgid "Video Extra Players" +msgstr "Video-Extra-Player" + +#: video.admin.inc:73 +msgid "Path to OGG Cortado Player" +msgstr "Pfad zum OGG-Cortado-Player" + +#: video.admin.inc:75 +msgid "Copy your cortado.jar file to Drupal root and keep the setting un-changed." +msgstr "Die Datei cortado.jar in das Drupal-Stammverzeichnis kopieren, Einstellungen unverändert lassen." + +#: video.admin.inc:80 +msgid "Play HQ MP4 files in Flash Player" +msgstr "HQ-MP4-Dateien im Flash-Player abspielen" + +#: video.admin.inc:82 +msgid "Play HQ MP4 files in Flash player." +msgstr "HQ-MP4-Dateien im Flash-Player abspielen." + +#: video.admin.inc:99 +msgid "Video Additions" +msgstr "Video-Zusätze" + +#: video.admin.inc:106 +msgid "Video transcoder" +msgstr "Video-Transcoder" + +#: video.admin.inc:109 +msgid "Video transcoder will help you to video conversion and automatic thumbnail generaion. You must install !ffmpeg_wrapper module to enable ffmpeg_wrapper support" +msgstr "Der Video-Transcoder hilft bei der Video-Konvertierung und beim automatischen Erzeugen von Miniaturansichten. Das !ffmpeg_wrapper-Modul muss für die ffmpeg_wrapper-Unterstützung installiert werden" + +#: video.admin.inc:113 +msgid "Path to Video Transcoder" +msgstr "Pfad zum Video-Transcoder" + +#: video.admin.inc:114 +msgid "Path to executable, you can skip this if your usign ffmpeg_wrapper module support." +msgstr "Pfad zur ausführbaren Datei, dies kann übersprungen werden, wenn Unterstützung für das ffmpeg_wrapper-Modul verwendet wird." + +#: video.admin.inc:122 +msgid "Automatic video thumbnailing" +msgstr "Automatisches Erzeugen von Miniaturansichten für Videos" + +#: video.admin.inc:128 +msgid "Path to Video Thumbnails" +msgstr "Pfad zu den Video-Miniaturansichten" + +#: video.admin.inc:129 +msgid "Path to save video thumbanils extracted from video" +msgstr "Pfad in dem aus dem Video extrahierte Video-Miniaturansichten gespeichert werden sollen" + +#: video.admin.inc:134 +msgid "No of thumbnails" +msgstr "Anzahl Miniaturansichten" + +#: video.admin.inc:135 +msgid "No of thumbnails extracting from video" +msgstr "Anzahl der aus dem Video zu exxtrahierenden Miniaturansichten" + +#: video.admin.inc:140;191 +msgid "Advanced settings" +msgstr "Erweiterte Einstellungen" + +#: video.admin.inc:146 +msgid "Video thumbnailer options" +msgstr "Optionen für Video-Miniaturansichten" + +#: video.admin.inc:147 +msgid "Provide the options for the thumbnailer. Available argument values are: " +msgstr "Bitte die Optionen für das Erstellen von Miniaturansichten angeben. Verfügbare Argument-Werte sind:" + +#: video.admin.inc:147 +msgid "%videofile (the video file to thumbnail)" +msgstr "%videofile (das Video für das Miniaturansichten erstellt werden sollen)" + +#: video.admin.inc:147 +msgid "%thumbfile (a newly created temporary file to overwrite with the thumbnail)" +msgstr "%thumbfile (eine neu erstellte temporäre Datei, die mit der Miniaturansicht überschrieben werden soll)" + +#: video.admin.inc:147 +msgid "Only the first two are mandatory. For example, older versions of ffmpeg should use something like: !old While newer versions should use something like: !new" +msgstr "Nur die ersten beiden sind zwingend. Ältere Versionen von ffmpeg sollten z.B. etwas wie !old verwenden. Dagegen sollten neuere Versionen etwas wie !new verwenden." + +#: video.admin.inc:155 +msgid "Automatic video conversion" +msgstr "Automatische Video-Konvertierung" + +#: video.admin.inc:161 +msgid "Destination video Width" +msgstr "Breite des Ziel-Videos" + +#: video.admin.inc:168 +msgid "Destination video height" +msgstr "Höhe des Ziel-Videos" + +#: video.admin.inc:175 +msgid "Video bitrate" +msgstr "Video-Bitrate" + +#: video.admin.inc:176 +msgid "The video bitrate in bit/s of the converted video." +msgstr "Die Video-Bitrate in bit/s des konvertierten Videos." + +#: video.admin.inc:183 +msgid "Audio bitrate" +msgstr "Audio-Bitrate" + +#: video.admin.inc:184 +msgid "The audio bitrate in bit/s of the converted video." +msgstr "Die Audio-Bitrate in bit/s des konvertierten Videos." + +#: video.admin.inc:197 +msgid "Video converter options" +msgstr "Video-Konverter-Optionen" + +#: video.admin.inc:198 +msgid "Provide the ffmpeg options to configure the video conversion. Available argument values are: " +msgstr "Zu konfigurierende ffmpeg-Optionen für die Video-Konvertierung. Verfügbare Argumente sind:" + +#: video.admin.inc:199 +msgid "%videofile (the video file to convert)" +msgstr "%videofile (die zu konvertierenden Videodatei)" + +#: video.admin.inc:200 +msgid "%convertfile (a newly created file to store the converted file)" +msgstr "%convertfile (eine neu erstellte Datei in der das konvertierte Video geespeichert wird)" + +#: video.admin.inc:201 +msgid "%size (video resolution of the converted file)" +msgstr "%size (Video-Auflösung der konvertierten Datei)" + +#: video.admin.inc:203 +msgid "For further informations refer to the !ffmpegdoc" +msgstr "Die !ffmpegdoc enthält weitere Informationen." + +#: video.admin.inc:203 +msgid "Official FFMpeg documentation." +msgstr "offizielle FFMpeg-Dokumentation" + +#: video.admin.inc:220 +msgid "You do not have installed the !ffmpeg_wrapper module to enable using its plugin, please install it." +msgstr "Das ffmpeg_wrapper-Modul ist nicht installiert, daher kann dieses Plugin nicht aktiviert werden. Bitte installieren!" + +#: video.module:16 +msgid "v_perm" +msgstr "" + +#: video.module:25 +#: video.info:0;0 +#: types/uploadfield/uploadfield.module:201 +#: types/uploadfield/uploadfield.info:0 +msgid "Video" +msgstr "" + +#: video.module:26 +msgid "Configure different aspects of the video module and its plugins" +msgstr "Verschiedene Aspekte des Video-Moduls und seiner Plugins konfigurieren" + +#: video.install:17 +msgid "Store video transcoding queue" +msgstr "Warteschlange für Video-Transkodierung speichern" + +#: video.install:20 +msgid "original file id" +msgstr "Original-Datei-ID" + +#: video.install:27 +msgid "Process ID" +msgstr "Prozess-ID" + +#: video.install:34 +msgid "status of the transcoding" +msgstr "Status der Transkodierung" + +#: video.install:41 +msgid "Started transcodings" +msgstr "Transkodierungen gestartet" + +#: video.install:47 +msgid "Transcoding completed" +msgstr "Transkodierung abgeschlossen" + +#: video.install:53 +msgid "Informations related to the videos" +msgstr "Informationen in Bezug auf die Videos" + +#: video.info:0 +msgid "Allows video nodes." +msgstr "Video-Beiträge erlauben" + +#: includes/apiclient.inc:44;81 +msgid "YouTube Uploads not currently available" +msgstr "YouTube-Uploads sind momentan nicht verfügbar" + +#: includes/apiclient.inc:62;67 +msgid "YouTube uploads currently unavailable" +msgstr "YouTube-Uploads momentan nicht verfügbar" + +#: includes/apiclient.inc:33;40;63;68;80 +msgid "video_upload" +msgstr "" + +#: includes/apiclient.inc:33 +msgid "No YouTube username set" +msgstr "Kein YouTube-Benutzername angegeben" + +#: includes/apiclient.inc:40 +msgid "No YouTube password set" +msgstr "Kein YouTube-Passwort angegeben" + +#: includes/apiclient.inc:63 +msgid "Authentication error for YouTube Account" +msgstr "Authentifizierungsfehler mit den YouTube-Benutzerdaten" + +#: includes/apiclient.inc:68 +msgid "Authentication error for YouTube Account: %error" +msgstr "Authentifizierungsfehler mit den YouTube-Benutzerdaten: %errror" + +#: includes/apiclient.inc:80 +msgid "No developer key set" +msgstr "Kein Entwickler-Schlüssel angegeben" + +#: includes/apiclient.inc:104;133 +msgid "youtube_video" +msgstr "" + +#: includes/apiclient.inc:104 +msgid "Authentication error while creating a YouTube connection object: %error" +msgstr "Authentifizierungsfehler beim Erstellen des YouTube-Verbindungsobjekts: %error" + +#: includes/apiclient.inc:133 +msgid "Authentication error while receiving YouTube connection object: %error" +msgstr "Authentifierungsfehler beim Empfang des YouTube-Verbindungsobjekts: %error" + +#: includes/apiclient.inc:161 +msgid "youtbe_video" +msgstr "" + +#: includes/apiclient.inc:161 +msgid "Couldn't find the Zend client libraries." +msgstr "Die Zend-Client-Bibliotheken konnten nicht gefunden werden." + +#: includes/common.inc:156;199;285;337;385 +msgid "Your browser is not able to display this multimedia content." +msgstr "Dieser Browser kann diesen Multimedia-Inhalt nicht anzeigen." + +#: includes/common.inc:0 +msgid "1 year" +msgid_plural "@count years" +msgstr[0] "1 Jahr" +msgstr[1] "@count Jahre" + +#: includes/common.inc:0 +msgid "1 week" +msgid_plural "@count weeks" +msgstr[0] "1 Woche" +msgstr[1] "@count Wochen" + +#: includes/common.inc:0 +msgid "1 day" +msgid_plural "@count days" +msgstr[0] "1 Tag" +msgstr[1] "@count Tage" + +#: includes/common.inc:0 +msgid "1 hour" +msgid_plural "@count hours" +msgstr[0] "1 Stunde" +msgstr[1] "@count Stunden" + +#: includes/common.inc:0 +msgid "1 min" +msgid_plural "@count min" +msgstr[0] "1 Minute" +msgstr[1] "@count Minuten" + +#: includes/common.inc:0 +msgid "1 sec" +msgid_plural "@count sec" +msgstr[0] "1 Sekunde" +msgstr[1] "@count Sekunden" + +#: plugins/ffmpeg.inc:177 +#: plugins/ffmpeg_wrapper.inc:179 +msgid "error generating thumbnail for video: generated file %file does not exist.<br />Command Executed:<br />%cmd<br />Command Output:<br />%out" +msgstr "Fehler beim Erzeugen der Video-Miniaturansicht: erzeugte Datei %file existiert nicht.<br />Ausgeführter Befehl:<br />%cmd<br />Befehlsausgabe:<br />%out" + +#: types/uploadfield/uploadfield_convert.inc:52;63 +msgid "Video submission queued for processing. Please wait: our servers are preparing your video for web displaying." +msgstr "Das gespeicherte Video wurde zur Verarbeitung in die Warteschlange gestellt. Bitte warten: unsere Server bereiten das Video für die Anzeige im Web vor." + +#: types/uploadfield/uploadfield_file.inc:121 +msgid "An image thumbnail was not able to be created." +msgstr "Eine Bild-Miniaturansicht konnte nicht erstellt werden." + +#: types/uploadfield/uploadfield_formatter.inc:150 +msgid "This video is currently being processed. Please wait." +msgstr "Dieses Video wird momentan verarbeitet. Bitte warten." + +#: types/uploadfield/uploadfield_formatter.inc:158 +msgid "The video conversion process has failed. You might want to submit a simpler video format like <em>mpeg</em> or <em>divx avi</em>.<br />If the problem persists please contact website administrators." +msgstr "Der Video-Konvertierungsprozess ist fehlgeschlagen. Es sollte ein einfacheres Videoformat wie <em>mpeg</em> oder <em>DivX avi</em> angegeben werden.<br />Wenn das problem weiterhin besteht, sollten die Website-Administratoren kontaktiert werden." + +#: types/uploadfield/uploadfield_thumb.inc:25 +msgid "Transcoder not configured properly" +msgstr "Transcoder nicht korrekt konfiguriert" + +#: types/uploadfield/uploadfield_thumb.inc:40 +msgid "Video Thumbnails" +msgstr "Video-Miniaturansichten" + +#: types/uploadfield/uploadfield_widget.inc:22 +msgid "Video Player Settings" +msgstr "Video-Player-Einstellungen" + +#: types/uploadfield/uploadfield_widget.inc:30 +msgid "Default Video Resolution" +msgstr "Standardmäßige Video-Auflösung" + +#: types/uploadfield/uploadfield_widget.inc:34 +#, fuzzy +msgid "Default player resolution WIDTHXHEIGHT in px. eg : 16:9 for widescreen or 4:3 for general screen" +msgstr "Standardmäßige Video-Auflösung Breite:Höhe in Pixeln, z.B. 16:9 für Breitformat oder 4:3 für gewöhnliches Format." + +#: types/uploadfield/uploadfield_widget.inc:39 +msgid "Default Video Player Width" +msgstr "Standardmäßige Breite des Video-Players" + +#: types/uploadfield/uploadfield_widget.inc:43 +msgid "Default player WIDTHXHEIGHT in px. eg : 640 for 640X480 player size if resolution it 4:3" +msgstr "Standardmäßge BreiteXHöhe des Players in Pixeln, z.B. 640 für die Player-Größe 640x480, wenn die Auflösung 4:3 ist." + +#: types/uploadfield/uploadfield_widget.inc:50 +msgid "Video Thumbnail Settings" +msgstr "Einstellungen für Video-Miniaturansichten" + +#: types/uploadfield/uploadfield_widget.inc:69 +msgid "Upload video thumbnail" +msgstr "Video-Miniaturansicht hochladen" + +#: types/uploadfield/uploadfield_widget.inc:69 +msgid "Replace video thumbnail with" +msgstr "Video-Miniaturansicht ersetzen durch" + +#: types/uploadfield/uploadfield_widget.inc:70 +msgid "Choose a image that will be used as default video thumbnail." +msgstr "Auswahl eines Bildes, das als standardmäßige Video-Miniaturansict verwendet wird" + +#: types/uploadfield/uploadfield_widget.inc:83 +msgid "Video Advanced Settings" +msgstr "Erweiterte Video-Einstellungen" + +#: types/uploadfield/uploadfield_widget.inc:90 +msgid "Enable auto conversion video" +msgstr "Automatische Video-Konvertierung aktivieren" + +#: types/uploadfield/uploadfield_widget.inc:91 +msgid "Use ffmpeg(Default) to automaticcally convert videos to web compatible types eg. FLV, Please make sure to configure convertor settings." +msgstr "Ffmpeg (Standard) kann verwendet werden, um Videos automatisch in Web-kompatible Formate, z.B. FLV, zu konvertieren. Es muss sichergestellt werden, dass die Konverter-Einstellungen konfiguriert sind." + +#: types/uploadfield/uploadfield_widget.inc:96 +msgid "Enable auto thumbnail video" +msgstr "Automatisches Erstellen von Video-Miniaturansichten aktivieren" + +#: types/uploadfield/uploadfield_widget.inc:97 +msgid "Use ffmpeg(Default) to automaticcally thumbnails, Please make sure to configure convertor settings." +msgstr "Ffmpeg (Standard) kann verwendet werden um automatisch Miniaturansichten zu erstellen. Es muss sichergestellt werden, dass die Konverter-Einstellungen konfiguriert sind." + +#: types/uploadfield/uploadfield_widget.inc:115 +msgid "The default image could not be uploaded. The destination %destination does not exist or is not writable by the server." +msgstr "Das Standardbild konnte nicht hochgeladen werden. Das Ziel %destination existiert nicht oder kann nicht durch den Server geschrieben werden." + +#: types/uploadfield/uploadfield_widget.inc:160 +msgid "Only web-standard videos are supported through the video widget. If needing to upload other types of files, change the widget to use a standard file upload." +msgstr "Nur standardmäßige Web-Videos werden durchc das Video-Widget unterstützt. Wenn andere Dateitypen hochgeladen werden müssen, muss das Widget in ein standardmäßigen Datei-Upload geändert werden." + +#: types/uploadfield/uploadfield_widget.inc:166 +msgid "Please specify default width in integers only (e.g. 640)." +msgstr "Bitte die standardmäßige Breite als ganze Zahl angeben (z.B. 640)" + +#: types/uploadfield/uploadfield_widget.inc:173 +msgid "Please specify a resolution in the format WIDTH:HEIGHT (e.g. 16:9)." +msgstr "Bitte die Auflösung im Format WIDTH:HEIGHT angeben( z.B. 16:9)." + +#: types/uploadfield/uploadfield_widget.inc:228 +msgid "Width for Player" +msgstr "Player-Breite" + +#: types/uploadfield/uploadfield_widget.inc:230 +msgid "Set player width(in pix) here, make sure your video have good resolution to fix on larger values." +msgstr "Player-Breite (in Pixeln) hier einstellen, es sollte auch sichergestellt werden, dass bei größeren Werten die Videos eine gute Auflösung haben." + +#: types/uploadfield/uploadfield_widget.inc:246 +msgid "Bypass auto conversion" +msgstr "Automatische Konvertierung umgehen" + +#: types/uploadfield/uploadfield_widget.inc:248 +msgid "This will bypass your auto conversion of videos." +msgstr "Dies umgeht die automatische Konvertierung von Videos." + +#: types/uploadfield/uploadfield_widget.inc:264 +msgid "Override Video Thumbnail with Default" +msgstr "Video-Miniaturansicht mit Standard überschreiben" + +#: types/uploadfield/uploadfield_widget.inc:266 +msgid "If you want to use default image instead of using actual thumbnail of video then check." +msgstr "Ankreuzen, wenn das Standardbild anstelle der aktuellen Video-Miniaturansichten verwendet werden soll." + +#: types/uploadfield/uploadfield_widget.inc:278 +msgid "Save" +msgstr "Speichern" + +#: types/uploadfield/uploadfield_widget.inc:290 +msgid "Preview" +msgstr "Vorschau" + +#: types/uploadfield/uploadfield_widget.inc:293 +msgid "Delete" +msgstr "Löschen" + +#: types/uploadfield/uploadfield.module:23 +msgid "The uploadfield module has been disabled. The <a href=\"http://drupal.org/project/filefield\">FileField module</a> needs to be installed for it to work properly." +msgstr "Das Uploadfield-Modul wurde deaktiviert. Dass <a href=\"http://drupal.org/project/filefield\">FileField-Modul</a> muss installiert werden, damit es korrekt funktioniert." + +#: types/uploadfield/uploadfield.module:205 +msgid "An edit widget for video files, including video thumbnails and transcoding to flash." +msgstr "Ein Bearbeiten-Widget für Video-Dateien inklusive Video-Miniaturansichten und Transkodieren nach Flash." + +#: types/uploadfield/uploadfield.module:296 +msgid "video" +msgstr "" + +#: types/uploadfield/uploadfield.module:298 +msgid "Displays video files with player embeded." +msgstr "Zeigt Videos mit dem eingebetteten Player an." + +#: types/uploadfield/uploadfield.module:301 +msgid "video thumbnail linked to video" +msgstr "Video-Miniaturansicht, verbunden mit dem Video" + +#: types/uploadfield/uploadfield.module:303 +msgid "Displays video thumb files then the video." +msgstr "Zeigt Video-Miniaturansichten an, dann das Video" + +#: types/uploadfield/uploadfield.module:315 +msgid "@preset of video thumbnail linked to video" +msgstr "Voreinstellung @preset der Video-Miniaturansicht, verbunden mit dem Video" + +#: types/uploadfield/uploadfield.module:445 +msgid "Upload support" +msgstr "Unterstützung für das Hochladen" + +#: types/uploadfield/uploadfield.module:446 +msgid "You can upload a video file from your computer to this website." +msgstr "Von diesem Computer kann ein Video zur Website hochgeladen werden." + +#: types/uploadfield/uploadfield.info:0 +#, fuzzy +msgid "Video Upload" +msgstr "Hochladen von Videos" + +#: types/uploadfield/uploadfield.info:0 +msgid "handle video upload for video module using filefield and CCK." +msgstr "Hochladen von Videos durch das Video-Modul mittels filefield und CCK abwickeln." + diff --git a/translations/video.pot b/translations/video.pot new file mode 100644 index 0000000..112e194 --- /dev/null +++ b/translations/video.pot @@ -0,0 +1,548 @@ +# $Id$ +# +# LANGUAGE translation of Drupal (general) +# Copyright YEAR NAME <EMAIL@ADDRESS> +# Generated from files: +# video_render.php,v 1.1.2.7 2010/01/08 00:25:24 heshanmw +# video_scheduler.php,v 1.1.2.8 2010/02/14 02:33:33 heshanmw +# video.admin.inc,v 1.1.2.15 2010/02/14 03:28:53 heshanmw +# video.module,v 1.69.4.17.2.7 2009/12/23 18:01:58 heshanmw +# video.info,v 1.3.4.1.4.1 2009/12/13 12:59:22 heshanmw +# uploadfield.module,v 1.1.2.24 2010/02/14 10:42:49 heshanmw +# uploadfield.info,v 1.1.2.2 2009/12/23 11:16:59 heshanmw +# video.install,v 1.4.4.1.4.6 2009/12/24 12:35:03 heshanmw +# apiclient.inc,v 1.2.4.4 2009/11/13 14:39:03 heshanmw +# common.inc,v 1.2.4.10.2.11 2010/02/14 03:02:06 heshanmw +# ffmpeg.inc,v 1.1.2.14 2010/02/13 11:31:28 heshanmw +# ffmpeg_wrapper.inc,v 1.1.2.1 2010/02/13 11:31:28 heshanmw +# uploadfield_convert.inc,v 1.1.2.12 2009/12/24 16:16:22 heshanmw +# uploadfield_file.inc,v 1.1.2.5 2009/12/23 13:46:09 heshanmw +# uploadfield_formatter.inc,v 1.1.2.14 2010/02/14 10:42:49 heshanmw +# uploadfield_thumb.inc,v 1.1.2.4 2009/12/24 16:16:22 heshanmw +# uploadfield_widget.inc,v 1.1.2.33 2010/02/14 02:32:55 heshanmw +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PROJECT VERSION\n" +"POT-Creation-Date: 2010-02-14 16:02+0100\n" +"PO-Revision-Date: YYYY-mm-DD HH:MM+ZZZZ\n" +"Last-Translator: NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <EMAIL@ADDRESS>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" + +#: video_render.php:56;82;91;113;127 video_scheduler.php:132;141;165;179 +msgid "video_render" +msgstr "" + +#: video_render.php:56 +msgid "Incorrect parameters to the video_render.php script." +msgstr "" + +#: video_render.php:82 video_scheduler.php:132 +msgid "video_render.php has been called with an invalid job resource. exiting." +msgstr "" + +#: video_render.php:91 video_scheduler.php:141 +msgid "converted file is an empty file." +msgstr "" + +#: video_render.php:113 video_scheduler.php:165 +msgid "successfully converted %orig to %dest" +msgstr "" + +#: video_render.php:127 video_scheduler.php:179 +msgid "error moving video %vid_file with nid = %nid to %dir the final directory. Check folder permissions.<br />The script was run by %uname .<br />The folder owner is %fowner .<br />The folder permissions are %perms ." +msgstr "" + +#: video_scheduler.php:80 +msgid "video_scheduler" +msgstr "" + +#: video_scheduler.php:80 +msgid "no video conversion jobs to schedule." +msgstr "" + +#: video.admin.inc:22 +msgid "General Behavior" +msgstr "" + +#: video.admin.inc:53 +msgid "Automatically start video on page load" +msgstr "" + +#: video.admin.inc:55 +msgid "Start the video when the page and video loads" +msgstr "" + +#: video.admin.inc:60 +msgid "Automatically start video buffering" +msgstr "" + +#: video.admin.inc:62 +msgid "Start buffering video when the page and video loads" +msgstr "" + +#: video.admin.inc:67 +msgid "Video Extra Players" +msgstr "" + +#: video.admin.inc:73 +msgid "Path to OGG Cortado Player" +msgstr "" + +#: video.admin.inc:75 +msgid "Copy your cortado.jar file to Drupal root and keep the setting un-changed." +msgstr "" + +#: video.admin.inc:80 +msgid "Play HQ MP4 files in Flash Player" +msgstr "" + +#: video.admin.inc:82 +msgid "Play HQ MP4 files in Flash player." +msgstr "" + +#: video.admin.inc:99 +msgid "Video Additions" +msgstr "" + +#: video.admin.inc:106 +msgid "Video transcoder" +msgstr "" + +#: video.admin.inc:109 +msgid "Video transcoder will help you to video conversion and automatic thumbnail generaion. You must install !ffmpeg_wrapper module to enable ffmpeg_wrapper support" +msgstr "" + +#: video.admin.inc:113 +msgid "Path to Video Transcoder" +msgstr "" + +#: video.admin.inc:114 +msgid "Path to executable, you can skip this if your usign ffmpeg_wrapper module support." +msgstr "" + +#: video.admin.inc:122 +msgid "Automatic video thumbnailing" +msgstr "" + +#: video.admin.inc:128 +msgid "Path to Video Thumbnails" +msgstr "" + +#: video.admin.inc:129 +msgid "Path to save video thumbanils extracted from video" +msgstr "" + +#: video.admin.inc:134 +msgid "No of thumbnails" +msgstr "" + +#: video.admin.inc:135 +msgid "No of thumbnails extracting from video" +msgstr "" + +#: video.admin.inc:140;191 +msgid "Advanced settings" +msgstr "" + +#: video.admin.inc:146 +msgid "Video thumbnailer options" +msgstr "" + +#: video.admin.inc:147 +msgid "Provide the options for the thumbnailer. Available argument values are: " +msgstr "" + +#: video.admin.inc:147 +msgid "%videofile (the video file to thumbnail)" +msgstr "" + +#: video.admin.inc:147 +msgid "%thumbfile (a newly created temporary file to overwrite with the thumbnail)" +msgstr "" + +#: video.admin.inc:147 +msgid "Only the first two are mandatory. For example, older versions of ffmpeg should use something like: !old While newer versions should use something like: !new" +msgstr "" + +#: video.admin.inc:155 +msgid "Automatic video conversion" +msgstr "" + +#: video.admin.inc:161 +msgid "Destination video Width" +msgstr "" + +#: video.admin.inc:168 +msgid "Destination video height" +msgstr "" + +#: video.admin.inc:175 +msgid "Video bitrate" +msgstr "" + +#: video.admin.inc:176 +msgid "The video bitrate in bit/s of the converted video." +msgstr "" + +#: video.admin.inc:183 +msgid "Audio bitrate" +msgstr "" + +#: video.admin.inc:184 +msgid "The audio bitrate in bit/s of the converted video." +msgstr "" + +#: video.admin.inc:197 +msgid "Video converter options" +msgstr "" + +#: video.admin.inc:198 +msgid "Provide the ffmpeg options to configure the video conversion. Available argument values are: " +msgstr "" + +#: video.admin.inc:199 +msgid "%videofile (the video file to convert)" +msgstr "" + +#: video.admin.inc:200 +msgid "%convertfile (a newly created file to store the converted file)" +msgstr "" + +#: video.admin.inc:201 +msgid "%size (video resolution of the converted file)" +msgstr "" + +#: video.admin.inc:203 +msgid "For further informations refer to the !ffmpegdoc" +msgstr "" + +#: video.admin.inc:203 +msgid "Official FFMpeg documentation." +msgstr "" + +#: video.admin.inc:220 +msgid "You do not have installed the !ffmpeg_wrapper module to enable using its plugin, please install it." +msgstr "" + +#: video.module:16 +msgid "v_perm" +msgstr "" + +#: video.module:25 video.info:0;0 types/uploadfield/uploadfield.module:201 types/uploadfield/uploadfield.info:0 +msgid "Video" +msgstr "" + +#: video.module:26 +msgid "Configure different aspects of the video module and its plugins" +msgstr "" + +#: video.install:17 +msgid "Store video transcoding queue" +msgstr "" + +#: video.install:20 +msgid "original file id" +msgstr "" + +#: video.install:27 +msgid "Process ID" +msgstr "" + +#: video.install:34 +msgid "status of the transcoding" +msgstr "" + +#: video.install:41 +msgid "Started transcodings" +msgstr "" + +#: video.install:47 +msgid "Transcoding completed" +msgstr "" + +#: video.install:53 +msgid "Informations related to the videos" +msgstr "" + +#: video.info:0 +msgid "Allows video nodes." +msgstr "" + +#: includes/apiclient.inc:44;81 +msgid "YouTube Uploads not currently available" +msgstr "" + +#: includes/apiclient.inc:62;67 +msgid "YouTube uploads currently unavailable" +msgstr "" + +#: includes/apiclient.inc:33;40;63;68;80 +msgid "video_upload" +msgstr "" + +#: includes/apiclient.inc:33 +msgid "No YouTube username set" +msgstr "" + +#: includes/apiclient.inc:40 +msgid "No YouTube password set" +msgstr "" + +#: includes/apiclient.inc:63 +msgid "Authentication error for YouTube Account" +msgstr "" + +#: includes/apiclient.inc:68 +msgid "Authentication error for YouTube Account: %error" +msgstr "" + +#: includes/apiclient.inc:80 +msgid "No developer key set" +msgstr "" + +#: includes/apiclient.inc:104;133 +msgid "youtube_video" +msgstr "" + +#: includes/apiclient.inc:104 +msgid "Authentication error while creating a YouTube connection object: %error" +msgstr "" + +#: includes/apiclient.inc:133 +msgid "Authentication error while receiving YouTube connection object: %error" +msgstr "" + +#: includes/apiclient.inc:161 +msgid "youtbe_video" +msgstr "" + +#: includes/apiclient.inc:161 +msgid "Couldn't find the Zend client libraries." +msgstr "" + +#: includes/common.inc:156;199;285;337;385 +msgid "Your browser is not able to display this multimedia content." +msgstr "" + +#: includes/common.inc:0 +msgid "1 year" +msgid_plural "@count years" +msgstr[0] "" +msgstr[1] "" + +#: includes/common.inc:0 +msgid "1 week" +msgid_plural "@count weeks" +msgstr[0] "" +msgstr[1] "" + +#: includes/common.inc:0 +msgid "1 day" +msgid_plural "@count days" +msgstr[0] "" +msgstr[1] "" + +#: includes/common.inc:0 +msgid "1 hour" +msgid_plural "@count hours" +msgstr[0] "" +msgstr[1] "" + +#: includes/common.inc:0 +msgid "1 min" +msgid_plural "@count min" +msgstr[0] "" +msgstr[1] "" + +#: includes/common.inc:0 +msgid "1 sec" +msgid_plural "@count sec" +msgstr[0] "" +msgstr[1] "" + +#: plugins/ffmpeg.inc:177 plugins/ffmpeg_wrapper.inc:179 +msgid "error generating thumbnail for video: generated file %file does not exist.<br />Command Executed:<br />%cmd<br />Command Output:<br />%out" +msgstr "" + +#: types/uploadfield/uploadfield_convert.inc:52;63 +msgid "Video submission queued for processing. Please wait: our servers are preparing your video for web displaying." +msgstr "" + +#: types/uploadfield/uploadfield_file.inc:121 +msgid "An image thumbnail was not able to be created." +msgstr "" + +#: types/uploadfield/uploadfield_formatter.inc:150 +msgid "This video is currently being processed. Please wait." +msgstr "" + +#: types/uploadfield/uploadfield_formatter.inc:158 +msgid "The video conversion process has failed. You might want to submit a simpler video format like <em>mpeg</em> or <em>divx avi</em>.<br />If the problem persists please contact website administrators." +msgstr "" + +#: types/uploadfield/uploadfield_thumb.inc:25 +msgid "Transcoder not configured properly" +msgstr "" + +#: types/uploadfield/uploadfield_thumb.inc:40 +msgid "Video Thumbnails" +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:22 +msgid "Video Player Settings" +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:30 +msgid "Default Video Resolution" +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:34 +msgid "Default player resolution WIDTHXHEIGHT in px. eg : 16:9 for widescreen or 4:3 for general screen" +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:39 +msgid "Default Video Player Width" +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:43 +msgid "Default player WIDTHXHEIGHT in px. eg : 640 for 640X480 player size if resolution it 4:3" +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:50 +msgid "Video Thumbnail Settings" +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:69 +msgid "Upload video thumbnail" +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:69 +msgid "Replace video thumbnail with" +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:70 +msgid "Choose a image that will be used as default video thumbnail." +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:83 +msgid "Video Advanced Settings" +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:90 +msgid "Enable auto conversion video" +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:91 +msgid "Use ffmpeg(Default) to automaticcally convert videos to web compatible types eg. FLV, Please make sure to configure convertor settings." +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:96 +msgid "Enable auto thumbnail video" +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:97 +msgid "Use ffmpeg(Default) to automaticcally thumbnails, Please make sure to configure convertor settings." +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:115 +msgid "The default image could not be uploaded. The destination %destination does not exist or is not writable by the server." +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:160 +msgid "Only web-standard videos are supported through the video widget. If needing to upload other types of files, change the widget to use a standard file upload." +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:166 +msgid "Please specify default width in integers only (e.g. 640)." +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:173 +msgid "Please specify a resolution in the format WIDTH:HEIGHT (e.g. 16:9)." +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:228 +msgid "Width for Player" +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:230 +msgid "Set player width(in pix) here, make sure your video have good resolution to fix on larger values." +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:246 +msgid "Bypass auto conversion" +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:248 +msgid "This will bypass your auto conversion of videos." +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:264 +msgid "Override Video Thumbnail with Default" +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:266 +msgid "If you want to use default image instead of using actual thumbnail of video then check." +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:278 +msgid "Save" +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:290 +msgid "Preview" +msgstr "" + +#: types/uploadfield/uploadfield_widget.inc:293 +msgid "Delete" +msgstr "" + +#: types/uploadfield/uploadfield.module:23 +msgid "The uploadfield module has been disabled. The <a href=\"http://drupal.org/project/filefield\">FileField module</a> needs to be installed for it to work properly." +msgstr "" + +#: types/uploadfield/uploadfield.module:205 +msgid "An edit widget for video files, including video thumbnails and transcoding to flash." +msgstr "" + +#: types/uploadfield/uploadfield.module:296 +msgid "video" +msgstr "" + +#: types/uploadfield/uploadfield.module:298 +msgid "Displays video files with player embeded." +msgstr "" + +#: types/uploadfield/uploadfield.module:301 +msgid "video thumbnail linked to video" +msgstr "" + +#: types/uploadfield/uploadfield.module:303 +msgid "Displays video thumb files then the video." +msgstr "" + +#: types/uploadfield/uploadfield.module:315 +msgid "@preset of video thumbnail linked to video" +msgstr "" + +#: types/uploadfield/uploadfield.module:445 +msgid "Upload support" +msgstr "" + +#: types/uploadfield/uploadfield.module:446 +msgid "You can upload a video file from your computer to this website." +msgstr "" + +#: types/uploadfield/uploadfield.info:0 +msgid "Video Upload" +msgstr "" + +#: types/uploadfield/uploadfield.info:0 +msgid "handle video upload for video module using filefield and CCK." +msgstr "" + diff --git a/types/uploadfield/uploadfield.css b/types/uploadfield/uploadfield.css new file mode 100644 index 0000000..dc5b21a --- /dev/null +++ b/types/uploadfield/uploadfield.css @@ -0,0 +1,114 @@ +/* $Id$ */ + +.filefield-element .filefield-file-info, .video_thumbnail { + min-width: 100px; + min-height: 100px; +} + +.filefield-element .imagefield-preview { + min-width: 100px; + min-height: 100px; +} + +.filefield-element .imagefield-text { + max-width: 40em; /* Reflect the maxlength of the ALT attribute (80 characters). */ +} + +.filefield-element .uploadfield-text { + max-width: 40em; +} + +.video_thumbnail { + min-width: 100px; + min-height: 100px; +} + +.uploadfield { + +} + +.uploadfield-nodelink { + +} + +.uploadfield-video-thumb { + +} + +.uploadfield-video-thumb img{ + width : 250px; +/* min-width: 100px; */ + min-height: 210px; + +} + +.uploadfield-video-thumb span{ + /* This is the overlay image for use as a play button. */ + background: url(../../images/play.png) no-repeat; + + /* This is the size of our button. DOES NOT WORK WITH DEFAULT THUMB SIZE! */ + width: 50px; + height: 112px; + position : absolute; + margin : 65px 100px; +} + +.uploadfield-video-thumb span:hover { + background-position: -50px 0px; +} + +.video-width-text { + width:10px; +} + +.video-thumb-selection{ + +} + +.video-thumb-selection .form-item { + +} + +.video-thumbnails{ +/* display : block;*/ +} +.video-thumbnails .form-item{ + float:left; + margin-right:10px; + max-width:30%; + padding-right:10px; +} + +.video-bypass-auto-conversion{ + +} +.video-default-thumbnail{ + +} + +.video-data{ + +} + +.video_image_teaser { + float: left; + padding: 0.5em; +} + +br.video_image_clear { + clear: both; +} + +.video_image_view { + /* inser here rules for node page image */ +} + +.video-ffmpeg-helper-inprogress { + border: 1px solid red; + padding: .5em; +} + +/* override filefield entry */ +.widget-edit{ + max-width:70%; +}
\ No newline at end of file diff --git a/types/uploadfield/uploadfield.info b/types/uploadfield/uploadfield.info new file mode 100644 index 0000000..09691ad --- /dev/null +++ b/types/uploadfield/uploadfield.info @@ -0,0 +1,9 @@ +; $Id$ +name = Video Upload +description = handle video upload for video module using filefield and CCK. +core = 6.x +dependencies[] = content +dependencies[] = filefield +dependencies[] = video +package = "Video" + diff --git a/types/uploadfield/uploadfield.install b/types/uploadfield/uploadfield.install new file mode 100644 index 0000000..a2e1b65 --- /dev/null +++ b/types/uploadfield/uploadfield.install @@ -0,0 +1,25 @@ +<?php +// $Id$ + +/** + * Implementation of hook_install(). + */ +function uploadfield_install() { + drupal_load('module', 'content'); + content_notify('install', 'uploadfield'); +} + +function uploadfield_uninstall() { + drupal_load('module', 'content'); + content_notify('uninstall', 'uploadfield'); +} + +function uploadfield_enable() { + drupal_load('module', 'content'); + content_notify('enable', 'uploadfield'); +} + +function uploadfield_disable() { + drupal_load('module', 'content'); + content_notify('disable', 'uploadfield'); +}
\ No newline at end of file diff --git a/types/uploadfield/uploadfield.module b/types/uploadfield/uploadfield.module new file mode 100644 index 0000000..73d4247 --- /dev/null +++ b/types/uploadfield/uploadfield.module @@ -0,0 +1,540 @@ +<?php +// $Id$ + +/** + * @file + * uploadfield core hooks and menu callbacks. + */ + +include_once dirname(__FILE__) . '/uploadfield_file.inc'; +include_once dirname(__FILE__) . '/uploadfield_widget.inc'; + +/** + * Implementation of hook_init(). + * + * Load required includes. + */ +function uploadfield_init() { +// add CSS file + drupal_add_css(drupal_get_path('module', 'video') .'/types/uploadfield/uploadfield.css'); + // If FileField is not available, immediately disable uploadfield. + if (!module_exists('filefield')) { + module_disable(array('uploadfield')); + drupal_set_message(t('The uploadfield module has been disabled. The <a href="http://drupal.org/project/filefield">FileField module</a> needs to be installed for it to work properly.')); + return; + } +} + +/** + * Implementation of hook_theme(). + */ +function uploadfield_theme() { + $theme = array(); + $theme = array( + // Theme an image uploaded to uploadfield with alt and title. + // TODO: Switch to core theme image if possible. + 'uploadfield_image' => array( + 'arguments' => array('file' => NULL, + 'alt' => '', + 'title' => '', + 'attributes' => NULL, + 'getsize' => TRUE), + ), + // Theme an uploadfield field item. It calls imagefied_image with the proper + // item properties as arguments. + 'uploadfield_item' => array( + 'arguments' => array('item' => NULL), + ), + // uploadfield_widget form element type theme function. + 'uploadfield_widget' => array( + 'arguments' => array('element' => NULL), + 'file' => 'uploadfield_widget.inc', + ), + // Use to generate a preview (admin view) of an uploadfield item for use in + // field item forms and filefield widgets. Invoked by filefield_widget_process. + 'uploadfield_widget_preview' => array( + 'arguments' => array('item' => NULL), + ), + // Theme function for the field item elements. allows you to place children + // within the context of the parent. + 'uploadfield_widget_item' => array( + 'arguments' => array('element' => NULL), + ), + // Generates and img tag to the admin thumbnail of an uploadfield upload. + 'uploadfield_admin_thumbnail' => array( + 'arguments' => array('item' => NULL), + ), + // Generates and img tag to the video thumbnails. + 'uploadfield_widget_video_thumb' => array( + 'arguments' => array('item' => NULL), + ), + + // uploadfield formatter theme functions. + 'uploadfield_formatter_video_plain' => array( + 'arguments' => array('element' => NULL), + 'file' => 'uploadfield_formatter.inc', + ), + 'uploadfield_formatter_video_nodelink' => array( + 'arguments' => array('element' => NULL), + 'file' => 'uploadfield_formatter.inc', + ), + 'uploadfield_formatter_video_imagelink' => array( + 'arguments' => array('element' => NULL), + 'file' => 'uploadfield_formatter.inc', + ), + + //from includes/common.inc + 'video_format_play' => array( + 'arguments' => array( 'output' => NULL, + 'url' => NULL, + 'title' => NULL, + 'link_text' => NULL + ), + ), + 'video_play_dcr' => array( + 'arguments' => array('node' => NULL), + ), + 'video_play_divx' => array( + 'arguments' => array('node' => NULL), + ), + 'video_play_flash' => array( + 'arguments' => array('node' => NULL), + ), + 'video_play_ogg_theora' => array( + 'arguments' => array('node' => NULL), + ), + 'video_play_quicktime' => array( + 'arguments' => array('node' => NULL), + ), + 'video_play_realmedia' => array( + 'arguments' => array('node' => NULL), + ), + 'video_play_swf' => array( + 'arguments' => array('node' => NULL), + ), + 'video_play_windowsmedia' => array( + 'arguments' => array('node' => NULL), + ), + 'video_encoding_failed' => array( + 'arguments' => array(), + ), + 'video_inprogress' => array( + 'arguments' => array(), + ), + ); + if(module_exists('imagecache')) { + // imagecache presets + foreach (imagecache_presets() as $preset) { + $theme['uploadfield_formatter_'. $preset['presetname'] .'_videolinked'] = array( + 'arguments' => array('element' => NULL), + 'function' => 'theme_uploadfield_formatter_videolinked', + 'file' => 'uploadfield_formatter.inc' + ); + } + } + + return $theme; +} + +/** + * Implementation of hook_elements(). + */ +function uploadfield_elements() { + $elements = array(); + + // An uploadfield is really just a FileField with extra processing. + $filefield_elements = module_invoke('filefield', 'elements'); + $elements['uploadfield_widget'] = $filefield_elements['filefield_widget']; + $elements['uploadfield_widget']['#process'][] = 'uploadfield_widget_process'; + $elements['uploadfield_widget']['#element_validate'][] = 'uploadfield_widget_validate'; + + // uploadfield needs a separate value callback to save its alt and title texts. + $elements['uploadfield_widget']['#value_callback'] = 'uploadfield_widget_value'; + + return $elements; +} + +/** + * Implementation of hook_file_download. + */ +function uploadfield_file_download($filepath) { +// watchdog('video', 'file path is ' . $filepath); +// echo $filepath; +// Return headers for admin thumbnails if private files are enabled. +// if (strpos($filepath, 'video_thumbs') !== FALSE) { +// $original_path = str_replace('video_thumbs/', '', $filepath); +// $original_full_path = file_create_path($original_path); +// $thumb_full_path = file_create_path($filepath); +// +// // Allow access to temporary thumbnails, since they're not yet associated +// // with a node. If not temporary, check access on the original file. +// $status = db_result(db_query("SELECT status FROM {files} WHERE filepath = '%s'", $original_full_path)); +// $access = ($status == 0 || module_invoke_all('file_download', $original_path)); +// if ($access && $info = getimagesize($thumb_full_path)) { +// return array( +// 'Content-Type: ' . $info['mime'], +// 'Content-Length: ' . filesize($thumb_full_path) +// ); +// } +// } + + // Return headers for default images. +// if (strpos($filepath, 'uploadfield_default_images') !== FALSE) { + if (strpos($filepath, 'video_thumbs') !== FALSE) { + $full_path = file_create_path($filepath); + if ($info = getimagesize($full_path)) { + return array( + 'Content-Type: ' . $info['mime'], + 'Content-Length: ' . filesize($full_path) + ); + } + } +} + +/** + * Implementation of CCK's hook_widget_info(). + */ +function uploadfield_widget_info() { + $module_path = drupal_get_path('module', 'uploadfield'); + return array( + 'uploadfield_widget' => array( + 'label' => t('Video'), + 'field types' => array('filefield'), + 'multiple values' => CONTENT_HANDLE_CORE, + 'callbacks' => array('default value' => CONTENT_CALLBACK_CUSTOM), + 'description' => t('An edit widget for video files, including video thumbnails and transcoding to flash.'), + ), + ); +} + +/** + * Implementation of CCK's hook_widget_settings(). + */ +function uploadfield_widget_settings($op, $widget) { + switch ($op) { + case 'form': + return uploadfield_widget_settings_form($widget); + case 'validate': + return uploadfield_widget_settings_validate($widget); + case 'save': + return uploadfield_widget_settings_save($widget); + } +} + +/** + * Implementation of CCK's hook_widget(). + * + * Assign default properties to item and delegate to FileField. + */ +function uploadfield_widget(&$form, &$form_state, $field, $items, $delta = 0) { +// Add default values to items. +// TODO: use CCK's default value callback. + if (empty($items[$delta])) { + $items[$delta] = array('alt' => '', 'title' => ''); + } + + // Start with the FileField widget as a basic start. + // Note that FileField needs to modify $form by reference. + $element = filefield_widget($form, $form_state, $field, $items, $delta); + + // Add uploadfield specific validators. + // $element['#upload_validators'] = array_merge($element['#upload_validators'], uploadfield_widget_upload_validators($field)); + + return $element; +} + +/** + * Get the additional upload validators for an image field. + * + * @param $field + * The CCK field array. + * @return + * An array suitable for passing to file_save_upload() or the file field + * element's '#upload_validators' property. + */ +function uploadfield_widget_upload_validators($field) { + $validators = array(); + + // Ensure that only web images are supported. + $web_extensions = array( + 'mov', 'mp4', '3gp', '3g2', 'mpg', 'mpeg', // quicktime + 'divx', //divx + 'rm', // realplayer + 'flv', 'f4v', //flash player + 'swf', // swf player + 'dir', 'dcr', // dcr player + 'asf', 'wmv', 'avi', 'mpg', 'mpeg', // windows media + 'ogg' // ogg theora + ); + $extensions = array_filter(explode(' ', $field['widget']['file_extensions'])); + if (empty($extensions)) { + $extensions = $web_extensions; + } + $validators['filefield_validate_extensions'][0] = implode(' ', array_intersect($extensions, $web_extensions)); + + // Add the image validator as a basic safety check. + // $validators['filefield_validate_is_image'] = array(); + + // Add validators for resolutions. + // if (!empty($field['widget']['max_resolution']) || !empty($field['widget']['min_resolution'])) { + // $validators['filefield_validate_image_resolution'] = array( + // $field['widget']['max_resolution'], + // $field['widget']['min_resolution'], + // ); + // } + + return $validators; +} + +/** + * Implementation of CCK's hook_field_formatter_info(). + */ +function uploadfield_field_formatter_info() { + $module_path = drupal_get_path('module', 'uploadfield'); + $formatters = array( + 'video_plain' => array( + 'label' => t('video'), + 'field types' => array('filefield'), + 'description' => t('Displays video files with player embedded.'), + ), + 'video_nodelink' => array( + 'label' => t('video thumbnail linked to video'), + 'field types' => array('filefield'), + 'description' => t('Displays video thumb files then the video.'), + ), + // 'video_imagelink' => array( + // 'label' => t('Video Thumbnail linked to video file download'), + // 'field types' => array('filefield'), + // 'description' => t('Displays video files in their original size.'), + // ), + ); + +if(module_exists('imagecache')) { + foreach (imagecache_presets() as $preset) { + $formatters[$preset['presetname'] .'_videolinked'] = array( + 'label' => t('Preset @preset of video thumbnail linked to video', array('@preset' => $preset['presetname'])), + 'field types' => array('filefield'), + ); + } +} + return $formatters; +} + +/** + * Implementation of CCK's hook_default_value(). + */ +function uploadfield_default_value(&$form, &$form_state, $field, $delta) { + return filefield_default_value($form, $form_state, $field, $delta); +} + +/** + * Implementation of hook_form_[form_id]_alter(). + * + * Modify the add new field form to make "Image" the default formatter. + */ +function uploadfield_form_content_field_overview_form_alter(&$form, &$form_state) { + $form['#submit'][] = 'uploadfield_form_content_field_overview_submit'; +} + +/** + * Submit handler to set a new field's formatter to "video_plain". + */ +function uploadfield_form_content_field_overview_submit(&$form, &$form_state) { + if (isset($form_state['fields_added']['_add_new_field']) && isset($form['#type_name'])) { + $new_field = $form_state['fields_added']['_add_new_field']; + $node_type = $form['#type_name']; + $field = content_fields($new_field, $node_type); + if ($field['widget']['module'] == 'uploadfield') { + foreach ($field['display_settings'] as $display_type => $display_settings) { + if ($field['display_settings'][$display_type]['format'] == 'default') { + $field['display_settings'][$display_type]['format'] = 'video_plain'; + } + } + content_field_instance_update($field); + } + } +} + +/** + * @defgroup "Theme Callbacks" + * @{ + * @see uploadfield_theme(). + */ +function theme_uploadfield_image($file, $alt = '', $title = '', $attributes = NULL, $getsize = TRUE) { + $file = (array)$file; + // return $file['filepath']; + if (!is_file($file['filepath'])) { + return '<!-- File not found: '. $file['filepath'] .' -->'; + } + + if ($getsize) { + // Use cached width and height if available. + if (!empty($file['data']['width']) && !empty($file['data']['height'])) { + $attributes['width'] = $file['data']['width']; + $attributes['height'] = $file['data']['height']; + } + // Otherwise pull the width and height from the file. + elseif (list($width, $height, $type, $image_attributes) = @getimagesize($file['filepath'])) { + $attributes['width'] = $width; + $attributes['height'] = $height; + } + } + + if (!empty($title)) { + $attributes['title'] = $title; + } + + // Alt text should be added even if it is an empty string. + $attributes['alt'] = $alt; + + // Add a timestamp to the URL to ensure it is immediately updated after editing. + $query_string = ''; + if (isset($file['timestamp'])) { + $query_character = (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PRIVATE && variable_get('clean_url', '0') == '0') ? '&' : '?'; + $query_string = $query_character . $file['timestamp']; + } + + $url = file_create_url($file['filepath']) . $query_string; + $attributes['src'] = $url; + $attributes = drupal_attributes($attributes); + return '<span></span><img '. $attributes .' />'; +} + +function theme_uploadfield_item($item) { + return theme('uploadfield_image', $item, $item['alt'], $item['title']); +} + +function theme_uploadfield_widget_preview($item = NULL) { + return '<div class="uploadfield-preview">' . theme('uploadfield_admin_thumbnail', $item) . '</div>'; +} + +function theme_uploadfield_widget_item($element) { + return theme('filefield_widget_item', $element); +} + +function theme_uploadfield_admin_thumbnail($item = NULL) { + if (is_null($item) || empty($item['filepath'])) { + return '<!-- link to default admin thumb -->'; + } + $thumb_path = uploadfield_file_admin_thumb_path($item); + return '<img src="'. file_create_url($thumb_path) .'" title="' . check_plain($item['filename']) . '" />'; +} + +function theme_uploadfield_widget_video_thumb($item = NULL) { + return '<div class="uploadfield-video-thumb">' . theme('uploadfield_image', $item, '', '', '', FALSE) . '</div>'; +} +/** + * @} End defgroup "Theme Callbacks". + */ + +/** + * Implementing video module API + * hook_v_perm() + */ + +function uploadfield_v_perm() { + return array('use default thumbnail', 'bypass conversion video'); +} + +/** + * Implementation of hook_v_help + */ +function video_upload_v_help() { + + $help = array(); + $help['upload']['data'] = '<b>' . t('Upload support') . '</b>'; + $help['upload']['children'] = array(t('You can upload a video file from your computer to this website.')); + + return $help; +} + + +/** + * Implements the hook_v_auto_resolution + */ +function uploadfield_v_auto_resolution($vidfile) { +//TODO : add dynamic converter selector + module_load_include('inc', 'video', '/plugins/ffmpeg'); + if(module_hook('ffmpeg', 'auto_playtime')) { + return ffmpeg_auto_playtime($vidfile); + } + return false; +} + + +/** + * Implements the hook_v_auto_resolution + */ +function uploadfield_v_auto_playtime($vidfile) { +//TODO : add dynamic converter selector + module_load_include('inc', 'video', '/plugins/ffmpeg'); + if(module_hook('ffmpeg', 'auto_playtime')) { + return ffmpeg_auto_playtime($vidfile); + } + return false; +} + +/** + * Implementation of hook_v_video() + */ +function uploadfield_v_video($op, &$element) { + global $user; + switch ($op) { + case 'insert': + case 'update': + // TODO : need to add validation on just submit scenario + $field = content_fields($element['#field_name'], $element['#type_name']); + // auto thumbnailing + if($field['widget']['autothumbnail']) { + $update = NULL; + $vidfile = $element['#value']; + $vid = $vidfile['fid']; + $vid_path = $vidfile['data']['video_thumb']; + $vid_dir = explode('/', $vid_path); + $vid_name = $vid_dir[count($vid_dir) - 1]; + + $file = new stdClass(); + $file->uid = $user->uid; + $file->status = FILE_STATUS_PERMANENT; + $file->filename = $vid_name; + $file->filepath = $vid_path; + $file->filemime = file_get_mimetype($vid_name); + $file->filesize = filesize($vid_path); + $file->timestamp = time(); + + if($op == 'update') { + $old_fid = $element['#default_value']['data']['video_thumb_fid']; + $update = 'fid'; + $file->fid = $old_fid; + } + drupal_write_record ('files', $file, $update); + // get fid if and only if insert + if($op == 'insert') + $file->fid = db_last_insert_id('files', 'fid'); + // add file id to the data + $element['data']['video_thumb_fid'] = array ( + '#type'=> 'value', + '#value' => $file->fid + ); + } + + // auto covnersion + if($field['widget']['autoconversion']) { + video_auto_transcode_add_to_queue($element, $op); + } + break; + case 'delete': + //delete thumbnails + break; + case 'thumbs': + include_once dirname(__FILE__) . '/uploadfield_thumb.inc'; + //create thumbs and display + video_auto_thumb_process($element); + break; + case 'convert': + include_once dirname(__FILE__) . '/uploadfield_convert.inc'; + //create FLV file +// video_auto_transcode_process($element); + break; + } +}
\ No newline at end of file diff --git a/types/uploadfield/uploadfield_convert.inc b/types/uploadfield/uploadfield_convert.inc new file mode 100644 index 0000000..fbd13ac --- /dev/null +++ b/types/uploadfield/uploadfield_convert.inc @@ -0,0 +1,102 @@ +<?php +//$Id$ + +/** + * @file + * Enable conversion control on video module. + * + * @author Heshan Wanigasooriya <heshan at heidisoft dot com, heshanmw at gmail dot com> + */ + + +/** + * Define some constants + */ +define('VIDEO_RENDERING_PENDING', 1); +define('VIDEO_RENDERING_ACTIVE', 5); +define('VIDEO_RENDERING_COMPLETE', 10); +define('VIDEO_RENDERING_FAILED', 20); + +function video_auto_transcode_process(&$element) { +// $file = $element['#value']; +// $element['data']['old_vid'] = array( +// '#type' => 'value', +// '#value' => $file['fid'] +// ); +// $element['data']['vid_transcode_status'] = array( +// '#type' => 'value', +// '#value' => VIDEO_RENDERING_PENDING +// ); +} + +/** + * Add a video conversion rendering process to the queue + */ +function video_auto_transcode_add_to_queue(&$element, $op) { + $file = $element['#value']; + + //load cck instace settings +// $field = content_fields($element['#field_name'], $element['#type_name']); +// $resolution = array_filter(explode(':', $field['widget']['default_resolution'])); +// $element['#item']['data']['height'] = $element['#item']['data']['width'] * ($resolution[1]/$resolution[0]); + +// $serialized_data = array('resolution' =>$field['widget']['default_resolution'], 'width' => $element['#item']['data']['width']); + + $fid = $file['fid']; + + switch($op) { + case 'insert': + db_query('INSERT INTO {video_rendering} (fid, pid, status, started, completed) + VALUES (%d, %d, %d, %d, %d)', + $fid, 0, VIDEO_RENDERING_PENDING, 0, 0); + drupal_set_message(t('Video submission queued for processing. Please wait: our servers are preparing your video for web displaying.')); + break; + + case 'update': + $old_fid = $element['#default_value']['fid']; + $serialized_data ['old_file'] = $old_fid; + if($old_fid != $fid) { + db_query('DELETE FROM {video_rendering} WHERE fid = %d', $old_fid); + db_query('INSERT INTO {video_rendering} (fid, pid, status, started, completed, serialized_data) + VALUES (%d, %d, %d, %d, %d, \'%s\')', + $fid, 0, VIDEO_RENDERING_PENDING, 0, 0, serialize($serialized_data)); + drupal_set_message(t('Video submission queued for processing. Please wait: our servers are preparing your video for web displaying.')); + } + break; + } +} + +function _video_get_content_types() { + $widget_info = uploadfield_widget_info(); + $content_types = array(); + foreach ($widget_info as $key => $value) { + $query = "SELECT type_name FROM {content_node_field_instance} WHERE widget_type='%s'"; + $result = db_query($query, $key); + while ($row = db_fetch_object($result)) { + $content_types[] = $row->type_name; + } + } + return $content_types; +} + +function _video_get_field_by_content_type($content_type) { + $type = content_types($content_type); + + $fields = $type['fields']; + $field_name = ''; + foreach ($fields as $field) { + if ($field['type'] == 'filefield') { + $db_info = content_database_info($field); + $db_info = array_merge($db_info, $field); + return $db_info; + } + } +} + +function _video_get_nid_by_video_token($content_type, $fid) { + $field_info = _video_get_field_by_content_type($content_type); + $query = "SELECT nid FROM {%s} WHERE %s = '%s'"; + $result = db_query($query, $field_info['table'], $field_info['field_name'] .'_fid', $fid); + $nid = db_fetch_object($result); + return $nid; +}
\ No newline at end of file diff --git a/types/uploadfield/uploadfield_file.inc b/types/uploadfield/uploadfield_file.inc new file mode 100644 index 0000000..cff6c7f --- /dev/null +++ b/types/uploadfield/uploadfield_file.inc @@ -0,0 +1,123 @@ +<?php +// $Id$ + +/** + * @file + * hook_file and uploadfield file functions. + */ + +/** + * Implementation of hook_file_insert(). + */ +function uploadfield_file_insert($file) { +// Currently empty. Thumbnails are now generated on preview. +} + +/** + * Implementation of hook_file_delete(). + * + * Delete the admin thumbnail when the original is deleted. + */ +function uploadfield_file_delete($file) { +// delete thumb from files +// file_set_status($file->data['video_thumb_fid'], FILE_STATUS_TEMPORARY); + db_query('DELETE FROM {files} WHERE fid = %d', $file->data['video_thumb_fid']); + + // delete thums directory + $thumbs_path = variable_get('video_thumb_path', 'video_thumbs'); + //files will save in files/video_thumbs/#fileId folder + $tmp = file_directory_path(). '/' . $thumbs_path . '/' . $file->fid . '/'; + // rmdir($tmp); + _file_delete_tree($tmp); +// if(@rmdir($tmp)) { +// } +} + + +// delete dir and its content +function _file_delete_tree($current_dir) { + if($dir = @opendir($current_dir)) { + while (($f = readdir($dir)) !== false) { + if($f > '0' and filetype($current_dir.$f) == "file") { + file_delete($current_dir.$f); + } elseif($f > '0' and filetype($current_dir.$f) == "dir") { + _file_delete_tree($current_dir.$f."\\"); + } + } + closedir($dir); + rmdir($current_dir); + } +} + +/** + * Simple utility function to check if a file is an image. + */ +function uploadfield_file_is_image($file) { + return TRUE; + //TODO : add file validations + $file = (object)$file; + return in_array($file->filemime, array('image/jpg', 'image/pjpeg', 'image/jpeg', 'image/png', 'image/gif')); +} + +/** + * Given a file, return the path the image thumbnail used while editing. + */ +function uploadfield_file_admin_thumb_path($file, $create_thumb = TRUE) { + $file = (object)$file; + $short_path = preg_replace('/^' . preg_quote(file_directory_path(), '/') . '/', '', $file->filepath); + $filepath = file_directory_path() . '/video_thumb' . $short_path; + + if ($create_thumb) { + uploadfield_create_admin_thumb($file->filepath, $filepath); + } + + return $filepath; +} + +/** + * Create a thumbnail to be shown while editing an image. + */ +function uploadfield_create_admin_thumb($source, $destination) { + if (!is_file($source)) { + return FALSE; + } + + $info = image_get_info($source); + $size = explode('x', variable_get('uploadfield_thumb_size', '100x100')); + + // Check if the destination image needs to be regenerated to match a new size. + if (is_file($destination)) { + $thumb_info = image_get_info($destination); + if ($thumb_info['width'] != $size[0] && $thumb_info['height'] != $size[1] && ($info['width'] > $size[0] || $info['height'] > $size[1])) { + unlink($destination); + } + else { + return; + } + } + + // Ensure the destination directory exists and is writable. + $directories = explode('/', $destination); + array_pop($directories); // Remove the file itself. + // Get the file system directory. + $file_system = file_directory_path(); + foreach ($directories as $directory) { + $full_path = isset($full_path) ? $full_path . '/' . $directory : $directory; + // Don't check directories outside the file system path. + if (strpos($full_path, $file_system) === 0) { + field_file_check_directory($full_path, FILE_CREATE_DIRECTORY); + } + } + + // Create the thumbnail. + if ($info['width'] <= $size[0] && $info['height'] <= $size[1]) { + file_copy($source, $destination); + } + elseif (image_get_toolkit() && @image_scale($source, $destination, $size[0], $size[1])) { + // Set permissions. This is done for us when using file_copy(). + @chmod($destination, 0664); + } + else { + drupal_set_message(t('An image thumbnail was not able to be created.'), 'error'); + } +} diff --git a/types/uploadfield/uploadfield_formatter.inc b/types/uploadfield/uploadfield_formatter.inc new file mode 100644 index 0000000..c4c62ac --- /dev/null +++ b/types/uploadfield/uploadfield_formatter.inc @@ -0,0 +1,173 @@ +<?php +// $Id$ + +/** + * @file + * uploadfield formatter hooks and callbacks. + */ + +//include common player file + +/** + * Define some constants + */ +defined('VIDEO_RENDERING_PENDING') + or define('VIDEO_RENDERING_PENDING', 1); +defined('VIDEO_RENDERING_ACTIVE') + or define('VIDEO_RENDERING_ACTIVE', 5); +defined('VIDEO_RENDERING_COMPLETE') + or define('VIDEO_RENDERING_COMPLETE', 10); +defined('VIDEO_RENDERING_FAILED') + or define('VIDEO_RENDERING_FAILED', 20); +/** + * + * @param <type> $element + * @return <type> + */ +function theme_uploadfield_formatter_video_plain($element) { +// print_r($field = content_fields($element['#field_name'], $element['#type_name']);); +// Inside a view $element may contain null data. In that case, just return. + module_load_include('inc', 'video', '/includes/common'); + + if (empty($element['#item']['fid'])) { + return ''; + } +//print_r($element['#item']['fid']); + $result = db_query('SELECT vr.status FROM {video_rendering} vr INNER JOIN {files} + f ON vr.fid = f.fid WHERE vr.fid = f.fid AND f.status = %d AND f.fid = %d', + FILE_STATUS_PERMANENT, $element['#item']['fid']); + $status = db_fetch_object($result); +// print_r($status); + if($status->status == VIDEO_RENDERING_ACTIVE || $status->status == VIDEO_RENDERING_PENDING) { + return theme('video_inprogress'); + } + else if ($status->status == VIDEO_RENDERING_FAILED) { + return theme('video_encoding_failed'); + } + else { + return _video_common_get_player($element); + } +// $field = content_fields($element['#field_name']); +// $item = $element['#item']; +// +// $item['data']['alt'] = isset($item['data']['alt']) ? $item['data']['alt'] : ''; +// $item['data']['title'] = isset($item['data']['title']) ? $item['data']['title'] : NULL; +// +// $class = 'uploadfield uploadfield-'. $field['field_name']; +// return theme('uploadfield_image', $item, $item['data']['alt'], $item['data']['title'], array('class' => $class)); +} + + +/** + * + * @param <type> $element + * @return <type> + */ + +function theme_uploadfield_formatter_video_nodelink($element) { + $field = content_fields($element['#field_name'], $element['#type_name']); + // Inside a view $element may contain null data. In that case, just return. + if (empty($element['#item']['fid'])) { + return ''; + } + // print_r($field); + // exit; + $node = $element['#node']; + // $imagetag = theme('uploadfield_formatter_video_plain', $element); + $use_default_img = $element['#item']['data']['use_default_video_thumb']; + if($use_default_img) { + $imagetag = theme('uploadfield_widget_video_thumb', $field['widget']['default_video_thumb']); + } + else if($element['#item']['data']['video_thumb']) { + // print_r($field['widget']['default_video_thumb']); + $thumb = array('filepath' => $element['#item']['data']['video_thumb']); + $imagetag = theme('uploadfield_widget_video_thumb', $thumb); + } + $class = 'popups uploadfield uploadfield-nodelink uploadfield-'. $element['#field_name']; + return l($imagetag, 'node/'. $node->nid, array('attributes' => array('class' => $class), 'html' => TRUE)); + +} + +/** + * use image cache profiles for video thumb display + * @param object $element + * @return HTML image file + */ + +function theme_uploadfield_formatter_videolinked($element) { + // Inside a view $element may contain NULL data. In that case, just return. + if (empty($element['#item']['fid'])) { + return ''; + } + + // Extract the preset name from the formatter name. + $presetname = substr($element['#formatter'], 0, strrpos($element['#formatter'], '_')); + $style = 'linked'; + + $item = $element['#item']; + $item['data']['alt'] = isset($item['data']['alt']) ? $item['data']['alt'] : ''; + $item['data']['title'] = isset($item['data']['title']) ? $item['data']['title'] : NULL; + + $node = $element['#node']; + // $imagetag = theme('uploadfield_formatter_video_plain', $element); + $use_default_img = $element['#item']['data']['use_default_video_thumb']; + if($use_default_img) { + $thumb_path = $field['widget']['default_video_thumb']; +// $imagetag = theme('uploadfield_widget_video_thumb', $field['widget']['default_video_thumb']); + } + else if($element['#item']['data']['video_thumb']) { + // print_r($field['widget']['default_video_thumb']); +// $thumb = array('filepath' => $element['#item']['data']['video_thumb']); + $thumb_path = $element['#item']['data']['video_thumb']; +// $imagetag = theme('uploadfield_widget_video_thumb', $thumb); + } +// die($presetname); + $imagetag = theme('imagecache', $presetname, $thumb_path, $node->title, $node->title); + $path = empty($item['nid']) ? '' : 'node/'. $item['nid']; + $class = "imagecache imagecache-$presetname imagecache-$style imagecache-{$element['#formatter']}"; + return l($imagetag, $path, array('attributes' => array('class' => $class), 'html' => TRUE)); +} + +/** + * + * @param <type> $element + * @return <type> + */ +function theme_uploadfield_formatter_video_imagelink($element) { + $field = content_fields($element['#field_name'], $element['#type_name']); + // Inside a view $element may contain null data. In that case, just return. + if (empty($element['#item']['fid'])) { + return ''; + } + + $node = $element['#node']; + // $imagetag = theme('uploadfield_formatter_video_plain', $element); + $imagetag = theme('uploadfield_widget_video_thumb', $field['widget']['default_video_thumb']); + $class = 'popups uploadfield uploadfield-nodelink uploadfield-'. $element['#field_name']; + return l($imagetag, 'node/'. $node->nid, array('attributes' => array('class' => $class), 'html' => TRUE)); +} + +/** + * Displays a "encoding in progress message" + */ +function theme_video_inprogress() { + return '<div class="video-ffmpeg-helper-inprogress">'. t('This video is currently being processed. Please wait.') . '</div>'; +} + + +/** + * Display an "encoding failed" message" + */ +function theme_video_encoding_failed() { + return '<div class="video-ffmpeg-helper-encoding-failed">'. t('The video conversion process has failed. You might want to submit a simpler video format like <em>mpeg</em> or <em>divx avi</em>.<br />If the problem persists please contact website administrators.') . '</div>'; +} + + +/** + * Implementation of hook_theme(). + */ +function video_ffmpeg_helper_theme() { + return array( + + ); +}
\ No newline at end of file diff --git a/types/uploadfield/uploadfield_thumb.inc b/types/uploadfield/uploadfield_thumb.inc new file mode 100644 index 0000000..74aeb80 --- /dev/null +++ b/types/uploadfield/uploadfield_thumb.inc @@ -0,0 +1,47 @@ +<?php +//$Id$ + +/** + * @file + * Enable image support for video module. + * + * @author Heshan Wanigasooriya <heshan at heidisoft dot com, heshanmw at gmail dot com> + */ + +function video_auto_thumb_process (&$element) { +//developed for ffmpeg support + $file = $element['#value']; +// $field = content_fields($element['#field_name'], $element['#type_name']); + if (isset($element['preview']) && $file['fid'] != 0) { + // TODO : change this to use any transcode to generate thumbnails + $transcoder = variable_get('vid_convertor', 'ffmpeg'); + module_load_include('inc', 'video', '/plugins/' . $transcoder); + $function = variable_get('vid_convertor', 'ffmpeg') . '_auto_thumbnail'; + if (function_exists($function)) { + // $thumbs = ffmpeg_auto_thumbnail($file); + $thumbs = $function($file); + } + else { + drupal_set_message(t('Transcoder not configured properly'), 'error'); + } + $default_thumb = ''; + $rnd_img = rand(1, variable_get('no_of_video_thumbs', 5)); + $default_thumb = $thumbs[$rnd_img]->filepath; + + if(is_array($thumbs)) { + foreach($thumbs as $fid => $img) { + $thumbss[$img->filepath] = theme('uploadfield_image', $img, '', '', array('width' => '50'), FALSE); + } + } + } + + $element['data']['video_thumb'] = array( + '#type' => 'radios', + '#title' => t('Video Thumbnails'), + '#options' => $thumbss, + '#default_value' => !empty($file['data']['video_thumb']) ? $file['data']['video_thumb'] : $default_thumb, + // '#description' => t('Pleaes choose a thumbnail from above'), + '#weight' => 10, + '#attributes' => array('class' => 'video-thumbnails'), + ); + }
\ No newline at end of file diff --git a/types/uploadfield/uploadfield_transcode.inc b/types/uploadfield/uploadfield_transcode.inc new file mode 100644 index 0000000..39db634 --- /dev/null +++ b/types/uploadfield/uploadfield_transcode.inc @@ -0,0 +1,13 @@ +<?php +//$Id$ + +/** + * @file + * Enable conversion control on video module. + * + * @author Heshan Wanigasooriya <heshan at heidisoft dot com, heshanmw at gmail dot com> + */ + +function video_auto_transcode_process (&$element) { + + }
\ No newline at end of file diff --git a/types/uploadfield/uploadfield_widget.inc b/types/uploadfield/uploadfield_widget.inc new file mode 100644 index 0000000..41d89d6 --- /dev/null +++ b/types/uploadfield/uploadfield_widget.inc @@ -0,0 +1,308 @@ +<?php +// $Id$ + +/** + * @file + * uploadfield widget hooks and callbacks. + */ + +/** + * Implementation of CCK's hook_widget_settings($op = 'form'). + */ +function uploadfield_widget_settings_form($widget) { + $form = module_invoke('filefield', 'widget_settings', 'form', $widget); + + if ($form['file_extensions']['#default_value'] == 'txt') { + $form['file_extensions']['#default_value'] = 'mp4 mpeg avi mpg wmv flv'; + } + + // Default video player settings. + $form['player'] = array( + '#type' => 'fieldset', + '#title' => t('Video Player Settings'), + '#collapsible' => TRUE, + '#collapsed' => TRUE, + '#weight' => 9 + ); + + $form['player']['default_resolution'] = array( + '#type' => 'textfield', + '#title' => t('Default Video Resolution'), + '#default_value' => !empty($widget['default_resolution']) ? $widget['default_resolution'] : '16:9', + '#size' => 15, + '#maxlength' => 5, + '#description' => t('Default player resolution WIDTH:HEIGHT in px. eg : 16:9 for widescreen or 4:3 for general screen'), + ); + + $form['player']['default_width'] = array( + '#type' => 'textfield', + '#title' => t('Default Video Player Width'), + '#default_value' => !empty($widget['default_width']) ? $widget['default_width'] : 640, + '#size' => 15, + '#maxlength' => 5, + '#description' => t('Default player WIDTH:HEIGHT in px. eg : 640 for 640X480 player size if resolution it 4:3'), + ); + + + // Default image settings. + $form['default'] = array( + '#type' => 'fieldset', + '#title' => t('Video Thumbnail Settings'), + '#element_validate' => array('_uploadfield_widget_settings_default_validate'), + '#collapsible' => TRUE, + '#collapsed' => FALSE, + '#weight' => 10 + ); + + // Present a video image of the current default image. + if (!empty($widget['default_video_thumb'])) { + $form['default']['default_video_thumbnail'] = array( + '#type' => 'markup', + '#value' => theme('uploadfield_image', $widget['default_video_thumb'], '', '', array('width' => '150'), FALSE), + '#prefix' => '<div class="video_thumbnail">', + '#suffix' => '</div>' + ); + } + + $form['default']['default_video_thumb_upload'] = array( + '#type' => 'file', + '#title' => empty($widget['default_video_thumb']) ? t('Upload video thumbnail') : t('Replace video thumbnail with'), + '#description' => t('Choose a image that will be used as default video thumbnail.'), + ); + + // We set this value on 'validate' so we can get CCK to add it + // as a standard field setting. + $form['default_video_thumb'] = array( + '#type' => 'value', + '#value' => $widget['default_video_thumb'], + ); + + // Default image settings. + $form['plugings'] = array( + '#type' => 'fieldset', + '#title' => t('Video Advanced Settings'), + '#collapsible' => TRUE, + '#collapsed' => FALSE, + '#weight' => 10 + ); + $form['plugings']['autoconversion'] = array( + '#type' => 'checkbox', + '#title' => t('Enable auto conversion video'), + '#description' => t('Use ffmpeg(Default) to automatically convert videos to web compatible types eg. FLV, Please make sure to configure convertor settings.'), + '#default_value' => $widget['autoconversion'], + ); + $form['plugings']['autothumbnail'] = array( + '#type' => 'checkbox', + '#title' => t('Enable auto thumbnail video'), + '#description' => t('Use ffmpeg(Default) to automatically thumbnails, Please make sure to configure convertor settings.'), + '#default_value' => $widget['autothumbnail'], + ); + + + return $form; +} + +/** + * Element specific validation for uploadfield default value. + * + * Validated in a separate function from uploadfield_field() to get access + * to the $form_state variable. + */ +function _uploadfield_widget_settings_default_validate($element, &$form_state) { +// Verify the destination exists + $destination = file_directory_path() .'/video_thumb'; + if (!field_file_check_directory($destination, FILE_CREATE_DIRECTORY)) { + form_set_error('default_video_thumb', t('The default image could not be uploaded. The destination %destination does not exist or is not writable by the server.', array('%destination' => dirname($destination)))); + return; + } + + $validators = array ( + 'file_validate_is_image' => array(), + ); + + // We save the upload here because we can't know the correct path until the file is saved. + if (!$file = file_save_upload('default_video_thumb_upload', $validators, $destination)) { + // No upload to save we hope... or file_save_upload() reported an error on its own. + return; + } + + // Remove old image (if any) & clean up database. + $old_default = $form_state['values']['default_video_thumb']; + if (!empty($old_default['fid'])) { + if (file_delete(file_create_path($old_default['filepath']))) { + db_query('DELETE FROM {files} WHERE fid=%d', $old_default['fid']); + } + } + + // Make the file permanent and store it in the form. + file_set_status($file, FILE_STATUS_PERMANENT); + $file->timestamp = time(); + $form_state['values']['default_video_thumb'] = (array)$file; +} + +/** + * Implementation of CCK's hook_widget_settings($op = 'validate'). + */ +function uploadfield_widget_settings_validate($widget) { +// Check that only web images are specified in the callback. + $extensions = array_filter(explode(' ', $widget['file_extensions'])); + $web_extensions = array( + 'mov', 'mp4', '3gp', '3g2', 'mpg', 'mpeg', // quicktime + 'divx', //divx + 'rm', // realplayer + 'flv', 'f4v', //flash player + 'swf', // swf player + 'dir', 'dcr', // dcr player + 'asf', 'wmv', 'avi', 'mpg', 'mpeg', // windows media + 'ogg' // ogg theora + ); + if (count(array_diff($extensions, $web_extensions))) { + form_set_error('file_extensions', t('Only web-standard videos are supported through the video widget. If needing to upload other types of files, change the widget to use a standard file upload.')); + } + + // Check that set video resolutions are valid. + foreach (array('default_width') as $numerics) { + if (!empty($widget[$numerics]) && !preg_match('/^[0-9]+$/', $widget[$numerics])) { + form_set_error($numerics, t('Please specify default width in integers only (e.g. 640).')); + } + } + + // Check that set resolutions are valid. + foreach (array('default_resolution') as $resolution) { + if (!empty($widget[$resolution]) && !preg_match('/^[0-9]+:[0-9]+$/', $widget[$resolution])) { + form_set_error($resolution, t('Please specify a resolution in the format WIDTH:HEIGHT (e.g. 16:9).')); + } + } +// Check for convertor is installed +} + +/** + * Implementation of CCK's hook_widget_settings($op = 'save'). + */ +function uploadfield_widget_settings_save($widget) { + $filefield_settings = module_invoke('filefield', 'widget_settings', 'save', $widget); + return array_merge($filefield_settings, array('default_video_thumb', 'default_width', 'default_resolution', 'autoconversion', 'autothumbnail')); +} + +/** + * Element #value_callback function. + */ +function uploadfield_widget_value($element, $edit = FALSE) { + $item = filefield_widget_value($element, $edit); + // print_r($edit); + // exit; + // if ($edit) { + // $item['alt'] = isset($edit['alt']) ? $edit['alt'] : ''; + // $item['title'] = isset($edit['title']) ? $edit['title'] : ''; + // $item['video_thumb_fid'] = isset($edit['default_video_thumb']['fid']) ? $edit['default_video_thumb']['fid'] : 'novalue'; + // } + // else { + // $item['alt'] = ''; + // $item['title'] = ''; + // $item['default_video_thumb'] = ''; + // } + return $item; +} + +/** + * Element #process callback function. + */ +function uploadfield_widget_process($element, $edit, &$form_state, $form) { +// TODO : get play duration/ image thumbnails + $file = $element['#value']; + $field = content_fields($element['#field_name'], $element['#type_name']); + $element['#theme'] = 'uploadfield_widget_item'; + + if (isset($element['preview']) && $file['fid'] != 0) { + //TODO : implement preview video play + $tml_thumb = !empty($file['data']['video_thumb']) ? array('filepath' => $file['data']['video_thumb']) : $field['widget']['default_video_thumb']; + $element['preview']['#suffix'] = '<div class="video_thumbnail">' . + theme('uploadfield_image', $tml_thumb, '', '', array('width' => '150'), FALSE) . + '</div>'; + } + + // Check if using the default width and replace tokens. + $default_width = user_access('override player width'); + $element['data']['width'] = array( + '#type' => $default_width ? 'textfield' : 'value', + '#title' => t('Width for Player'), + '#default_value' => empty($file['data']['width']) ? $field['widget']['default_width'] : $file['data']['width'], + '#description' => t('Set player width(in pix) here, make sure your video have good resolution to fit on larger values.'), + '#size' => 15, + '#maxlength' => 5, + '#attributes' => array('class' => 'video-width-text'), + ); + if(!$default_width){ + $element['data']['width']['#value'] = empty($file['data']['width']) ? $field['widget']['default_width'] : $file['data']['width']; + } + + // only in preview mode and then create thumbnails + if($field['widget']['autoconversion']) { + video_module_invoke('convert', $element); + //bypass auto conversion + if (user_access('bypass conversion video')) { + $element['data']['bypass_autoconversion'] = array( + '#type' => 'checkbox', + '#title' => t('Bypass auto conversion'), + '#default_value' => !empty($file['data']['bypass_autoconversion']) ? $file['data']['bypass_autoconversion'] : FALSE, + '#description' => t('This will bypass your auto conversion of videos.'), + '#attributes' => array('class' => 'video-bypass-auto-conversion'), + ); + } + } + + //Create video thubs and save in a directory then we can get thumbnails from it using folder read + + // only in preview mode and then create thumbnails + if($field['widget']['autothumbnail']) { + video_module_invoke('thumbs', $element); + } + // default image default_image + if (user_access('use default thumbnail') && !empty($field['widget']['default_video_thumb'])) { + $element['data']['use_default_video_thumb'] = array( + '#type' => 'checkbox', + '#title' => t('Override Video Thumbnail with Default'), + '#default_value' => !empty($file['data']['use_default_video_thumb']) ? $file['data']['use_default_video_thumb'] : FALSE, + '#description' => t('If you want to use default image instead of using actual thumbnail of video then check.'), + '#weight' => 9, + '#attributes' => array('class' => 'video-default-thumbnail'), + ); + } + + + // creating Update/Insert/Delete API + // TODO : use if any better solution than this with filefield + // hook_v_video() + if($form_state['submitted'] == 1) { + switch($form_state['values']['op']) { + case t('Save'): + // print_r($form); + // exit; + // update + if(!empty($form_state['values']['nid'])) { + video_module_invoke('update', $element); + } + // insert + else { + video_module_invoke('insert', $element); + } + break; + case t('Preview'): + // module_invoke_all('v_preview'); + break; + case t('Delete'): + video_module_invoke('delete', $element); + break; + } + } + + return $element; +} + +/** + * FormAPI theme function. Theme the output of an video upload field. + */ +function theme_uploadfield_widget($element) { + drupal_add_css(drupal_get_path('module', 'uploadfield') .'/uploadfield.css'); + return theme('form_element', $element, $element['#children']); +} diff --git a/types/video_google/video_google.info b/types/video_google/video_google.info deleted file mode 100644 index 107996d..0000000 --- a/types/video_google/video_google.info +++ /dev/null @@ -1,7 +0,0 @@ -;$Id$ -name = Google Video -description = Enable Google video support for Video module. -dependencies[] = video -package = "Video" -core = 6.x - diff --git a/types/video_google/video_google.module b/types/video_google/video_google.module deleted file mode 100644 index 280275e..0000000 --- a/types/video_google/video_google.module +++ /dev/null @@ -1,245 +0,0 @@ -<?php -//$Id$ -/** - * @file - * Enable Google Video support for video module. - * - * @author Fabio Varesano <fvaresano at yahoo dot it> - * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw at gmail dot com> - * @todo - */ - - -/** - * Implementation of hook_menu -*/ -function video_google_menu() { - $items = array(); - $items['node/add/video/google'] = array( - 'title' => 'Google', - 'access arguments' => array('create video') - ); - return $items; -} - - -/** - * Implementation of hook_v_help -*/ -function video_google_v_help() { - - $help = array(); - $help['google']['data'] = '<b><a href="http://video.google.com" name="video_google">' . t('Google Video support') . '</a></b>'; - $help['google']['children'] = array(t('You can host videos on video.google.com and put them on your site. - To do this, after you upload the video on Google video you just have to get the URL of the video.')); - - return $help; -} - - -/** - * Implementation of hook_v_info() -*/ -function video_google_v_info() { - $info['google'] = array( - '#name' => 'Google Video', - '#description' => t('Post a video available on !link to this website.', array('!link' => l(t('Google Video'), 'http://video.google.com'), NULL, NULL, NULL, TRUE)), - '#autothumbable' => true, - '#autoresolution' => true, - '#autoplaytime' => false, // seems that thereisn't a video lenght field in the google video xml - ); - - return $info; -} - - -/** - * Implementation of hook_v_form() -*/ -function video_google_v_form(&$node, &$form) { - - $form['video']['vidfile'] = array( - '#type' => 'textfield', - '#title' => t('Google Video URL'), - '#default_value' => $node->vidfile, - '#maxlength' => 700, - '#required' => TRUE, - '#weight' => -20, - '#description' => t('Insert the URL to the google video. ') . l(t('More information.'), 'video/help', array('fragment' => 'videofile'))); - - return $form; -} - - - -/** - * implementation of hook_v_validate -*/ -function video_google_v_validate($node) { - // TODO: use youtube REST or XML-RPC to query youtube: check video available and embeddable - if(!preg_match("/^http:\/\/video\.google\.com\/videoplay\?docid=/", $node->vidfile)) { - form_set_error('vidfile', t('The Google Video URL field must be similar to <em>http://video.google.com/videoplay?docid=1806507480014945777</em>')); - } - else { - //get the video id - $id = _video_google_get_id($node->vidfile); - - $response = _video_apiclient_google_request($id); - if(count($response) == 0) { // google video wasn't able to find the video - form_set_error('vidfile', t('The system was not able to find this video on Google Video. Please check the URL of your Google video.')); - } - } -} - - -/** - * Implementation of hook_v_play -*/ -function video_google_v_play($node) { - return theme('video_google_play', $node); -} - - - -/** AUTOTHUMBNAILING LOGIC */ - -define('VIDEO_GOOGLE_XML', 'http://video.google.com/videofeed'); - -function _video_apiclient_google_request($id, $cacheable = TRUE) { - $args = array('docid' => $id); - return _video_apiclient_request_xml('google', VIDEO_GOOGLE_XML, $args, $cacheable); -} - -function _video_apiclient_google_get_thumbnail_url($id) { - - $xml = _video_apiclient_google_request($id); - - // we *should* be able to use media:thumbnail - // but unfortunately, that is stripped out from the request hook - // so instead, we'll parse it from the description, where it's repeated. - // TODO: look into how to fix this... - $desc = $xml['ITEM']['DESCRIPTION'][0]; - $regex = '@<img src="([^"]*)"@'; - if (preg_match($regex, $desc, $matches)) { - return $matches[1]; - } - return null; -} - - -/** - * Implementation of hook_v_auto_thumbnail -*/ -function video_google_v_auto_thumbnail($node) { - if (count($_POST)) { - if ($_POST['vidfile'] == $node->vidfile) { - _video_image_thumbnail_debug(t('No new video to thumbnail')); - return NULL; - } - if ($_POST['tempimage']['fids']['_original']) { - _video_image_thumbnail_debug(t('Video already thumbnailed')); - return NULL; - } - } - // let's include apiclient logic - - //get the video id - if (!$node->vidfile && count($_POST)) { - $vidfile = $_POST['vidfile']; - } else { - $vidfile = $node->vidfile; - } - $id = _video_google_get_id($vidfile); - // get thumbnail url - $thumbnail_url = _video_apiclient_google_get_thumbnail_url($id); - - return _video_image_get_thumb_file_object($thumbnail_url, $id); -} - - -/** - * Implementation of hook_v_auto_resolution -*/ -function video_google_v_auto_resolution(&$node) { - // we set google videos to 400x326 by default - return array(400, 326); -} - - - -/** THEMEABLE FUNCTIONS */ - -/** - * Play videos hosted on video.google.com - * Allows users to host videos on video.google.com and then use the video ID to post it in the module. - * - * @param $node - * object with node information - * - * @return - * string of content to display - */ -function theme_video_google_play($node) { - $width = ($node->video_scaled_x ? $node->video_scaled_x : '425'); - $height = ($node->video_scaled_y ? $node->video_scaled_y : '350'); - // Strip heading "google:" - $videoid = _video_google_get_id(check_plain($node->vidfile)); - //$videoid = substr($node->vidfile, 7); - - // this will be executed by not Internet Explorer browsers - $output = '<!--[if !IE]> <--> -<object type="application/x-shockwave-flash" width="'. $width .'" height="'. $height .'" -data="http://video.google.com/googleplayer.swf?docId='. check_plain($videoid) .'"> -<!--> <![endif]-->' . "\n"; - - // this will be executed by Internet Explorer - $output .= '<!--[if IE]> -<object type="application/x-shockwave-flash" width="'. $width .'" height="'. $height .'" -classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" -codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"> -<![endif]-->' . "\n"; - - // params will be passed to both IE or not IE browsers - $output .= '<param name="movie" value="http://video.google.com/googleplayer.swf?docId=' . check_plain($videoid) . '" />' . "\n"; - // following a list of params simply copied from old embed tag params. I don't know if this are really needed. - $output .= '<param name="quality" value="best" /> - <param name="bgcolor" value="#ffffff" /> - <param name="allowScriptAccess" value="sameDomain" /> - <param name="scale" value="noScale" /> - <param name="wmode" value="transparent" /> - <param name="salign" value="TL" /> - <param name="FlashVars" value="playerMode=embedded" />' - . _video_get_parameters($node) . - '<p>'. t('Your browser is not able to display this multimedia content.') .'</p> -</object>'; - - - $output = theme('video_format_play', $output, t('http://video.google.com/support'), t('Link to video.google.com'), t('video.google.com')); - return $output; -} - - - -/** HELPER FUNCTIONS */ - -/** - * Get the docid from an URL -*/ -function _video_google_get_id($url) { - $pattern = '/-?[0-9]+/'; // maybe too weak? some id have a leading - - preg_match_all($pattern, $url, $matches, PREG_PATTERN_ORDER); - return $matches[0][0]; -} - -/** - * Implementation of hook_theme(). - */ -function video_google_theme() { - return array( - 'video_google_play' => array( - 'arguments' => array('node' => NULL), - ), - ); -} - -module_load_include('inc', 'video', 'includes/apiclient'); diff --git a/types/video_upload/busy.gif b/types/video_upload/busy.gif Binary files differdeleted file mode 100644 index d45e5c2..0000000 --- a/types/video_upload/busy.gif +++ /dev/null diff --git a/types/video_upload/video_upload.info b/types/video_upload/video_upload.info deleted file mode 100644 index a9b867f..0000000 --- a/types/video_upload/video_upload.info +++ /dev/null @@ -1,7 +0,0 @@ -; $Id$ -name = Upload Video -description = Enable Uploaded video support for Video module. -dependencies[] = video -dependencies[] = token -package = "Video" -core = 6.x
\ No newline at end of file diff --git a/types/video_upload/video_upload.install b/types/video_upload/video_upload.install deleted file mode 100644 index 8ccb409..0000000 --- a/types/video_upload/video_upload.install +++ /dev/null @@ -1,65 +0,0 @@ -<?php -//$Id$ -/** - * @file - * Provide installation functions for video_upload.module . - * - * @author Heshan Wanigasooriya <heshan at heidisoft dot com> - * <heshanmw at gmail dot com> - * @todo - */ - -/** - * Implementation of hook_schema(). - */ -function video_upload_schema() { - $schema['video_upload'] = array( - 'description' => t('Store video upload files'), - 'fields' => array( - 'vid' => array( - 'description' => t('video id : primary key'), - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, - ), - 'nid' => array( - 'description' => t('Node id : index of the {node}.nid'), - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, - ), - 'fid' => array( - 'description' => t('FIle id, index to the {files}.fid'), - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, - ), - ), - 'indexes' => array( - 'fid' => array('fid'), - 'nid' => array('nid'), - ), - 'primary key' => array('vid'), - ); - - return $schema; -} - -/** - * Implementation of hook_install(). - */ -function video_upload_install() { - // Create tables. - drupal_install_schema('video_upload'); - // add video_upload_allowed_extensions variable mpeg, avi, wmv etc -} - -/** - * Implementation of hook_uninstall(). - */ -function video_upload_uninstall() { - drupal_uninstall_schema('video_upload'); -}
\ No newline at end of file diff --git a/types/video_upload/video_upload.js b/types/video_upload/video_upload.js deleted file mode 100644 index 5513bea..0000000 --- a/types/video_upload/video_upload.js +++ /dev/null @@ -1,43 +0,0 @@ -// $Id$ -/** - * @file - * Javascript functions for busy status on video uploads - * - * TODO: Support AJAX Uploads :-) - * - * @author Fabio Varesano <fvaresano at yahoo dot it> - * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw at gmail dot com> - * @todo -*/ - -/** - * Hide the node form and show the busy div -*/ -Drupal.video_upload_hide = function () { - // hiding the form (using display: none) makes its file values empty in Konqueror (Possibly also Safari). So let's move the form away of the view of the browser - - $('#node-form').css({ position: "absolute", top: "-4000px" }); - - $("#sending").show(); - $("#video_upload_cancel_link").click(Drupal.video_upload_show); -} - -Drupal.video_upload_show = function() { - $('#node-form').show(); - $("#sending").hide(); - - //$("form").bind("submit", function() { return false; }) - window.location = window.location; -} - -/** - * Attaches the upload behaviour to the video upload form. - */ -Drupal.video_upload = function() { - $('#node-form').submit(Drupal.video_upload_hide); -} - -// Global killswitch -if (Drupal.jsEnabled) { - $(document).ready(Drupal.video_upload); -} diff --git a/types/video_upload/video_upload.module b/types/video_upload/video_upload.module deleted file mode 100644 index 004b7fe..0000000 --- a/types/video_upload/video_upload.module +++ /dev/null @@ -1,776 +0,0 @@ -<?php -// $Id$ -/** - * @file video.module - * - * @author Heshan Wanigasooriya <heshan at heidisoft dot com> - * <heshanmw at gmail dot com> - * @author Glen Marianko Twitter@demoforum <glenm at demoforum dot com> - * @todo implement the help of the video upload (Implement the internal hook for the help video_upload_v_help()). - * @todo GMM: video upload allowed extensions broken, all uploads allowed - * Ajax based upload - * Progress bar on upload - */ - - -/** - * Implementation of hook_menu -*/ -function video_upload_menu() { - $items = array(); - - $items['node/add/video/upload'] = array( - 'title' => 'Upload', - 'access arguments' => array('create video') - ); - $items['admin/settings/video/upload'] = array( - 'title' => 'Upload', - 'description' => 'Configure various settings of the video upload plugin.', - 'access arguments' => array('administer site configuration'), - 'page callback' => 'drupal_get_form', - 'page arguments' => array('video_upload_admin_settings'), - 'type' => MENU_NORMAL_ITEM, - ); - return $items; -} - - -/** - * Setting form for video_upload -*/ -function video_upload_admin_settings() { - $form = array(); - - $form['video_upload_allowed_extensions'] = array( - '#type' => 'textfield', - '#title' => t('Allowed extensions'), - '#description' => t('A comma separated list of video extesions uploadable with the video upload feature. Do not insert any space.'), - '#default_value' => variable_get('video_upload_allowed_extensions', 'mov,flv,wmv'), - ); - - $form['video_upload_path_prefix'] = array( - '#type' => 'textfield', - '#title' => t('Pattern for the file prefix'), - '#description' => t('Specify the pattern to prefix to file names uploaded with the video_upload module. It will be appended after the site files directory (e.g., files) but before the file name itself. Do not include a leading or trailing slash. Spaces will be converted to underscores to avoid file system issues.'), - '#default_value' => variable_get('video_upload_path_prefix', 'videos'), - ); - - $form['token_help'] = array( - '#title' => t('Replacement patterns'), - '#type' => 'fieldset', - '#collapsible' => TRUE, - '#collapsed' => TRUE, - '#description' => t('Prefer raw-text replacements for text to avoid problems with HTML entities!'), - ); - $form['token_help']['help'] = array( - '#value' => theme('token_help', 'node'), - ); - - return system_settings_form($form); -} - - -/** - * Implementation of hook_cron(). - * Look for uploaded videos which have not been submitted (only previews) and - * delete them - */ -function video_upload_cron() { - /* look for crusty files */ - $temppath = file_directory_temp() . '/video/'; - $files = file_scan_directory(file_create_path($temppath), '.*'); - foreach ($files as $file => $info) { - if (time() - filemtime($file) > 60*60*6) { - db_query("DELETE FROM {files} WHERE filename LIKE 'video_upload_temp.%' AND nid = 1 AND filepath = '%s'", $file); - file_delete($file); - } - } -} - - - - -/** - * Implementation of hook_v_help -*/ -function video_upload_v_help() { - - $help = array(); - $help['upload']['data'] = '<b>' . t('Upload support') . '</b>'; - $help['upload']['children'] = array(t('You can upload a video file from your computer to this website.')); - - return $help; -} - - -/** - * Implementation of hook_v_info() -*/ -function video_upload_v_info() { - $info['upload'] = array( - '#name' => 'Upload Video', - '#description' => t('Post a video available on your computer as a file to this website.'), - '#downloadable' => true, - '#autothumbable' => module_exists('video_ffmpeg_helper') && variable_get('video_image_auto_thumbnail', false), - '#autoresolution' => module_exists('video_ffmpeg_helper') && variable_get('video_ffmpeg_helper_auto_resolution', false), - '#autoplaytime' => module_exists('video_ffmpeg_helper') && variable_get('video_ffmpeg_helper_auto_playtime', false), - ); - - return $info; -} - - -/** - * Implements the hook_v_auto_thumnail -*/ -function video_upload_v_auto_thumbnail(&$node) { - // as we rely on ffmpeg_helper, let's check if we have video_ffmpeg_helper_installed - if(module_exists('video_ffmpeg_helper')) { - return _video_ffmpeg_helper_auto_thumbnail($node); - } - return false; -} - - -/** - * Implements the hook_v_auto_resolution -*/ -function video_upload_v_auto_resolution(&$node) { - // as we rely on ffmpeg_helper, let's check if we have video_ffmpeg_helper_installed - if(module_exists('video_ffmpeg_helper')) { - return _video_ffmpeg_helper_auto_resolution($node); - } - return false; -} - - -/** - * Implements the hook_v_auto_resolution -*/ -function video_upload_v_auto_playtime(&$node) { - // as we rely on ffmpeg_helper, let's check if we have video_ffmpeg_helper_installed - if(module_exists('video_ffmpeg_helper')) { - return _video_ffmpeg_helper_auto_playtime($node); - } - return false; -} - - -/** - * Implements the hook_v_download -*/ -function video_upload_v_download($node) { - // the code below comes from the audio.module - - // The mime_header_encode function does not (yet) support - // quoted-string encoding of ASCII strings with special - // characters. See discussion at http://drupal.org/node/82614 - $filename = basename($node->current_video_upload_file->filename); - // If the string contains non-ASCII characters, process it through - // the mime_header_encode function. - if (preg_match('/[^\x20-\x7E]/', $filename)) { - $filename = mime_header_encode($filename); - } - // Otherwise, if the string contains special characters (like - // space), perform quoted-string encoding. - elseif (preg_match('/[ \(\)<>@,;:\\"\/\[\]\?=]/', $filename)) { - $filename = '"'. str_replace('"', '\"', $filename) .'"'; - } - $headers = array( - 'Content-Type: '. mime_header_encode($node->current_video_upload_file->filemime), - 'Content-Length: '. $node->current_video_upload_file->filesize, - 'Content-Disposition: attachment; filename='. $filename, - ); - video_upload_file_transfer($node->current_video_upload_file->filepath, $headers); -} - - -/** - * Variation on Drupal's file_transfer() function. The only difference - * is that set_time_limit() is called to allow for large files. - - * This code comes from audio module - * - * @param $source File to transfer. - * @param $headers An array of http headers to send along with file. - */ -function video_upload_file_transfer($source, $headers) { - ob_end_clean(); - - foreach ($headers as $header) { - // To prevent HTTP header injection, we delete new lines that are - // not followed by a space or a tab. - // See http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 - $header = preg_replace('/\r?\n(?!\t| )/', '', $header); - header($header); - } - - $source = file_create_path($source); - - // Transfer file in 1024 byte chunks to save memory usage. - if ($fd = fopen($source, 'rb')) { - if (!ini_get('safe_mode')){ - set_time_limit(0); - } - while (!feof($fd)) { - print fread($fd, 1024); - ob_flush(); - flush(); - } - fclose($fd); - } - else { - drupal_not_found(); - } - exit(); -} - - -/** - * Implementation of hook_v_form() -*/ -function video_upload_v_form(&$node, &$form) { - //print 'form'; - - // add js stuff for the 'upload in progess' message - theme('video_upload_get_script'); - // add hidden html used for the 'upload in progess' message - $form['#suffix'] = theme('video_upload_busy'); - - // required for upload to work - $form['#attributes']['enctype'] = 'multipart/form-data'; - - $form['video'] += _video_upload_form($node); - - return $form; -} - - - -/** - * Implementation of hook_nodeapi() - */ -function video_upload_nodeapi(&$node, $op, $teaser, $page) { - - - if($node->type == 'video' && $node->vtype == 'upload') { - switch ($op) { - - case 'load': - //exit; - //print_r($node); - //exit; - return _video_upload_load($node); - break; - - case 'prepare': - //exit; - _video_upload_prepare($node); - break; - - case 'validate': - //exit; - //_video_upload_validate($node); - break; - - case 'presave': - //exit; - _video_upload_presave($node); - break; - - case 'insert': - - _video_upload_insert($node); - ////_video_upload_validate($node); - break; - - case 'update': - // exit; - _video_upload_update($node); - break; - - case 'delete': - //exit; - _video_upload_delete($node); - break; - - case 'delete revision': - //exit; - video_upload_delete_revision($node); - break; - - case 'view': - // exit; - _video_upload_view($node); - } - } -} - - - -function _video_upload_load(&$node) { - - $fileBuf = db_fetch_object(db_query('SELECT fid FROM {video_upload} WHERE nid = %d', $node->nid)); - $output = array(); - $output['video_fid'] = $fileBuf->fid; - $file = _video_upload_get_file($output['video_fid']); - //GMM: If original file is deleted from {files} refer to the encoded file - if($node->serial_data['video_encoded_fid']) - $node->encoded_video_upload_file = _video_upload_get_file($node->serial_data['video_encoded_fid']); - if(!$file) { - $output['video_fid'] = $node->serial_data['video_encoded_fid']; - $file = $node->encoded_video_upload_file; - } - $output['current_video_upload_file'] = $file; - $output['vidfile'] = file_create_url($file->filepath); - // set the filesize - $output['size'] = $file->filesize; - //print_r($output); - return $output; -} - - -/* -The following hooks implementation is pretty Drupal voodoo :-) .. you should be -pretty confortable on drupal apis. See -http://www.varesano.net/blog/fabio/understanding+drupal+hook+nodeapi+execution+order -for some hints -*/ - -function _video_upload_prepare(&$node) { - - if (!count($_POST)) - return; -} - -/** -* Create video upload specific form fields -*/ -function _video_upload_form(&$node) { - _video_upload_check_settings(); - - $form = array(); - - if($node->new_video_upload_file) { // there is a newly uploaded file (this has been initialized by _prepare()) - $form['new_video_upload_file_fid'] = array('#type' => 'hidden', '#value' => $node->new_video_upload_file->fid); - $form['new_video_upload_file_info'] = array('#type' => 'item', '#value' => theme('video_upload_file_info_form', $node->new_video_upload_file, $node), '#weight' => -10); - - $we_have_video = true; - } - else { - //$form['new_video_upload_file_fid'] = array('#type' => 'hidden', '#value' => 0); - if($node->current_video_upload_file) { // we don't have a new file - $form['current_video_upload_file_fid'] = array('#type' => 'hidden', '#value' => $node->current_video_upload_file->fid); - $form['current_video_upload_file_info'] = array('#type' => 'item', '#value' => theme('video_upload_file_info_form', $node->current_video_upload_file, $node), '#weight' => -10); - - $we_have_video = true; - } - } - $form['new_video_upload_file_fid'] = array('#type' => 'hidden', '#value' => 0); - $form['video_upload_file'] = array( - '#type' => 'file', - '#title' => $we_have_video ? t('Replace with') : t('Upload video file'), - '#size' => 40, - '#weight' => -9, - '#description' => t('Choose a video file from your pc.<br /><b>NOTE:</b> The max upload size is') . ' ' . format_size(file_upload_max_size()) . '.', - // no need to set this as required as we do validation in the validate nodeapi hook - ); - - return $form; -} - - -/** - * Validate video file - */ -function video_upload_v_validate(&$node) { - // in Drupal 6 version all file size and the type validations are done by the file API's -} - - -function _video_upload_presave(&$node) { - //print 'submit'; - - //print_r($node); die; - // ####### Prepare by moving file to the temp location and then checking the validations of fields - - if (is_object($node->video_upload_file)) { - $file_field = $node->video_upload_file; - } else { - $file_field = 'video_upload_file'; - } - - // get extension array - $extensions = explode(",",variable_get('video_upload_allowed_extensions', 'mov,flv,wmv')); - - $validators = array( - 'file_validate_extensions' => array( 'csv' ), - ); - // TODO : add file size validation - // 'file_validate_size' => array($limits['file_size'], $limits['user_size']), - - //GMM: Fix hard-coded allowed extensions - if (count($_POST) && $file = file_save_upload($file_field , array('file_validate_extensions' => array(implode(" ",$extensions))))) { // a file has been uploaded - $node->new_video_upload_file = $file; - $node->new_video_upload_file_fid = $file->fid; - //print_r($file); - //exit; - } - else if (($node->new_video_upload_file_fid || $_POST['new_video_upload_file_fid']) && $_POST['op'] == 'Submit') { - $node->new_video_upload_file = _video_upload_get_file($_POST['new_video_upload_file_fid']); - } - else if (($node->new_video_upload_file_fid || $_POST['new_video_upload_file_fid']) && $_POST['op'] == 'Preview') { - $node->new_video_upload_file = _video_upload_get_file($_POST['new_video_upload_file_fid']); - } - //$node->new_video_upload_file_fid = $file->fid; - - // - - // ####### Start Perpare to save ############### - if($node->new_video_upload_file_fid) { - $fid = $node->new_video_upload_file_fid; - } - else { - $fid = $node->current_video_upload_file_fid; - } - $node->serial_data['video_fid'] = $fid; - //GMM: corrected reference from >path to >filepath - $node->vidfile = $node->new_video_upload_file->filepath; - $node->size = $node->new_video_upload_file->filesize; - // _video_upload_insert($file,$node); -} - -function _video_upload_insert(&$node) { - //print "insert"; - //print_r($node); - //exit; - if($node->new_video_upload_file_fid && $file = _video_upload_get_file($node->new_video_upload_file_fid)) { // there is a new file uploaded (now stored on the temp path); need to store in the final directory - - _video_upload_store_file($file, $node); - } -} - -function _video_upload_update(&$node) { - - if($node->new_video_upload_file_fid && $file = _video_upload_get_file($node->new_video_upload_file_fid)) { // there is a new file uploaded (now stored on the temp path) - //need to store in the final directory - //exit; - if($node->current_video_upload_file_fid) { - // let's delete the old video - _video_upload_delete_file($node->current_video_upload_file_fid); - } - _video_upload_store_file($file, $node); - } - -} - -/** - * Delete files associated to this video node - */ -function _video_upload_delete(&$node) { - //print 'delete'; - - // delete file - // file_delete($node->current_video_upload_file->path); - - // delete file information from database - db_query('DELETE FROM {video_upload} WHERE fid = %d', $node->current_video_upload_file->fid); - //GMM: set original file to be deleted by Drupal cron file garbage collection - db_query('UPDATE {files} SET status = %d WHERE fid = %d', FILE_STATUS_TEMPORARY, $node->current_video_upload_file->fid); - //db_query('DELETE FROM {files} WHERE fid = %d', $node->current_video_upload_file->fid); -} - - -/** - * -*/ -function _video_upload_view(&$node) { - //print 'view'; -} - - -/** - * Move a temp file into the final directory associating it with the node -*/ -function _video_upload_store_file(&$file, &$node) { - - $file->filename = _video_get_original_filename($file->filename); - - _video_upload_get_path($file, $node); - - if (file_move($file, file_directory_path())) { // file moved successfully - //GMM: Set uploaded file as permanent if no ffmpeg conversion - if(variable_get('video_ffmpeg_helper_auto_conversion', false) && !$node->video_ffmpeg_helper_convertion_bypass ) - $status = FILE_STATUS_TEMPORARY; // ffmpeg will use file as source, so let drupal delete the file later - else - $status = FILE_STATUS_PERMANENT; // ffmpeg will not be called, this video file will play as-is - // update the file db entry - db_query("UPDATE {files} SET filename = '%s', filepath = '%s', filemime = '%s', filesize = %d, status = %d WHERE fid = %d", $file->filename, $file->filepath, $file->filemime, $file->filesize, $status, $file->fid); - //GMM: delete previous revision, if there was one - db_query("DELETE FROM {video_upload} WHERE vid = %d AND nid = %d",$node->vid, $node->nid); - // add an entry in the file_revisions table - db_query("INSERT INTO {video_upload} (vid, nid, fid) VALUES (%d, %d, %d)", $node->vid, $node->nid, $file->fid); - // update the file db entry - //GMM: Remove the serialized encoded fid information in case we're replacing an already encoded video - if (isset($node->serial_data['video_encoded_fid'])) { - //GMM: set rendered video to delete by Drupal cron - db_query('UPDATE {files} SET status = %d WHERE fid = %d', FILE_STATUS_TEMPORARY, $node->serial_data['video_encoded_fid']); - $node->serial_data['video_encoded_fid'] = 0; - db_query("UPDATE {video} SET serialized_data = '%s' WHERE vid = %d", serialize($node->serial_data), $node->vid); - } - } - else { - drupal_set_message(t('An error occurred during file saving. Your video file has not been stored.'), 'error'); - $rep = array( - '!path' => $file, - '!dest' => $dest_path, - ); - watchdog('video_upload', 'moving file !path to !dest failed', $rep); - } -} - - -/** - * Gets the definitive path for stored videos -*/ -function _video_upload_get_path(&$file, &$node) { - // this code is from uploadpath.module - $file_name = str_replace(array(' ', "\n", "\t"), '_', token_replace(variable_get('video_upload_path_prefix', 'videos') . '/', 'node', $node)) . $file->filename; - - // Create the directory if it doesn't exist yet. - $dirs = explode('/', dirname($file_name)); - $directory = file_directory_path(); - while (count($dirs)) { - $directory .= '/' . array_shift($dirs); - file_check_directory($directory, FILE_CREATE_DIRECTORY); - } - $file->filename = $file_name; -} - - -/** - * Get the file object with the given $fid. This function cache its results -*/ -function _video_upload_get_file($fid) { - static $files = array(); - - if (!$fid) { - return NULL; - } - if (!isset($files[$fid])) { - $files[$fid] = db_fetch_object(db_query('SELECT * from {files} WHERE fid = %d', $fid)); - } - return $files[$fid]; -} - - -/** - * Delete a file -*/ -function _video_upload_delete_file($fid) { - - //GMM: delete file if one requested - if($fid) { - //GMM: file_delete($file); - // delete file information from database - db_query('DELETE FROM {video_upload} WHERE fid = %d', $fid); - //GMM: set original file to be deleted by Drupal cron file garbage collection - db_query('UPDATE {files} SET status = %d WHERE fid = %d', FILE_STATUS_TEMPORARY, $fid); - } -} - - -/** - * Display informations about already uploaded file - */ -function theme_video_upload_file_info_form($file, $node) { -//GMM: let user know we're showing uploaded video stats - if($node->serial_data['video_encoded_fid']) { - $ext = split ("\.", basename($node->encoded_video_upload_file->filename)); - $encoded = $ext[count($ext)-1]; - } -// create array containing uploaded file informations -$items = array( - '<b>'. t('file name') .':</b> ' . _video_get_original_filename(basename($file->filename)) . ($encoded ? ' ('.t('Auto-encoded to @ext', array("@ext" => strtoupper($encoded))).')' : '' ), // do not display parent folders - '<b>'. t('file size') .':</b> ' . format_size($file->filesize) . ($node->serial_data['video_encoded_fid']&&$node->serial_data['video_encoded_fid']!=$file->fid ? ' ('.format_size($node->encoded_video_upload_file->filesize).' '.t('encoded').')' : '') , - ); - - // create information list - $output .= theme_item_list($items, t('uploaded video information:')); - - return $output; -} - - -/** - * Return the original filename (without 'video_upload_temp.') -*/ -function _video_get_original_filename($filename) { - if(strpos($filename, 'video_upload_temp.') === 0) { - return substr($filename, strlen('video_upload_temp.')); - } - return $filename; -} - - -/** - * Verify the video_upload module settings. - */ -function _video_upload_check_settings() { - - /* - // File paths - $video_path = file_create_path(variable_get('video_upload_default_path', 'videos')); - $temp_path = rtrim($video_path, '/') . '/temp'; - - if (!file_check_directory($video_path, FILE_CREATE_DIRECTORY, 'video_upload_default_path')) { - return false; - } - if (!file_check_directory($temp_path, FILE_CREATE_DIRECTORY, 'video_upload_default_path')) { - return false; - } - */ - return true; - -} - - - -/** - * Import the video_upload.js script - */ -function theme_video_upload_get_script() { - drupal_add_js(drupal_get_path('module', 'video_upload') . '/video_upload.js'); -} - - -/** - * Renders a 'upload in progress' message -*/ -function theme_video_upload_busy() { - return '<div id="sending" style="display: none;"> - <h3>' . t('Sending video... please wait.') . '</h3> - <img src="'. base_path() . drupal_get_path('module', 'video_upload') . '/busy.gif'.'" alt="' . t('Sending video... please wait.') . '"/> - <p>'. t('Please wait while your video is uploading.') . '<br /><a href="#" id="video_upload_cancel_link">' . t('abort upload.') . '</a></p> - </div>'; -} - - -/** - * Implementation of hook_v_play -*/ -function video_upload_v_play($node) { - module_load_include('inc', 'video', '/includes/common'); - return _video_common_get_player($node); -} - - -/** - * Function to other modules to use to create image nodes. - * - * @param $filepath - * String filepath of an image file. Note that this file will be moved into - * the image module's images directory. - * @param $title - * String to be used as the node's title. If this is ommitted the filename - * will be used. - * @param $body - * String to be used as the node's body. - * @param $taxonomy - * Taxonomy terms to assign to the node if the taxonomy.module is installed. - * @return - * A node object if the node is created successfully or FALSE on error. - */ -function video_upload_create_node_from($filepath, $title = NULL, $body = '', $taxonomy = NULL) { - global $user; - - if (!user_access('create video')) { - drupal_access_denied(); - } - - if (!is_object($filepath)) { - $p = $filepath; - $filepath = new stdClass(); - $filepath->filepath = $p; - $filepath->filename = basename($p); - $filepath->filesize = filesize($p); - } - - // Ensure it's a valid video - //if (!$image_info = image_get_info($filepath)) { - // return FALSE; - //} - - // Build the node. - $node = new stdClass(); - $node->type = 'video'; - $node->vtype = 'upload'; - $node->uid = $user->uid; - $node->name = $user->name; - $node->title = isset($title) ? $title : basename($filepath); - $node->body = $body; - - // Set the node's defaults... (copied this from node and comment.module) - $node_options = variable_get('node_options_'. $node->type, array('status', 'promote')); - $node->status = in_array('status', $node_options); - $node->promote = in_array('promote', $node_options); - if (module_exists('comment')) { - $node->comment = variable_get("comment_$node->type", COMMENT_NODE_READ_WRITE); - } - if (module_exists('taxonomy')) { - $node->taxonomy = $taxonomy; - } - $node->video_upload_file = $filepath; - node_invoke_nodeapi($node, 'prepare'); - $node->new_video_upload_file_fid = $node->new_video_upload_file->fid; - - // Save the node. - $node = node_submit($node); - node_save($node); - - // Remove the original image now that the import has completed. - file_delete($original_path); - - return $node; -} - -/** - * Implementation of hook_theme(). - */ -function video_upload_theme() { - return array( - 'video_upload_busy' => array( - 'arguments' => array(), - ), - 'video_upload_file_info_form' => array( - 'arguments' => array('file' => NULL,'node' => NULL), - ), - 'video_upload_get_script' => array( - 'arguments' => array(), - ), - 'video_play_dcr' => array( - 'arguments' => array('node' => NULL), - ), - 'video_play_divx' => array( - 'arguments' => array('node' => NULL), - ), - 'video_play_flash' => array( - 'arguments' => array('node' => NULL), - ), - 'video_play_ogg_theora' => array( - 'arguments' => array('node' => NULL), - ), - 'video_play_quicktime' => array( - 'arguments' => array('node' => NULL), - ), - 'video_play_realmedia' => array( - 'arguments' => array('node' => NULL), - ), - 'video_play_swf' => array( - 'arguments' => array('node' => NULL), - ), - 'video_play_windowsmedia' => array( - 'arguments' => array('node' => NULL), - ), - ); -}
\ No newline at end of file diff --git a/types/video_url/video_url.info b/types/video_url/video_url.info deleted file mode 100644 index 474719f..0000000 --- a/types/video_url/video_url.info +++ /dev/null @@ -1,6 +0,0 @@ -;$Id$ -name = URL Video -description = Enable URL video support for Video module. -dependencies[] = video -package = "Video" -core = 6.x diff --git a/types/video_url/video_url.module b/types/video_url/video_url.module deleted file mode 100644 index 0e92ec6..0000000 --- a/types/video_url/video_url.module +++ /dev/null @@ -1,102 +0,0 @@ -<?php -//$Id$ -/** - * @file - * Enable Path or URL support for video module. - * - * @author Fabio Varesano <fvaresano at yahoo dot it> - * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw at gmail dot com> - * @todo - */ - - -/** - * Implementation of hook_menu -*/ -function video_url_menu() { - $items = array(); - $maycache=true; - if($maycache) { - $items['node/add/video/url'] = array( - 'title' => 'URL', - 'access arguments' => array('create video') - ); - } - - return $items; -} - - -/** - * Implementation of hook_v_help -*/ -function video_url_v_help() { - - $help = array(); - $help['url']['data'] = '<b>' . t('Url support') . '</b>'; - $help['url']['children'] = array(t('You can link to any video file on the Internet.')); - - return $help; -} - - -/** - * Implementation of hook_v_info() -*/ -function video_url_v_info() { - $info['url'] = array( - '#name' => 'URL Video', - '#description' => t('Post a video available on the Internet to this website.'), - '#downloadable' => TRUE, - '#autothumbable' => FALSE, - '#autoresolution' => FALSE, - '#autoplaytime' => FALSE, - ); - - return $info; -} - - -/** - * Implementation of hook_v_form() -*/ -function video_url_v_form(&$node, &$form) { - - $form['video']['vidfile'] = array( - '#type' => 'textfield', - '#title' => t('URL to the video'), - '#default_value' => $node->vidfile, - '#maxlength' => 700, - '#required' => TRUE, - '#weight' => -20, - '#description' => t('Insert the URL to the video file. This shuold be something similar to <em>http://www.example.com/videos/myvideo.flv</em>') . ' ' . l(t('More information.'), 'video/help', array('fragment' => 'videofile'))); - - return $form; -} - - -/** - * implementation of hook_v_validate -*/ -function video_url_v_validate($node) { - // Can you suggest a validation? - // validation should allow URLs, relative paths but also streaming servers URLs -} - -/** - * Implementation of hook_v_play -*/ -function video_url_v_play($node) { - module_load_include('inc', 'video', 'includes/common'); - return _video_common_get_player($node); -} - - -/** - * Implements the hook_v_download -*/ -function video_url_v_download($node) { - $url = _video_get_fileurl($node->vidfile); - - header("Location: $url"); //Redirect to the video file URL. -} diff --git a/types/video_youtube/video_youtube.info b/types/video_youtube/video_youtube.info deleted file mode 100644 index 38159a8..0000000 --- a/types/video_youtube/video_youtube.info +++ /dev/null @@ -1,6 +0,0 @@ -;$Id$ -name = Youtube Video -description = Enable Youtube videos support for Video module. -dependencies[] = video -package = "Video" -core = 6.x diff --git a/types/video_youtube/video_youtube.module b/types/video_youtube/video_youtube.module deleted file mode 100644 index 30e46c8..0000000 --- a/types/video_youtube/video_youtube.module +++ /dev/null @@ -1,329 +0,0 @@ -<?php -//$Id$ -/** - * @file - * Enable Youtube support for video module. - * - * @author Fabio Varesano <fvaresano at yahoo dot it> - * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw at gmail dot com> - * @todo - */ - - -// let's include apiclient logic -module_load_include('inc', 'video', 'includes/apiclient'); - -/** - * Implementation of hook_menu -*/ -function video_youtube_menu() { - $items = array(); - $maycache=true; - if($maycache) { - $items['node/add/video/youtube'] = array( - 'title' => 'Youtube', - 'access arguments' => array('create video') - ); - - $items['admin/settings/video/youtube'] = array( - 'title' => 'Youtube', - 'description' => 'Configure various settings of the video Youtube plugin.', - 'access arguments' => array('administer site configuration'), - 'page callback' => 'drupal_get_form', - 'page arguments' => array('video_youtube_admin_settings'), - 'type' => MENU_NORMAL_ITEM, - ); - } - - return $items; -} - - -/** - * Setting form for video_upload -*/ -function video_youtube_admin_settings() { - $form = array(); - - $form['video_youtube_auto_thumbnail'] = array( - '#type' => 'checkbox', - '#title' => t('Enable auto thumbnailing for youtube videos'), - '#default_value' => variable_get('video_youtube_auto_thumbnail', false) - ); - $form['video_youtube_related'] = array( - '#type' => 'checkbox', - '#title' => t('Enable related videos'), - '#default_value' => variable_get('video_youtube_related', false), - '#description' => t('If you enable related videos the Youtube player will display a list of related videos once the video completes playing.'), - ); - $form['video_youtube_validation'] = array( - '#type' => 'checkbox', - '#title' => t('Enable validation'), - '#default_value' => variable_get('video_youtube_validation', false), - '#description' => t('If you enable validation, on each youtube video submission, you web server will contact Youtube to check that the inserted video is available and embeddable.'), - ); - $form['video_youtube_api_key'] = array( - '#type' => 'textfield', - '#title' => t('Developer Key'), - '#description' => t('Insert here the developer Key. You can get one from <a href="http://www.youtube.com/my_profile_dev">Youtube Development pages</a>.'), - '#default_value' =>variable_get('video_youtube_api_key', ''), - ); - // jlampton added: new youtube optional client id - $form['video_youtube_client_id'] = array( - '#type' => 'textfield', - '#title' => t('Client ID'), - '#description' => t('Insert here the client ID. You can get one from <a href="http://www.youtube.com/my_profile_dev">Youtube Development pages</a>.'), - '#default_value' =>variable_get('video_youtube_client_id', ''), - ); - return system_settings_form($form); -} - - -/** - * Validate settings -*/ -function video_youtube_admin_settings_validate($form, &$form_state) { - if ($form_state['values']['video_youtube_auto_thumbnail']) { // autothumbnailing is active - // let's check we have a valid dev key - if($form_state['values']['video_youtube_api_key'] == '') { - form_set_error('video_youtube_api_key', t('You have to insert a valid Youtube Developer Key for auto thumbnailing to work')); - } - } -} - - -/** - * Implementation of hook_v_help -*/ -function video_youtube_v_help() { - - $help = array(); - $help['youtube']['data'] = '<b><a href="http://www.youtube.com">' . t('YouTube.com support') . '</a></b>'; - $help['youtube']['children'] = array(t('You can host videos on youtube.com and put them on your site. To do this, after you upload the video on youtube.com enter the video URL.')); - - return $help; -} - - -/** - * Implementation of hook_v_info() -*/ -function video_youtube_v_info() { - $info['youtube'] = array( - '#name' => 'Youtube Video', - '#description' => t('Post a video available on !link to this website.', array('!link' => l(t('Youtube'), 'http://www.youtube.com'), NULL, NULL, NULL, TRUE)), - '#autothumbable' => variable_get('video_youtube_auto_thumbnail', false), - '#autoresolution' => true, - '#autoplaytime' => true, - ); - - return $info; -} - - -/** - * Implementation of hook_v_form() -*/ -function video_youtube_v_form(&$node, &$form) { - - $form['video']['vidfile'] = array( - '#type' => 'textfield', - '#title' => t('Youtube Video URL'), - '#default_value' => $node->vidfile, - '#maxlength' => 700, - '#required' => TRUE, - '#weight' => -20, - '#description' => t('Insert the URL to the youtube video. ') . l(t('More information.'), 'video/help', array('fragment' => 'videofile'))); - - return $form; -} - - -/** - * implementation of hook_v_validate -*/ -function video_youtube_v_validate($node) { - if(!preg_match("/^http:\/\/([a-z]{2,3}\.)?youtube\.com\/watch\?v=/", $node->vidfile)) { - form_set_error('vidfile', t('The Youtube Video URL field must be similar to <em>http://youtube.com/watch?v=IICWFx7sKmw</em>, <em>http://www.youtube.com/watch?v=IICWFx7sKmw</em> or <em>http://it.youtube.com/watch?v=IICWFx7sKmw</em>')); - } - else if(variable_get('video_youtube_validation', false)){ - // we have a good URL. Let's check that the video is available on Youtube and that it is embeddable. - // the approach used here is to return errors only if Youtube explicitely says "an error has occurred" - $id = _video_youtube_get_id($node->vidfile); - // jlampton changed the youtube validation url - $response = _video_apiclient_youtube_request('gdata.youtube.com/feeds/api/videos', array('video_id' => $id)); - if(isset($response['ERROR'])) { - form_set_error('vidfile', t('The Youtube Video URL validation has failed for some reason. Please check the URL and try again.<br />If the error persists please contact %site_name administrators.', array('%site_name' => variable_get('site_name', 'Drupal')))); - if(isset($response['ERROR']['DESCRIPTION'][0])) { - drupal_set_message(t('The Youtube validation service reported the following error: %error', array('%error'=>$response['ERROR']['DESCRIPTION'][0])), 'error'); - } - } - else if(isset($response['VIDEO_DETAILS']['EMBED_STATUS'][0]) - && $response['VIDEO_DETAILS']['EMBED_STATUS'][0] != 'ok') { - // embedding has been disabled. we let the video pass but we warn the user - drupal_set_message(t('The video authors have disabled embedding on Youtube. This means that this video will only be playable directly on Youtube.')); - } - else { // if youtube did not explicetely said "an error has occurred" we accept the video - ; - } - } -} - -/** - * Implementation of hook_v_play -*/ -function video_youtube_v_play($node) { - return theme('video_youtube_play', $node); -} - - -/** AUTOTHUMBNAILING LOGIC */ - -define('VIDEO_YOUTUBE_API_INFO', 'http://youtube.com/dev'); -define('VIDEO_YOUTUBE_API_APPLICATION_URL', 'http://www.youtube.com/my_profile_dev'); -define('VIDEO_YOUTUBE_REST_ENDPOINT', 'http://www.youtube.com/api2_rest'); - - -/** -* this is a wrapper for _video_apiclient_request_xml that includes youtube's api key -*/ -function _video_apiclient_youtube_request($method, $args = array(), $cacheable = TRUE) { - $args['dev_id'] = trim(variable_get('video_youtube_api_key', '')); - $args['method'] = $method; - - return _video_apiclient_request_xml('youtube', VIDEO_YOUTUBE_REST_ENDPOINT, $args, $cacheable); -} - -/** -* returns the external url for a thumbnail of a specific video -* @param $id -* the youtube id of the specific video -* @return -* a URL pointing to the thumbnail -*/ -function _video_apiclient_youtube_get_thumbnail_url($id) { - $response = _video_apiclient_youtube_request('youtube.videos.get_details', array('video_id' => $id)); - - if(isset($response['THUMBNAIL_URL'][0]) && $response['THUMBNAIL_URL'][0] != '') { - return $response['THUMBNAIL_URL'][0]; - } - return false; -} - - -/** - * Implementation of hook_v_auto_thumbnail -*/ -function video_youtube_v_auto_thumbnail($node) { - if (count($_POST)) { - if ($_POST['vidfile'] == $node->vidfile) { - _video_image_thumbnail_debug(t('No new video to thumbnail')); - return NULL; - } - if ($_POST['tempimage']['fids']['_original']) { - _video_image_thumbnail_debug(t('Video already thumbnailed')); - return NULL; - } - $vidfile = $_POST['vidfile']; - } else { - $vidfile = $node->vidfile; - } - - //get the video id - $id = _video_youtube_get_id($vidfile); - // get thumbnail url - $thumbnail_url = _video_apiclient_youtube_get_thumbnail_url($id); - - return _video_image_get_thumb_file_object($thumbnail_url, $id); -} - - -/** - * Implementation of hook_v_auto_resolution -*/ -function video_youtube_v_auto_resolution(&$node) { - // we set youtube videos to 425x350 by default - return array(425, 350); -} - - -/** - * Implementation of hook_v_auto_playtime -*/ -function video_youtube_v_auto_playtime(&$node) { - $id = _video_youtube_get_id($node->vidfile); - $response = _video_apiclient_youtube_request('youtube.videos.get_details', array('video_id' => $id)); // NOTE: here we already passed validation so we expect a valid response - - return $response['VIDEO_DETAILS']['LENGTH_SECONDS'][0]; // return the lenght in seconds -} - - -/** THEMEABLE FUNCTIONS */ - -/** - * Play videos hosted on youtube.com - * Allows users to host videos on youtube.com and then use the video ID to post it in the module. - * In the future it could also use the youtube developer API to get info and comments of the video. - * - * @param $node - * object with node information - * - * @return - * string of content to display - */ -function theme_video_youtube_play($node) { - $width = ($node->video_scaled_x ? $node->video_scaled_x : '425'); - $height = ($node->video_scaled_y ? $node->video_scaled_y : '350'); - - $id = _video_youtube_get_id(check_plain($node->vidfile)); - - // related video setting - $rel = variable_get('video_youtube_related', false) ? '1' : '0'; - - // this will be executed by not Internet Explorer browsers - $output = '<!--[if !IE]> <--> -<object type="application/x-shockwave-flash" width="'. $width .'" height="'. $height .'" -data="http://www.youtube.com/v/' . $id . '&rel='.$rel.'"> -<!--> <![endif]-->' . "\n"; - - // this will be executed by Internet Explorer - $output .= '<!--[if IE]> -<object type="application/x-shockwave-flash" width="'. $width .'" height="'. $height .'" -classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" -codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"> -<![endif]-->' . "\n"; - - // params will be passed to both IE or not IE browsers - $output .= '<param name="movie" value="http://www.youtube.com/v/' . $id . '&rel='.$rel.'" />' . "\n" - . '<param name="wmode" value="transparent" />' . "\n" - . _video_get_parameters($node) . - '<p>'. t('Your browser is not able to display this multimedia content.') .'</p> -</object>'; - - - $output = theme('video_format_play', $output, t('http://www.google.com/support/youtube'), t('Link to youtube.com'), t('youtube.com')); - return $output; -} - - -/** HELPER FUNCTIONS */ - -/** - * Get the id from an URL -*/ -function _video_youtube_get_id($url) { - $parsed_url = parse_url($url); - parse_str($parsed_url['query'], $parsed_query);; - return $parsed_query['v']; -} - -/** - * Implementation of hook_theme(). - */ -function video_youtube_theme() { - return array( - 'video_youtube_play' => array( - 'arguments' => array('node' => NULL), - ), - ); -} diff --git a/video.admin.inc b/video.admin.inc new file mode 100644 index 0000000..1d246af --- /dev/null +++ b/video.admin.inc @@ -0,0 +1,306 @@ +<?php +// $Id$ + +/** + * @file + * Provides the administration settings for the Flowplayer Drupal module. + */ + +/** + * Settings Form + * + * @return + * string of form content or error message + */ +function video_admin_settings() { + global $base_url; + + $form = array(); + + $form['menu'] = array( + '#type' => 'fieldset', + '#title' => t('General Behavior'), + '#collapsible' => TRUE, + '#collapsed' => FALSE + ); + + // $form['menu']['video_displaydownloadmenutab'] = array( + // '#type' => 'checkbox', + // '#title' => t('Display download menu tab'), + // '#default_value' => variable_get('video_displaydownloadmenutab', 1), + // '#description' => t('Toggle display of menu tab to download video from the node page.') + // ); + // $form['menu']['video_displaydownloadlink'] = array( + // '#type' => 'checkbox', + // '#title' => t('Display download link'), + // '#default_value' => variable_get('video_displaydownloadlink', 1), + // '#description' => t('Toggle display of "download" link (below the node content in most themes).') + // ); + // $form['menu']['video_displayplaytime'] = array( + // '#type' => 'checkbox', + // '#title' => t('Display playtime'), + // '#default_value' => variable_get('video_displayplaytime', 1), + // '#description' => t('Toggle the display of the playtime for a video.') + // ); + // $form['menu']['video_displayfilesize'] = array( + // '#type' => 'checkbox', + // '#title' => t('Display filesize'), + // '#default_value' => variable_get('video_displayfilesize', 1), + // '#description' => t('Toggle the display of the filesize for a video.') + // ); + $form['menu']['video_autoplay'] = array( + '#type' => 'checkbox', + '#title' => t('Automatically start video on page load'), + '#default_value' => variable_get('video_autoplay', TRUE), + '#description' => t('Start the video when the page and video loads') + ); + + $form['menu']['video_autobuffering'] = array( + '#type' => 'checkbox', + '#title' => t('Automatically start video buffering'), + '#default_value' => variable_get('video_autobuffering', TRUE), + '#description' => t('Start buffering video when the page and video loads') + ); + + $form['player'] = array( + '#type' => 'fieldset', + '#title' => t('Video Extra Players'), + '#collapsible' => TRUE, + '#collapsed' => FALSE + ); + $form['player']['video_cortado'] = array( + '#type' => 'textfield', + '#title' => t('Path to OGG Cortado Player'), + '#default_value' => variable_get('video_cortado', $base_url . '/cortado.jar'), + '#description' => t('Copy your cortado.jar file to Drupal root and keep the setting un-changed.') + ); + + $form['player']['mp4_play_in_flowplayer'] = array( + '#type' => 'checkbox', + '#title' => t('Play HQ MP4 files in Flash Player'), + '#default_value' => variable_get('mp4_play_in_flowplayer', FALSE), + '#description' => t('Play HQ MP4 files in Flash player.') + ); + + + // + $gateways = _video_transcoder_types(); + // print_r($gateways); + // $gateway_options = array(); + // foreach( $gateways as $gateway) { + // $obj = new stdClass(); + // $obj->option = array($gateway => _smsgateway_invoke( 'name', $gateway)); + // $gateway_options[] = $obj; + // } + + + $form['tranccoder'] = array( + '#type' => 'fieldset', + '#title' => t('Video Transcoder'), + '#collapsible' => FALSE, + '#collapsed' => FALSE + ); + + // TODO : write a common function to pick as help + $help_transcoders = array(); + $help_transcoders[] = l('FFMPEG Default module', 'http://drupal.org/node/722506'); + $help_transcoders[] = l('FFMPEG Wrapper module', 'http://drupal.org/project/ffmpeg_wrapper'); + $help_transcoders[] = l('ZENCODER Online Transcoder', 'http://zencoder.tv/'); + + $form['tranccoder']['vid_convertor'] = array( + '#type' => 'radios', + '#title' => t('Video transcoder'), + '#default_value' => variable_get('vid_convertor', 'ffmpeg'), + '#options' => $gateways, + '#description' => t('Video transcoder will help you to video conversion + and automatic thumbnail generaion. You must install !ffmpeg_wrapper + module to enable ffmpeg_wrapper support. !list', + array('!ffmpeg_wrapper' => l('ffmpeg_wrapper module', 'http://drupal.org/project/ffmpeg_wrapper'), + '!list' => theme('item_list', $help_transcoders))) + ); + $form['tranccoder']['video_transcoder_path'] = array( + '#type' => 'textfield', + '#title' => t('Path to Video Transcoder'), + '#description' => t('Path to executable, you can skip this if your usign ffmpeg_wrapper module support.'), + '#default_value' => variable_get('video_transcoder_path', '/usr/bin/ffmpeg'), + ); + $form['tranccoder']['no_of_video_thumbs'] = array( + '#type' => 'textfield', + '#title' => t('No of video thumbnails'), + '#description' => t('No of thumbnails extracting from video'), + '#default_value' => variable_get('no_of_video_thumbs', 5), + ); + + // ffmpeg wapper settings + $video_converter = variable_get('vid_convertor', 'ffmpeg'); + if($video_converter == 'ffmpeg') { + + $form['conv'] = array( + '#type' => 'fieldset', + '#title' => t('FFmpeg video conversion settings.'), + '#collapsible' => FALSE, + '#collapsed' => FALSE + ); + + //auto thumb videos + $form['conv']['autothumb'] = array( + '#type' => 'fieldset', + '#title' => t('Automatic video thumbnailing'), + '#collapsible' => TRUE, + '#collapsed' => TRUE + ); + $form['conv']['autothumb']['video_thumb_path'] = array( + '#type' => 'textfield', + '#title' => t('Path to Video Thumbnails'), + '#description' => t('Path to save video thumbnails extracted from video'), + '#default_value' => variable_get('video_thumb_path', 'video_thumbs'), + ); + $form['conv']['autothumb']['advanced'] = array( + '#type' => 'fieldset', + '#title' => t('Advanced settings'), + '#collapsible' => TRUE, + '#collapsed' => TRUE + ); + $form['conv']['autothumb']['advanced']['video_ffmpeg_thumbnailer_options'] = array( + '#type' => 'textfield', + '#title' => t('Video thumbnailer options'), + '#description' => t('Provide the options for the thumbnailer. Available argument values are: ').'<ol><li>'.t('%videofile (the video file to thumbnail)').'<li>'.t('%thumbfile (a newly created temporary file to overwrite with the thumbnail)').'</ol>'.t('Only the first two are mandatory. For example, older versions of ffmpeg should use something like: !old While newer versions should use something like: !new', array('!old' => "<div>-i %videofile -an -y -f mjpeg -ss %seek -vframes 1 %thumbfile</div>", '!new' => '<div>-i %videofile -an -y -f mjpeg -ss %seek -vframes 1 %thumbfile</div>')), + '#default_value' => variable_get('video_ffmpeg_thumbnailer_options', '-i %videofile -an -y -f mjpeg -ss %seek -vframes 1 %thumbfile'), + ); + + + // automatic video conversion settings + $form['conv']['autoconv'] = array( + '#type' => 'fieldset', + '#title' => t('Automatic video conversion'), + '#collapsible' => TRUE, + '#collapsed' => TRUE + ); + $form['conv']['autoconv']['video_ffmpeg_width'] = array( + '#type' => 'textfield', + '#title' => t('Destination video Width'), + '#size' => 10, + '#maxlength' => 10, + '#default_value' => variable_get('video_ffmpeg_width', 640), + ); + $form['conv']['autoconv']['video_ffmpeg_height'] = array( + '#type' => 'textfield', + '#title' => t('Destination video height'), + '#size' => 10, + '#maxlength' => 10, + '#default_value' => variable_get('video_ffmpeg_height', 480), + ); + $form['conv']['autoconv']['video_ffmpeg_helper_auto_cvr_video_bitrate'] = array( + '#type' => 'textfield', + '#title' => t('Video bitrate'), + '#description' => t('The video bitrate in bit/s of the converted video.'), + '#size' => 10, + '#maxlength' => 10, + '#default_value' => variable_get('video_ffmpeg_helper_auto_cvr_video_bitrate', 200000), + ); + $form['conv']['autoconv']['video_ffmpeg_helper_auto_cvr_audio_bitrate'] = array( + '#type' => 'textfield', + '#title' => t('Audio bitrate'), + '#description' => t('The audio bitrate in bit/s of the converted video.'), + '#size' => 10, + '#maxlength' => 10, + '#default_value' => variable_get('video_ffmpeg_helper_auto_cvr_audio_bitrate', 64000), + ); + $form['conv']['autoconv']['advanced'] = array( + '#type' => 'fieldset', + '#title' => t('Advanced settings'), + '#collapsible' => TRUE, + '#collapsed' => TRUE + ); + $form['conv']['autoconv']['advanced']['video_ffmpeg_helper_auto_cvr_options'] = array( + '#type' => 'textfield', + '#title' => t('Video converter options'), + '#description' => t('Provide the ffmpeg options to configure the video conversion. Available argument values are: ').'<ul>'. + '<li>'.t('%videofile (the video file to convert)'). + '<li>'.t('%convertfile (a newly created file to store the converted file)'). + '<li>'.t('%size (video resolution of the converted file)'). + '</ul>'. + t('For further informations refer to the !ffmpegdoc', array('!ffmpegdoc' => l(t('Official FFMpeg documentation.'), 'http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html', array('fragment' => TRUE)))), + '#default_value' => variable_get('video_ffmpeg_helper_auto_cvr_options', '-y -i %videofile -f flv -ar 22050 -ab %audiobitrate -s %size -b %videobitrate -qscale 1 %convertfile'), + ); + + } + else if($video_converter == 'ffmpeg_wrapper') { + global $conf; + if(module_exists('ffmpeg_wrapper')) + $form['ffmpeg'] = ffmpeg_wrapper_configuration_form($conf); + } + else if($video_converter == 'zencoder') { + $form['zencoder'] = array( + '#type' => 'fieldset', + '#title' => t("ZENCODER configuration"), + '#description' => t('Settings for the zencoder module.', + array('!link' => l(t('S3 test'), 'admin/build/s3_ap1/test'))), + '#element_validate' => array('video_admin_settings_validate'), + ); + + $form['zencoder']['zencoder_api_key'] = array( + '#type' => 'textfield', + '#title' => t('Zencoder Key'), + '#default_value' => variable_get('zencoder_api_key', ""), + '#description' => t("Zencoder key."), + ); + + $form['zencoder']['zencoder_api_skey'] = array( + '#type' => 'textfield', + '#title' => t('Zencoder Secret Key'), + '#default_value' => variable_get('zencoder_api_skey', ""), + '#description' => t("Zencoder secret key."), + ); + } + + return system_settings_form($form); +} + +/** + * Form API callback to validate the upload settings form. + * + * Keeps the use from showing the play tab or the play link + * if they have chosen to display the video in the node body. + * + * + */ +function video_admin_settings_validate($form, &$form_state) { +// check ffmpeg_wrapper installed or not + if ($form_state['values']['vid_convertor'] == 'ffmpeg_wrapper' && !module_exists('ffmpeg_wrapper')) { + form_set_error('vid_convertor', t('You do not have installed the !ffmpeg_wrapper module to enable using its plugin, please install it.' , array('!ffmpeg_wrapper' => l('ffmpeg_wrapper', 'http://drupal.org/project/ffmpeg_wrapper')))); + } +} + +/** + * Ensure that specified convertor is included. + */ +function _video_transcoder( $gateway) { + $path = drupal_get_path('module', 'video') . '/plugins'; + $files = file_scan_directory($path, '^'. $gateway .'\.inc$'); + foreach ($files as $filename => $file) { + include_once($filename); + } +} + +/** + * + * @staticvar <type> $transcoders + * @return <type> get installed types of video + */ +function _video_transcoder_types() { + static $transcoders; + + if (!isset($transcoders)) { + $transcoders = array(); + $path = drupal_get_path('module', 'video') .'/plugins'; + $files = file_scan_directory($path, '^.*\.inc$'); + foreach ($files as $filename => $file) { + include_once($filename); + $transcoders[$file->name] = $file->name; + } + } + return $transcoders; +} + +?> diff --git a/video.css b/video.css deleted file mode 100644 index f3fc804..0000000 --- a/video.css +++ /dev/null @@ -1,27 +0,0 @@ -/** - * @file - * Contains css theming rules for video module and plugins - * - * @author Fabio Varesano <fvaresano at yahoo dot it> - * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw@gmail.com> - * @todo - * @version : $Id$ - */ - -.video_image_teaser { - float: left; - padding: 0.5em; -} - -br.video_image_clear { - clear: both; -} - -.video_image_view { - /* inser here rules for node page image */ -} - -.video-ffmpeg-helper-inprogress { - border: 1px solid red; - padding: .5em; -} diff --git a/video.js b/video.js deleted file mode 100644 index d9e0629..0000000 --- a/video.js +++ /dev/null @@ -1,43 +0,0 @@ -// $Id$ -/** - * @file - * This file contains some useful functions which fixes different - * Internet Explorer strange behaviours. - * This file is inclueded at each video play. - * See functions video_play and theme_video_get_script on video.module - * file for more informations. - * - * @author Fabio Varesano <fvaresano at yahoo dot it> - * @author Heshan Wanigasooriya <heshan at heidisoft.com><heshanmw at gmail dot com> - * @todo -*/ - -//We do this code only on Internet Explorer. -if (document.all) { - - // Fix for the "Click to interact with ActiveX control" message on IE - var objects = document.getElementsByTagName( 'object' ); - for ( var i = 0; i < objects.length; i++ ) { - var obj = objects[ i ]; - var clone = obj.cloneNode( true ); - var parent = obj .parentNode; - var sibling = obj .nextSibling; - parent.removeChild( obj ); - parent.insertBefore( clone, sibling ); - clone.outerHTML = clone.outerHTML; - } - - - function InsertQuicktimeVideo(vidfile, height, width) - { - document.writeln('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="' + width + '" height="' + height + '" scale="tofit" codebase="http://www.apple.com/qtactivex/qtplugin.cab">'); - document.writeln('<param name="SRC" value="' + vidfile + '" />'); - document.writeln('<param name="AUTOPLAY" value="true" />'); - document.writeln('<param name="KIOSKMODE" value="false" />'); - document.writeln('<embed src="' + vidfile + '" width="' + width + '" height="' + height + '" scale="tofit" autoplay="true" kioskmode="false" pluginspage="http://www.apple.com/quicktime/download/"></embed>\n</object>'); - } - -} - - - diff --git a/video_scheduler.php b/video_scheduler.php new file mode 100644 index 0000000..a0cbc9c --- /dev/null +++ b/video_scheduler.php @@ -0,0 +1,225 @@ +<?php +//$Id$ +/** + * @file + * Implement video rendering scheduling. + * If you are not using sites/default/settings.php as your settings file, + * add an optional parameter for the drupal site url: + * "php video_scheduler.php http://example.com/" or + * "php video_scheduler.php http://example.org/drupal/" + * + * @author Heshan Wanigasooriya <heshan at heidisoft dot com, heshanmw at gmail dot com> + * + */ + +/** + * video_scheduler.php configuration + */ + +// number of conversion jobs active at the same time +defined('VIDEO_RENDERING_FFMPEG_INSTANCES') + or define('VIDEO_RENDERING_FFMPEG_INSTANCES', 5); + +/** + * video_scheduler.php configuration ends. + * DO NOT EDIT BELOW THIS LINE + */ + +/** + * Define some constants + */ +defined('VIDEO_RENDERING_PENDING') + or define('VIDEO_RENDERING_PENDING', 1); +defined('VIDEO_RENDERING_ACTIVE') + or define('VIDEO_RENDERING_ACTIVE', 5); +defined('VIDEO_RENDERING_COMPLETE') + or define('VIDEO_RENDERING_COMPLETE', 10); +defined('VIDEO_RENDERING_FAILED') + or define('VIDEO_RENDERING_FAILED', 20); + + +if (isset($_SERVER['argv'][1])) { + $url = parse_url($_SERVER['argv'][1]); + $_SERVER['SCRIPT_NAME'] = $url['path']; + $_SERVER['HTTP_HOST'] = $url['host']; +} + +include_once('./includes/bootstrap.inc'); +//module_load_include('/includes/bootstrap.inc', 'video_scheduler', 'includes/bootstrap'); +// disable error reporting for bootstrap process +error_reporting(E_ERROR); +// let's bootstrap: we will be able to use drupal apis +drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); +// enable full error reporting again +error_reporting(E_ALL); + +//watchdog('video_scheduler', 'starting video conversion jobs.', array(), WATCHDOG_DEBUG); +// allow execution only from the command line! +if(empty($_SERVER['REQUEST_METHOD'])) { + video_scheduler_main(); +} +else { + print ('This script is only executable from the command line.'); + die(); +} + + + +/** + * Main for video_scheduler.php + */ +function video_scheduler_main() { +// echo 'ok'; + if($jobs = video_scheduler_select()) { + foreach ($jobs as $job) { + video_scheduler_start($job); + } + } + else { + watchdog('video_scheduler', 'no video conversion jobs to schedule.', array(), WATCHDOG_DEBUG); + } +} + + +/** + * Starts rendering for a job + */ +function video_scheduler_start($job) { +// $url = (isset($_SERVER['argv'][1])) ? escapeshellarg($_SERVER['argv'][1]) : ''; +// watchdog('video_scheduler', 'Execute video_render.php %url and %job', array('%url'=>$url, '%job'=>$job->fid), WATCHDOG_DEBUG); +// exec("/usr/local/bin/php /home/freja/public_html/v5-dev/video_render.php $job->fid $url > /dev/null &"); + video_render_main($job->fid); +} + + +/** + * Select VIDEO_RENDERING_FFMPEG_INSTANCES jobs from the queue + * + * @return an array containing jobs + */ +function video_scheduler_select() { +// load node and its file object + module_load_include('inc', 'uploadfield', '/uploadfield_convert'); + $jobs = array(); + $i = 0; + $result = db_query_range('SELECT f.fid, f.filepath, f.filesize, f.filename, f.filemime, f.status FROM {video_rendering} vr INNER JOIN {files} + f ON vr.fid = f.fid WHERE vr.fid = f.fid AND vr.status = %d AND f.status = %d ORDER BY f.timestamp', + VIDEO_RENDERING_PENDING, FILE_STATUS_PERMANENT, 0, VIDEO_RENDERING_FFMPEG_INSTANCES); + while($job = db_fetch_object($result)) { + $jobs[] = $job; + } + // print_r($jobs); + // exit; + return $jobs; +} + +/** + * Video Rendering Process + * + */ +function video_render_main($job_fid) { + +// get parameters passed from command line + $fid = $job_fid; + $job = NULL; + // set the status to active + _video_render_job_change_status($fid, VIDEO_RENDERING_ACTIVE); + // load the job object + $job = _video_render_load_job($fid); + + if(empty($job)) { + watchdog('video_render', 'video_render.php has been called with an invalid job resource. exiting.', array(), WATCHDOG_ERROR); + die; + } + + // get file object + _video_render_get_converted_file(&$job); + $file = $job->converted; + + if(empty($file)) { + watchdog('video_render', 'converted file is an empty file.', array(), WATCHDOG_ERROR); + _video_render_job_change_status($fid, VIDEO_RENDERING_FAILED); + die; + } + + + $tmpfile = $file->filepath; + + // the above no more works as token supports - use dirname + $dest_dir = dirname($job->filepath) . '/'; + + if (file_copy($file, $dest_dir)) { + //update the file table entry and copy file content to new one + $file->fid = $fid; + //update file with new + drupal_write_record ('files', $file, 'fid'); + //add new file entry + drupal_write_record ('files', $job); + // TODO : add data of rendering + _video_render_job_change_status($fid, VIDEO_RENDERING_COMPLETE); + // clear all cacahe data + // cache_clear_all(); + // drupal_flush_all_caches(); + cache_clear_all("*", 'cache_content', true); + watchdog('video_render', 'successfully converted %orig to %dest', array('%orig' => $job->filepath, '%dest' => $file->filepath), WATCHDOG_INFO); + // delete the temp file +// unlink($tmpfile); + } + else { + _video_render_job_change_status($fid, VIDEO_RENDERING_FAILED); + // get the username of the process owner + $ownerarray = posix_getpwuid(posix_getuid()); + $owner=$ownerarray['name']; + // get the username of the destination folder owner + $fownerarray = posix_getpwuid(fileowner($dest_dir)); + $fowner=$fownerarray['name']; + // get destination folder permissions + $perms = substr(sprintf('%o', fileperms($dest_dir)), -4); + watchdog('video_render', 'error moving video %vid_file with nid = %nid to %dir the final directory. Check folder permissions.<br />The script was run by %uname .<br />The folder owner is %fowner .<br />The folder permissions are %perms .', array('%vid_file' => $job->origfile, '%nid' => $job->nid, '%dir' => $dest_dir, '%uname' => $owner, '%fowner' => $fowner, '%perms' => $perms), WATCHDOG_ERROR); + } +} + + +/** + * Get a string cointaining the command to be executed including options + */ +function _video_render_get_converted_file(&$job) { + $transcoder = variable_get('vid_convertor', 'ffmpeg'); + module_load_include('inc', 'video', '/plugins/' . $transcoder); + $function = variable_get('vid_convertor', 'ffmpeg') . '_auto_convert'; + if (function_exists($function)) { + // $thumbs = ffmpeg_auto_thumbnail($file); + // watchdog('video_render', 'calling to converter API %conv', array('%conv' => $transcoder)); + $function(&$job); +// if(! $success) { +// watchdog('video_render', 'error transcoding vide. existing.', array(), WATCHDOG_ERROR); +// } + } + else { + // drupal_set_message(t('Transcoder not configured properly'), 'error'); + print ('Transcoder not configured properly'); + } +} + + +/** + * Load a job + */ +function _video_render_load_job($fid) { +// watchdog('video_render', 'Loading contents for file id %fid', array('%fid' => $fid)); + $result = db_query('SELECT f.filepath, f.filesize, f.filename, f.filemime, f.filesize, f.status, f.uid + FROM {video_rendering} vr INNER JOIN {files} f + ON vr.fid = f.fid WHERE vr.fid = f.fid AND f.status = %d AND f.fid = %d', + FILE_STATUS_PERMANENT, $fid); + return db_fetch_object($result); +} + + +/** + * Change the status to $status of the job having nid=$nid and vid=$vid + */ +function _video_render_job_change_status($fid, $status) { + $result = db_query('UPDATE {video_rendering} SET status = %d WHERE fid = %d ', $status, $fid); +} + +?> |