Closed (fixed)
Project:
Derivatives API
Version:
7.x-1.0-beta1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
12 Sep 2011 at 18:51 UTC
Updated:
4 Mar 2012 at 19:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
slashrsm commentedHm... I see the problem, but this is just a notice, so module should still work. Does it?
I'll fix this Notice in the following days.
Comment #2
dlumberg commentedThe function isn't actually getting passed the $file object. As a result I'm getting a bunch of these in the log from cron running.
I've got the 7.x.2.0-unstable1 version of media and the 7.x.-1.x-dev file_entity modules installed if that makes a difference
EDIT: Actually It might not have been cron because all of the notices were coming at the same time from the past...
Comment #3
slashrsm commentedCan you post exported preset?
Comment #4
dlumberg commentedAll I've changed is to turn derviatives of derivatives off (I think). I'm on IRC right now if you want to chat.
Comment #5
slashrsm commentedHave you managed to fix this?
Comment #6
dlumberg commentedNot Yet, I think it's some problem with my filesystem because I'm getting a bunch of $file class errors from different modules on uploading anything now.
I'll close this and try and update it when I figure out what happened.
Comment #7
slashrsm commentedOK. Let me know if you need any more support.
Comment #8
svla299 commentedI keep getting these errors:
Notice: Undefined property: stdClass::$media_derivatives in media_derivatives_derivative_support() (line 203 of /path/to/drupal/sites/all/modules/media_derivatives/plugins/media_derivatives.conditions.inc).
Notice: Undefined property: stdClass::$media_derivatives in media_derivatives_derivative_support() (line 212 of /path/to/drupal/sites/all/modules/media_derivatives/plugins/media_derivatives.conditions.inc).
Errors in lines 203,213 in media_derivatives.conditions.inc occur at $file->media_derivatives['is_derivative']
Can anyone help?
Comment #9
svla299 commentedComment #10
slashrsm commentedCan you tell which modules/versions do you use? Can you attach exported derivative?
Comment #11
svla299 commentedMy modules/versions installed are:
Derivatives API 7.x-1.x-dev, Media 7.x-2.x-dev, Simple ffmpeg engine 7.x-1.x-dev, File entity 7.x-2.x-dev
Export is:
$preset = new stdClass;
$preset->disabled = FALSE; /* Edit this to true to make a default preset disabled initially */
$preset->api_version = 1;
$preset->machine_name = 'to_avi';
$preset->engine = 'media_ffmpeg_simple';
$preset->engine_settings = array(
'ffmpeg_options' => '',
'ffmpeg_out_options' => '-ss 00:00:00 -t 00:03:00',
'ffmpeg_extension' => 'avi',
);
$preset->conditions = array(
0 => 'file_type',
1 => 'derivatives_of_derivatives',
);
$preset->conditions_settings = array(
'type' => 'video',
'encode_derivatives' => 0,
);
$preset->events = array(
0 => 'file_insert',
);
$preset->events_settings = array();
$preset->scheduler = 'scheduler_immediate';
$preset->scheduler_settings = array();
$preset->settings = array(
'type' => '1',
'recursive_delete' => 1,
'delete_source' => 0,
'user' => '0',
);
Despite the above mentioned messages, I have noticed that the derivative is created in the filesystem. However I could not see it so I thought it was due to the warnings. The solution was to change the File type into Managed since Unmanaged was initially selected.
The reason I thought of using Derivatives API is to cut a long video with FFmpeg into shorter chunks of 20 min duration then process each chunk in order to remove silence and motionless parts. Do you think Derivatives API can serve this purpose?
Comment #12
slashrsm commentedCan you check if attached patch eliminates those notices?
Derivatives API will not solve your use case out of the box, but will definitely help you to create your own solution.
Comment #13
svla299 commentedThank you! The patch works and eliminates the notices.
I have already started working on the assignment using the module.
Comment #14
slashrsm commentedGreat. Commited to 7.x-1.x: http://drupalcode.org/project/media_derivatives.git/commit/d9805b4
Feel free to contact me if you encounter any problems.