I am using the latest 5x dev version. 90% of the time my videos upload with no problem. However I randomly will upload a video (the same exact video file used for all the successful tries) and I get an error message.

At the top I get a "Something went wrong with your video conversion. Please check your recent log entries for further debugging." in a red box.

Then were the video is supposed to be I get this:

"The video conversion process has failed. You might want to submit a simpler video format like mpeg or divx avi.
If the problem persists please contact website administrators."

When I look at the logs I get several problems as you can see in the attachment.
First I get a php error with the message:

"mysql_real_escape_string() expects parameter 1 to be string, array given in /home2/utprepco/public_html/utprep/includes/database.mysql.inc on line 330."

Then I get a Zencoder error saying:

"Zencoder reports errors while converting fox13-1.mp4:

    Width must be a positive integer.
    Height must be a positive integer.
    Height must be greater than 16.
    Width must be greater than 16.

And then last I get another Zencoder error saying:

Failed to queue file sites/default/files/videos/original/fox13-1_1.mp4 to Zencoder.

It is just odd that it works, then it doesn't work, then it works... It happens more often when I create a fresh node rather than editing an existing node.

CommentFileSizeAuthor
#1 report.png163.64 KButprep

Comments

utprep’s picture

StatusFileSize
new163.64 KB
Jorrit’s picture

Are there any errors before the mysql error?

Can you post a screenshot of the job page for this job in the Zencoder control panel? Or is this job not visible in Zencoder?

utprep’s picture

The php error is the first thing that comes up before anything. In Zencoder it appears there are no visible jobs for this video.

Jorrit’s picture

It is very hard to find out what the source of that MySQL error is, because there is no stack trace. I have a solution for this, but that requires the Logging and Alerts module (http://drupal.org/project/logging_alerts). Using that module, you receive an e-mail every time an error occurs, optionally with a stack trace. Is it possible for you to install this module and wait for an error to occur?

Also, when you edit a node that has a failed video, what value is selected as the video transcode dimension? Is it the first one in the drop down?

utprep’s picture

I went ahead and installed the alert module, and tried like seven times with my admin account to upload a video and every single one was successful (I never thought I would be mad about something working). So I logged in with an authenticated user account and I finally got the error when uploading.

Here is the email related to that php/mysql error:

mysql_real_escape_string() expects parameter 1 to be string, array given in /home2/utprepco/public_html/utprep/includes/database.mysql.inc on line 330.


debug_backtrace() => Array
(
   [0] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/logging_alerts/emaillog/emaillog.module
           [line] => 109
           [function] => eval
       )

   [1] => Array
       (
           [function] => emaillog_watchdog
           [args] => array(10)
       )

   [2] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/module.inc
           [line] => 462
           [function] => call_user_func_array
           [args] => string(17), array(1)
       )

   [3] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/bootstrap.inc
           [line] => 966
           [function] => module_invoke
           [args] => string(8), string(8), array(10)
       )

   [4] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/common.inc
           [line] => 663
           [function] => watchdog
           [args] => string(3), string(32), array(4), integer(1)
       )

   [5] => Array
       (
           [function] => drupal_error_handler
           [args] => integer(1), string(72), string(62), integer(3), array(2)
       )

   [6] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/database.mysql.inc
           [line] => 330
           [function] => mysql_real_escape_string
           [args] => array(6), resource(?)
       )

   [7] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/database.inc
           [line] => 225
           [function] => db_escape_string
           [args] => array(6)
       )

   [8] => Array
       (
           [function] => _db_query_callback
           [args] => array(2)
       )

   [9] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/database.mysql-common.inc
           [line] => 41
           [function] => preg_replace_callback
           [args] => string(21), string(18), string(77)
       )

   [10] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/video/plugins/video_zencoder/transcoders/video_zencoder.inc
           [line] => 455
           [function] => db_query
           [args] => string(76), string(3), integer(1), array(6)
       )

   [11] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/video/video_widget.inc
           [line] => 267
           [function] => create_job
           [class] => video_zencoder
           [type] => ->
           [object] => video_zencoder Object
               (
                   [name:private] => Zencoder
                   [value:private] => video_zencoder
               )

           [args] => object(9)
       )

   [12] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/video/video_widget.inc
           [line] => 182
           [function] => video_convert_process
           [args] => array(37)
       )

   [13] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/video/types/uploadfield/uploadfield_widget.inc
           [line] => 131
           [function] => video_widget_process
           [args] => array(37), array(5)
       )

   [14] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/form.inc
           [line] => 1063
           [function] => uploadfield_widget_process
           [args] => array(37), array(4), array(5), array(47)
       )

   [15] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/form.inc
           [line] => 889
           [function] => _form_builder_handle_input_element
           [args] => string(24), array(37), array(5), array(47)
       )

   [16] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/form.inc
           [line] => 930
           [function] => form_builder
           [args] => string(24), array(16), array(5)
       )

   [17] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/form.inc
           [line] => 930
           [function] => form_builder
           [args] => string(24), array(14), array(5)
       )

   [18] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/form.inc
           [line] => 406
           [function] => form_builder
           [args] => string(24), array(46), array(5)
       )

   [19] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/form.inc
           [line] => 121
           [function] => drupal_process_form
           [args] => string(24), array(46), array(5)
       )

   [20] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/modules/node/node.pages.inc
           [line] => 58
           [function] => drupal_get_form
           [args] => string(24), array(4)
       )

   [21] => Array
       (
           [function] => node_add
           [args] => string(14)
       )

   [22] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/menu.inc
           [line] => 348
           [function] => call_user_func_array
           [args] => string(8), array(1)
       )

   [23] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/index.php
           [line] => 18
           [function] => menu_execute_active_handler
           [args] =>
       )

)

Here is the first Zendoder error message:

Zencoder reports errors while converting fox13-1.mp4:Width must be a positive integer.
Height must be a positive integer.
Height must be greater than 16.
Width must be greater than 16.



debug_backtrace() => Array
(
   [0] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/logging_alerts/emaillog/emaillog.module
           [line] => 109
           [function] => eval
       )

   [1] => Array
       (
           [function] => emaillog_watchdog
           [args] => array(10)
       )

   [2] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/module.inc
           [line] => 462
           [function] => call_user_func_array
           [args] => string(17), array(1)
       )

   [3] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/bootstrap.inc
           [line] => 966
           [function] => module_invoke
           [args] => string(8), string(8), array(10)
       )

   [4] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/video/plugins/video_zencoder/video_zencoder.lib.inc
           [line] => 97
           [function] => watchdog
           [args] => string(8), string(62), array(2), integer(1)
       )

   [5] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/video/plugins/video_zencoder/transcoders/video_zencoder.inc
           [line] => 78
           [function] => create
           [class] => video_zencoder_api
           [type] => ->
           [object] => video_zencoder_api Object
               (
                   [access_key:private] => 43aaee0e3896b1b52b75bd3ddeb58763
                   [zencoder:private] => Services_Zencoder Object
                       (
                           [http:protected] => Services_Zencoder_Http Object
                               (
                                   [api_key:protected] => 43aaee0e3896b1b52b75bd3ddeb58763
                                   [scheme:protected] => https
                                   [host:protected] => app.zencoder.com
                                   [debug:protected] =>
                                   [curlopts:protected] => Array
                                       (
                                           [10018] => ZencoderPHP v2.0.2
                                           [10065] => /home2/utprepco/public_html/utprep/sites/all/libraries/zencoder/Services/Zencoder/zencoder_ca_chain.crt
                                       )

                               )

                           [version:protected] => v2
                           [accounts] => Services_Zencoder_Accounts Object
                               (
                                   [proxy:protected] => Services_Zencoder Object
 *RECURSION*
                               )

                           [inputs] => Services_Zencoder_Inputs Object
                               (
                                   [proxy:protected] => Services_Zencoder Object
 *RECURSION*
                               )

                           [jobs] => Services_Zencoder_Jobs Object
                               (
                                   [proxy:protected] => Services_Zencoder Object
 *RECURSION*
                               )

                           [notifications] => Services_Zencoder_Notifications Object
                               (
                                   [proxy:protected] => Services_Zencoder Object
 *RECURSION*
                               )

                           [outputs] => Services_Zencoder_Outputs Object
                               (
                                   [proxy:protected] => Services_Zencoder Object
 *RECURSION*
                               )

                           [proxy:protected] =>
                       )

               )

           [args] => object(13)
       )

   [6] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/video/video.module
           [line] => 716
           [function] => convert_video
           [class] => video_zencoder
           [type] => ->
           [object] => video_zencoder Object
               (
                   [name:private] => Zencoder
                   [value:private] => video_zencoder
               )

           [args] => object(13)
       )

   [7] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/video/video.module
           [line] => 704
           [function] => _video_process_video
           [args] => object(13), object(2), object(4), array(1)
       )

   [8] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/video/video_widget.inc
           [line] => 300
           [function] => video_process_video
           [args] => object(13)
       )

   [9] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/video/video_widget.inc
           [line] => 182
           [function] => video_convert_process
           [args] => array(38)
       )

   [10] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/video/types/uploadfield/uploadfield_widget.inc
           [line] => 131
           [function] => video_widget_process
           [args] => array(38), array(5)
       )

   [11] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/form.inc
           [line] => 1063
           [function] => uploadfield_widget_process
           [args] => array(37), array(4), array(5), array(47)
       )

   [12] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/form.inc
           [line] => 889
           [function] => _form_builder_handle_input_element
           [args] => string(24), array(37), array(5), array(47)
       )

   [13] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/form.inc
           [line] => 930
           [function] => form_builder
           [args] => string(24), array(16), array(5)
       )

   [14] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/form.inc
           [line] => 930
           [function] => form_builder
           [args] => string(24), array(14), array(5)
       )

   [15] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/form.inc
           [line] => 406
           [function] => form_builder
           [args] => string(24), array(46), array(5)
       )

   [16] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/form.inc
           [line] => 121
           [function] => drupal_process_form
           [args] => string(24), array(46), array(5)
       )

   [17] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/modules/node/node.pages.inc
           [line] => 58
           [function] => drupal_get_form
           [args] => string(24), array(4)
       )

   [18] => Array
       (
           [function] => node_add
           [args] => string(14)
       )

   [19] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/menu.inc
           [line] => 348
           [function] => call_user_func_array
           [args] => string(8), array(1)
       )

   [20] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/index.php
           [line] => 18
           [function] => menu_execute_active_handler
           [args] =>
       )

)

Followed by the second Zencoder error:

Failed to queue file sites/default/files/videos/original/fox13-1.mp4 to Zencoder.


debug_backtrace() => Array
(
   [0] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/logging_alerts/emaillog/emaillog.module
           [line] => 109
           [function] => eval
       )

   [1] => Array
       (
           [function] => emaillog_watchdog
           [args] => array(10)
       )

   [2] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/module.inc
           [line] => 462
           [function] => call_user_func_array
           [args] => string(17), array(1)
       )

   [3] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/bootstrap.inc
           [line] => 966
           [function] => module_invoke
           [args] => string(8), string(8), array(10)
       )

   [4] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/video/plugins/video_zencoder/transcoders/video_zencoder.inc
           [line] => 94
           [function] => watchdog
           [args] => string(8), string(39), array(1), integer(1)
       )

   [5] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/video/video.module
           [line] => 716
           [function] => convert_video
           [class] => video_zencoder
           [type] => ->
           [object] => video_zencoder Object
               (
                   [name:private] => Zencoder
                   [value:private] => video_zencoder
               )

           [args] => object(13)
       )

   [6] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/video/video.module
           [line] => 704
           [function] => _video_process_video
           [args] => object(13), object(2), object(4), array(1)
       )

   [7] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/video/video_widget.inc
           [line] => 300
           [function] => video_process_video
           [args] => object(13)
       )

   [8] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/video/video_widget.inc
           [line] => 182
           [function] => video_convert_process
           [args] => array(38)
       )

   [9] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/sites/all/modules/video/types/uploadfield/uploadfield_widget.inc
           [line] => 131
           [function] => video_widget_process
           [args] => array(38), array(5)
       )

   [10] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/form.inc
           [line] => 1063
           [function] => uploadfield_widget_process
           [args] => array(37), array(4), array(5), array(47)
       )

   [11] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/form.inc
           [line] => 889
           [function] => _form_builder_handle_input_element
           [args] => string(24), array(37), array(5), array(47)
       )

   [12] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/form.inc
           [line] => 930
           [function] => form_builder
           [args] => string(24), array(16), array(5)
       )

   [13] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/form.inc
           [line] => 930
           [function] => form_builder
           [args] => string(24), array(14), array(5)
       )

   [14] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/form.inc
           [line] => 406
           [function] => form_builder
           [args] => string(24), array(46), array(5)
       )

   [15] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/form.inc
           [line] => 121
           [function] => drupal_process_form
           [args] => string(24), array(46), array(5)
       )

   [16] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/modules/node/node.pages.inc
           [line] => 58
           [function] => drupal_get_form
           [args] => string(24), array(4)
       )

   [17] => Array
       (
           [function] => node_add
           [args] => string(14)
       )

   [18] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/includes/menu.inc
           [line] => 348
           [function] => call_user_func_array
           [args] => string(8), array(1)
       )

   [19] => Array
       (
           [file] => /home2/utprepco/public_html/utprep/index.php
           [line] => 18
           [function] => menu_execute_active_handler
           [args] =>
       )

)

As far as the dimensions in the videos, I used the first of the dropdown list, however it's a customized value of 425x350 I entered in manually (basically the size of a YouTube video)

Jorrit’s picture

Thanks for your quick response! Logging & Alerts is a very useful module, I use if for all my Drupal sites.

I think I've found the problem. Could it be that the authenticated user does not have the override player dimensions permission?

In any case, I've fixed the bug in 6.x-5.x-dev.

utprep’s picture

The problem with giving the user that permission is I don't want to allow the user to have the option to pick a custom size, I want every user to use the default. Will the new dev release allow me to keep users using the default and still avoid this problem?

Jorrit’s picture

I did not mean that you should give that permission, I mean to check if your setup is like I think it is.

The current dev release (2012-Feb-25) should allow you to keep your settings the same and not have this bug.

utprep’s picture

Status: Active » Fixed

Looks like that did the trick! Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

gjmokcb’s picture

I'm having exactly this problem with latest version and latest dev version. No problem with user 1, but authenticated user can only upload if the override dimensions permission is set to yes, which is not workable for my site.

Jorrit’s picture

Is this the error that you are receiving?

Warning: Division by zero in _video_aspect_ratio() (line 432 of /var/www/drupal6/sites/video5.drupal6.local/modules/video/video.module).

Jorrit’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

I have found the problem and committed a fix. Can you try the next 6.x-5.x-dev release? It will be online within 12 hours.

Jorrit’s picture

Status: Postponed (maintainer needs more info) » Fixed

Closed because of lack of response.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.