Piwigo Bugtracker

Piwigo bug tracker has moved to Github

This bugtracker is kept to provide history on old issues.


View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002943Piwigometadatapublic2013.07.14 03:312015.01.12 09:40
Reporterxbgmsharp 
Assigned Toplg 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSDebianOS Version7.0
Product Version2.5.2 
Target Version2.7.4Fixed in Version2.7.4 
Summary0002943: Trigger for element without EXIF metadata
DescriptionThis will allow plugin to sync and show metadata for any file that don't have a EXIF metadata.
Steps To ReproduceInstall a plugin.
Add a file that is not a image base on the plugin.
Get to the vieww page an d click on metadata it is empty.
TagsNo tags attached.
browserany
Database engine and version
PHP version5.4.4
Web serverApache 2.2.22
Attached Files? file icon functions_metadata.inc.php [^] (8,473 bytes) 2014.10.19 21:45
? file icon picture_metadata.inc.php [^] (4,577 bytes) 2014.10.19 21:45

- Relationships

-  Notes
(0007099)
xbgmsharp (reporter)
2013.07.14 03:50
edited on: 2014.10.19 21:46

I wish to show metadata/atom from the video like it is done for image.

(0007687)
xbgmsharp (reporter)
2014.10.19 21:43

I finally got time to provide a path for this.

I modify those 2 files:
include/picture_metadata.inc.php
include/functions_metadata.inc.php

I add an new function heavily from EXIF metadata.
I try to make it more generic.

In your configuration, add the following.

$conf['show_extra_metadata'] = true;
$conf['show_extra_metadata_fields'] = array(
  'bitrate',
  'channel',
  'date_creation',
  'display_aspect_ratio',
  'duration',
  'filesize',
  'format',
  'frame_rate',
  'latitude',
  'longitude',
  'make',
  'model',
  'playtime_seconds',
  'sampling_rate',
  'type',
);

Then in the plugin, i call the new trigger.

// Hook to sync metadata
add_event_handler('format_metadata', 'vjs_format_exif_data', EVENT_HANDLER_PRIORITY_NEUTRAL, 3);
(0007688)
xbgmsharp (reporter)
2014.10.20 11:21

I found a easier solution.

Add the following in your config
$conf['show_exif_fields'] = array(
  'Make',
  'Model',
  'ExifVersion',
  'Software',
  'DateTimeOriginal',
  'FNumber',
  'ExposureBiasValue',
  'FILE;FileSize',
  'ExposureTime',
  'Flash',
  'ISOSpeedRatings',
  'FocalLength',
  'FocalLengthIn35mmFilm',
  'WhiteBalance',
  'ExposureMode',
  'MeteringMode',
  'ExposureProgram',
  'LightSource',
  'Contrast',
  'Saturation',
  'Sharpness',
  'bitrate',
  'channel',
  'date_creation',
  'display_aspect_ratio',
  'duration',
  'filesize',
  'format',
  'frame_rate',
  'latitude',
  'longitude',
  'make',
  'model',
  'playtime_seconds',
  'sampling_rate',
  'type',
  );

Patch include/functions_metadata.inc.php as follow:

# diff ../../include/functions_metadata.inc.php ../../include/functions_metadata.inc.php.bck
153c153
< if ($exif = @read_exif_data($filename) or $exif = trigger_change('format_exif_data', $exif=array(), $filename, $map))
---
> if ($exif = @read_exif_data($filename))


And now you can see the video Metadata using VideoJS.

https://github.com/xbgmsharp/piwigo-videojs/commit/b6a6758ae0d346e67cfa1430628a7411cca1a3d8 [^]
(0007731)
xbgmsharp (reporter)
2015.01.06 16:12

Any hope to get this include in 2.8 release?
(0007733)
rvelices (developer)
2015.01.07 12:11

probably not in this form (I think we said on the forum some time ago)
(0007734)
xbgmsharp (reporter)
2015.01.07 13:22
edited on: 2015.01.07 13:22

There is no reply on the forum. http://piwigo.org/forum/viewtopic.php?id=23213 [^]
It is a one line patch.
Do you prefer to duplicate code?

# diff ../../include/functions_metadata.inc.php ../../include/functions_metadata.inc.php.bck
153c153
< if ($exif = @read_exif_data($filename) or $exif = trigger_change('format_exif_data', $exif=null, $filename, $map))
---
> if ($exif = @read_exif_data($filename))

(0007741)
svn (reporter)
2015.01.12 09:38

[Subversion] r30887 by plg on trunk

-----[Subversion commit log]----------------------------------------------------
feature 2943: ability to display metadata (via plugin) even if Piwigo core
finds no EXIF. Patch by xbgmsharp (will be used by plugin videoJS).
(0007742)
svn (reporter)
2015.01.12 09:39

[Subversion] r30888 by plg on branch 2.7

-----[Subversion commit log]----------------------------------------------------
merge r30887 from trunk to branch 2.7

feature 2943: ability to display metadata (via plugin) even if Piwigo core
finds no EXIF. Patch by xbgmsharp (will be used by plugin videoJS).


- Issue History
Date Modified Username Field Change
2013.07.14 03:31 xbgmsharp New Issue
2013.07.14 03:31 xbgmsharp browser => any
2013.07.14 03:31 xbgmsharp PHP version => 5.4.4
2013.07.14 03:31 xbgmsharp Web server => Apache 2.2.22
2013.07.14 03:50 xbgmsharp Note Added: 0007099
2013.07.18 08:43 xbgmsharp Note Edited: 0007099
2014.10.19 21:43 xbgmsharp Note Added: 0007687
2014.10.19 21:45 xbgmsharp File Added: functions_metadata.inc.php
2014.10.19 21:45 xbgmsharp File Added: picture_metadata.inc.php
2014.10.19 21:46 xbgmsharp Note Edited: 0007099
2014.10.20 11:21 xbgmsharp Note Added: 0007688
2014.11.19 12:06 flop25 Target Version => 2.7.2
2015.01.06 16:12 xbgmsharp Note Added: 0007731
2015.01.07 12:11 rvelices Note Added: 0007733
2015.01.07 13:22 xbgmsharp Note Added: 0007734
2015.01.07 13:22 xbgmsharp Note Edited: 0007734
2015.01.12 09:38 svn Checkin
2015.01.12 09:38 svn Note Added: 0007741
2015.01.12 09:39 svn Checkin
2015.01.12 09:39 svn Note Added: 0007742
2015.01.12 09:40 plg Assigned To => plg
2015.01.12 09:40 plg Status new => closed
2015.01.12 09:40 plg Resolution open => fixed
2015.01.12 09:40 plg Fixed in Version => 2.7.4
2015.01.12 09:40 plg Target Version 2.7.2 => 2.7.4


Copyright © 2000 - 2017 MantisBT Team
Contact
Powered by Mantis Bugtracker