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

[request] is there a way to use MediaInfo, ffmpeg without installing it inside the hosting system #15

Closed
ghost opened this issue Dec 9, 2013 · 10 comments

Comments

@ghost
Copy link

ghost commented Dec 9, 2013

Hi,

my hsoting provider refusre to install ffmpeg, and MediaInfo (my provider is : Hostinger).

then, if I let the parameter from stock, in videoJS,;
I have an error when I try to sync.
I have to uncheck all feature like synchronise meta date, or create the thumbnails.

is there a way to copy the MediaInfo software, in some part of my web site, and link it to the php by hand (instead of place it in system, usr, bin or ????)

thanks
Olivier

@xbgmsharp
Copy link
Collaborator

Hello

There is no alternative to ffmpeg to create poster and/or thumbnail.
Regarding MediaInfo there is libgetID3 in PHP but it lack a lot of feature that is why I change to MediaInfo.

Both programs are binary and can be install manual in your home.
Both programs require some library that will more likely need to be install.
As long as the binary are part of you PATH, it should work out of the box, independently from where it stand.
If not you will need to specify the correctly in the code.

@ghost
Copy link
Author

ghost commented Dec 11, 2013

Hi,

thanks for feedback.
with my hoster, I can have access only to a folder : public_html (this is my root where I place my piwigo web site), and all sub folder.
it is possible to place executable here (ex. public_html/bin), with proper right, and set some link to this in php ?

@xbgmsharp
Copy link
Collaborator

Having binary is not to much of a problem.
The problem will be the dependency such as library.
If you provide me the system version and architecture, I might be able to provide you a zip to upload in your bin path.
Do you have shell access?

@ghost
Copy link
Author

ghost commented Dec 12, 2013

Hi,
yes, I have a ssh console. I have acces only to my Home/myUserID, where there is public_html folder....

my system is under php 5.3.
the server (it is a sared server) is under linux. it report, when I do cat /etc/* -release : cloud linux 6.4

what can I give you as info ?

thanks for help.

@bgdz
Copy link

bgdz commented Jan 20, 2014

I need the same thing. Linus Centos x86_64. on a shared host (inmotionhosting).
When I click on the preview of the video I want, I get the video player (which works), but at the top of the page, I get this error:

Warning: strpos() [function.strpos]: Offset not contained in string in /home/[user]/public_html/[mydirectory]/include/functions_url.inc.php on line 765

Warning: Cannot modify header information - headers already sent by (output started at /home/[user]/public_html/[mydirectory]/include/functions_url.inc.php:765) in /home/[user]/public_html[mydirectory]/include/page_header.php on line 101

@xbgmsharp
Copy link
Collaborator

@bgdz The error is due to GetID3 library probably due to bad file format or an bug in the library.
Does this happen for all video? GetID3 library is not very efficient but it is in PHP. That is why i move to MediaInfo.

@orobin I assume you have a x86_64 system. You can check by running the uname command

# uname -a
Linux debian-dev 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux

I create zip by extracting the rpm from the CentOS6 version of MediaInfo. I uploaded in the Wiki.
https://github.com/xbgmsharp/piwigo-videojs/wiki/mediainfo-0.7.67.zip

# zip -r mediainfo-0.7.67.zip usr/*
  adding: usr/bin/ (stored 0%)
  adding: usr/bin/mediainfo (deflated 65%)
  adding: usr/lib64/ (stored 0%)
  adding: usr/lib64/libzen.so.0 (deflated 61%)
  adding: usr/lib64/libmediainfo.so.0.0.0 (deflated 59%)
  adding: usr/lib64/libzen.so.0.0.0 (deflated 61%)
  adding: usr/lib64/libmediainfo.so.0 (deflated 59%)
  adding: usr/share/ (stored 0%)
  adding: usr/share/doc/ (stored 0%)
  adding: usr/share/doc/libmediainfo0-0.7.67/ (stored 0%)
  adding: usr/share/doc/libmediainfo0-0.7.67/ReadMe.txt (deflated 51%)
  adding: usr/share/doc/libmediainfo0-0.7.67/License.html (deflated 56%)
  adding: usr/share/doc/libmediainfo0-0.7.67/History.txt (deflated 66%)
  adding: usr/share/doc/mediainfo-0.7.67/ (stored 0%)
  adding: usr/share/doc/mediainfo-0.7.67/History_CLI.txt (deflated 66%)
  adding: usr/share/doc/mediainfo-0.7.67/ReadMe_CLI_Linux.txt (deflated 40%)
  adding: usr/share/doc/mediainfo-0.7.67/License.html (deflated 55%)
  adding: usr/share/doc/libzen0-0.4.29/ (stored 0%)
  adding: usr/share/doc/libzen0-0.4.29/ReadMe.txt (deflated 21%)
  adding: usr/share/doc/libzen0-0.4.29/History.txt (deflated 62%)
  adding: usr/share/doc/libzen0-0.4.29/License.txt (deflated 46%)

To extract it run unzip command or upload all file to your server.

# unzip mediainfo-0.7.67.zip

You need after to ensure have all dependencies using the ldd command.

# ldd usr/bin/mediainfo
        linux-vdso.so.1 =>  (0x00007fffe29ff000)
        libmediainfo.so.0 => /usr/lib/libmediainfo.so.0 (0x00007f4777b0c000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f47778f5000)
        libzen.so.0 => /usr/lib/libzen.so.0 (0x00007f47776b1000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f4777495000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f477718e000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f4776f0b000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f4776cf5000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f477696b000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f47781d8000)
# ldd usr/lib64/libzen.so.0
        linux-vdso.so.1 =>  (0x00007fff2cfcf000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fed5af77000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fed5ac70000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fed5a9ed000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fed5a663000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fed5a44d000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fed5b3de000)
# ldd usr/lib64/libmediainfo.so.0
        linux-vdso.so.1 =>  (0x00007fff735ff000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f0cd032f000)
        libzen.so.0 => /usr/lib/libzen.so.0 (0x00007f0cd00ec000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f0ccfecf000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f0ccfbc8000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f0ccf946000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f0ccf5bb000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f0ccf3a5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f0cd0c0c000)

If you're using bash, you could invoke mediainfo this way using:

LD_LIBRARY_PATH=.:$LD_LIBRARY_PATH  usr/bin/mediainfo

If it works on shell, then you can modify the 'piwigo-videojs/include/mediainfo.php' file.
https://github.com/xbgmsharp/piwigo-videojs/blob/master/include/mediainfo.php#L30
If all ok, I will create a wiki page.

Regarding ffmpeg has way more dependency so not sure it is worth it.

# ldd /usr/bin/ffmpeg | wc -l
77

@L-B
Copy link

L-B commented Feb 23, 2014

Hello,

It would be very useful to be able to configure the location of the binaries.
Eg, in my case, on Solaris, it is /opt/csw/bin/ffmpeg. Modifying the source is not very convenient, whereas adding a field to enter it in the videojs configuration would be user-friendly without adding complexity to the plugin.

Thanks,

Laurent

@xbgmsharp
Copy link
Collaborator

Hello,
@L-B I will add a option for the location of the binaries. see issue #17
@orobin, @bgdz have get a chance to test the package?

@ghost
Copy link
Author

ghost commented Apr 10, 2014

Hi,

no, unfortunatly I could not do it works.
because video did not work really well, I decided to remove piwigo site web :o(

----- Mail original -----
De: "xbgmsharp" notifications@github.com
À: "xbgmsharp/piwigo-videojs" piwigo-videojs@noreply.github.com
Cc: "orobin" orobin@free.fr
Envoyé: Jeudi 10 Avril 2014 15:09:03
Objet: Re: [piwigo-videojs] [request] is there a way to use MediaInfo, ffmpeg without installing it inside the hosting system (#15)

Hello,
@L-B I will add a option for the location of the binaries.
@orobin , @bgdz have get a chance to test the package?


Reply to this email directly or view it on GitHub .

@xbgmsharp
Copy link
Collaborator

Not used, closing.
I will make it as a wiki page, it can help others

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

3 participants