Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mediainfo error #172

Open
matthieuambry opened this issue Feb 13, 2021 · 1 comment
Open

mediainfo error #172

matthieuambry opened this issue Feb 13, 2021 · 1 comment

Comments

@matthieuambry
Copy link

matthieuambry commented Feb 13, 2021

Using a brand new ubuntu 20.04 and a mediainfo also.

$ mediainfo --version
MediaInfo Command line
MediaInfoLib - v19.09

the plugin raises errors.
It seems the mediainfo XML output changed.

I found a solution changing $xml->File with $xml->media in ./include/mediainfo.php

Note : using PIWIGO 11 and plugin 2.8
If this can help someone ....

@kuzco1
Copy link

kuzco1 commented Feb 15, 2021

Have tried this on my test-system, but unfortunately, it does not work in my environement.
I am running:

Piwigo 11.3.0 
Betriebssystem: WINNT
PHP: 7.4.6 (Info anzeigen) [2021-02-15 18:31:10]
MySQL: 5.5.5-10.5.8-MariaDB [2021-02-15 16:31:10]
Grafikbibliothek: GD bundled (2.1.0 compatible)

Mediainfo is in path.

There was always an issues with linux/windows - due to " and ' in the code, but this was solved.
Linux Line 32:
$output = shell_exec($sync_options['mediainfo'] ." --Full --Output=XML --Language=raw "". $filename."" 2>&1 ");
Windows:
$output = shell_exec($sync_options['mediainfo'] ." --Full --Output=XML --Language=raw ". $filename." 2>&1 ");

Error is here:
$xml = new SimpleXMLElement($output);

Warning: SimpleXMLElement::__construct(): Entity: line 1: parser error : Start tag expected, '<' not found in C:\piwigo\plugins\piwigo-videojs\include\mediainfo.php on line 35
Warning: SimpleXMLElement::__construct(): 'mediainfo' is not recognized as an internal or external command, in C:\piwigo\plugins\piwigo-videojs\include\mediainfo.php on line 35
Warning: SimpleXMLElement::__construct(): ^ in C:\piwigo\plugins\piwigo-videojs\include\mediainfo.php on line 35
Mediainfo error reading file. Is MediaInfo install? Is MediaInfo in path?
Is the video accessible & readable, Try to run the command manually.
mediainfo --Full --Output=XML --Language=raw './galerien/Ausfluege_und_Events/2021/06_09_Test/2021_04_12_10_18_38_P4122116.mp4'
output: 'mediainfo' is not recognized as an internal or external command, operable program or batch file.

Running the command
mediainfo --Full --Output=XML --Language=raw './galerien/Ausfluege_und_Events/2021/06_09_Test/2021_04_12_10_18_38_P4122116.mp4'
will result in:
<?xml version="1.0" encoding="UTF-8"?> <MediaInfo xmlns="https://mediaarea.net/mediainfo" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://mediaarea.net/mediainfo https://mediaarea.net/mediainfo/mediainfo_2_0.xsd" version="2.0"> <creatingLibrary version="20.03" url="https://mediaarea.net/MediaInfo">MediaInfoLib</creatingLibrary> </MediaInfo>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants