Timecodes for SCENE stills always zero

08Nov2010

When stills are generated from scenes the timecode that ends up in the metadata for the still is always zero.

This is the flow:

mediamosa_job_server.inc get_still_string()
$scene_sec = (int)($scene_frame/25);
$scenes[] = $scene_sec;

foreach ($scenes as $scene) {
fwrite($fh, $scene . "\n");

mediamosa_job.rest.inc do_call()
mediamosa_job_scheduler.inc run_parse_queue()
mediamosa_job_scheduler.inc parse_queue()
mediamosa_job_scheduler.inc check_status_all_servers()
mediamosa_job_scheduler.inc update_server_job_status()
mediamosa_job_scheduler.inc add_still_to_db()
while (!feof($fh)) {
$scenes[] = fgets($fh);
mediamosa_asset_mediafile_still.inc create()
array(
'value' => $sec,
'prop_name' => mediamosa_asset_mediafile_metadata::STILL_TIME_CODE,
'type' => mediamosa_asset_mediafile_metadata_property_db::TYPE_INT,
),
mediamosa_asset_mediafile_metadata.inc create_mediafile_multiple_metadata()
mediamosa_asset_mediafile_metadata.inc create_mediafile_metadata()
elseif ($type == mediamosa_asset_mediafile_metadata_property_db::TYPE_INT) {
try {
$fields[mediamosa_asset_mediafile_metadata_db::VAL_INT] = mediamosa_type::check($prop_name, mediamosa_type::TYPE_INT, $value);
}
catch (mediamosa_exception_error $e) {
$fields[mediamosa_asset_mediafile_metadata_db::VAL_INT] = 0;
}
}

The problem is that the timestamp is stored like "27\n" which is not an int so is set to 0.
My fix was to change "$scenes[] = fgets($fh);" to "$scenes[] = intval(fgets($fh));" in mediamosa_job_scheduler.inc add_still_to_db()

Comments

bbcode

I used the [code] tag and it turned all the linefeed to <br /> which are subsequently escaped as &lt;br /&gt; which makes them rendered as html in stead of linefeeds.

Problem in the order of filters?

bbcode

We have changed a few things in the process of bbcode. Now seems ok.

Scene still timecode

Thank J0ris. Good catch. I have implemented the fix in the source code.

Scene still timecode

In which version of the source code is this/will this be implemented? We kinda need it on the richmedia demo environment.

This fix is currently in

This fix is currently in 2.2.7 RC4. Will be releasing release candidate 4 later today also with other fixes reported by J0ris. Also the migration script is currently broken in RC3, will be resolved by RC4 as well.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.