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
Posted by J0ris on November 8th, 2010 - 09:25I used the [code] tag and it turned all the linefeed to <br /> which are subsequently escaped as <br /> which makes them rendered as html in stead of linefeeds.
Problem in the order of filters?
bbcode
Posted by forgacs on November 8th, 2010 - 11:47We have changed a few things in the process of bbcode. Now seems ok.
Scene still timecode
Posted by forgacs on November 8th, 2010 - 12:36Thank J0ris. Good catch. I have implemented the fix in the source code.
Scene still timecode
Posted by tzoon on December 1st, 2010 - 13:11In 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
Posted by Robert on December 1st, 2010 - 13:23This 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.