Announcement

  •  » Extensions
  •  » [resolved] Did anyone successfully upload mp4 by VideJS

#1 2019-04-24 04:25:25

Foto
Member
2019-04-22
11

[resolved] Did anyone successfully upload mp4 by VideJS

Hi,

I put a have test.mp4 under galleries. The size of test.mp4 is about 350M, and I haved max the upload size to 1000M in pho.ini.

While sync I got following error:

Warning:  array_merge(): Argument #1 is not an array in /var/www/localhost/htdocs/piwigo/plugins/piwigo-videojs/admin/admin_sync.php on line 53

Notice:  Undefined index: output in /var/www/localhost/htdocs/piwigo/plugins/piwigo-videojs/admin/admin_sync.php on line 66

Warning:  array_merge(): Argument #1 is not an array in /var/www/localhost/htdocs/piwigo/plugins/piwigo-videojs/admin/admin_sync.php on line 78

Any advice? Thx

Piwigo version: 2.9.5
PHP version:
MySQL version:
Piwigo URL: http://

Offline

 

#2 2019-05-05 02:57:04

JohnAnderson
Member
2014-10-09
7

Re: [resolved] Did anyone successfully upload mp4 by VideJS

It’s not the size of the mp4. I had this same problem repeatedly with videojs 2.9. I never did get it to work. After spending hours on it, and researching the forms & github, I decided to revert back to videojs 2.8b. That works fine.

Deactivate videojs, then delete it, in the plugins admin panel.  Go to GitHub and either get the zip file for the 2.8b release, or clone it if you know how to do that.  Move the zip to your ../galleries/plugins folder. It should then appear in the plugins admin panel with the option to install it.

Sorry that is the best solution I could find. Maybe someone smarter than I will have a better idea!

Offline

 

#3 2019-05-14 05:19:44

Foto
Member
2019-04-22
11

Re: [resolved] Did anyone successfully upload mp4 by VideJS

Thanks JohnAnderson, I will try!

Offline

 

#4 2019-05-16 13:14:08

Foto
Member
2019-04-22
11

Re: [resolved] Did anyone successfully upload mp4 by VideJS

Well infact mp4 files works well in videojs, which cloned from github ( git://github.com/xbgmsharp/piwigo-videojs.git)

Here is my setup:

In LocalFiles Editor: local/config/config.inc.php

/* https://github.com/xbgmsharp/piwigo-vid … -configure */
$conf['upload_form_all_types'] = true;
$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_. ]+$/';
$conf['show_exif'] = true;
$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',
  'formatprofile',
  'codecid',
  'frame_rate',
  'latitude',
  'longitude',
  'make',
  'model',
  'playtime_seconds',
  'sampling_rate',
  'type',
  'resolution',
  'rotation',
  );

1. I place my photos in a another larger disk partition, so I make soft link to the piwigo/galleries, but not copy.
2. The best way of  synchronisation is the "Quick local synchronisation" entered from Home->mainmenu-> administration

Here is my final solution for mov file (by my iphone):

1. Rename mov to mp4 file directly.
   I don't to transcode mov to mp4, because it will lose all the gps data. so I just keep it for one day.

2. "Quick local synchronisation" , by now it is not enough, you will find all the mp4(mov)  photo is just a video logo.

3. In plugin Photos->the Batch Manager, select the mp4 files(renamed from mov) , and from the "Action" button, select "Videos":
   Be sure to select "Poster->add film effect", otherwise you wont play it.
   Also, for me, set "Poster-> Create a poster at position in second" to 1, default is 4, but some of my mov are less than 4 seconds and will cause error.

by now, all my videos including mov mp4 works.

btw don't set player to video.js v7, doesn't work. videojs.v6/v5 works well.

About 504 gateway time-out, just use `top` to check if the exiftool precession is finished.

Last edited by Foto (2019-05-16 13:47:36)

Offline

 

#5 2022-03-15 16:05:00

rajdude
Member
2021-05-18
71

Re: [resolved] Did anyone successfully upload mp4 by VideJS

HI John,
I am having the same trouble.
I tried your suggestion but does not work....videojs plugin keeps giving me errors saying mediainfo is not installed, when it is really installed.

I can confirm that mediainfo is correctly installed, if I install version 2.9

I have posted on Github also, but I think the developer is too busy or maybe in a different time zone :-(


JohnAnderson wrote:

It’s not the size of the mp4. I had this same problem repeatedly with videojs 2.9. I never did get it to work. After spending hours on it, and researching the forms & github, I decided to revert back to videojs 2.8b. That works fine.

Deactivate videojs, then delete it, in the plugins admin panel.  Go to GitHub and either get the zip file for the 2.8b release, or clone it if you know how to do that.  Move the zip to your ../galleries/plugins folder. It should then appear in the plugins admin panel with the option to install it.

Sorry that is the best solution I could find. Maybe someone smarter than I will have a better idea!

Offline

 

#6 2022-03-20 22:57:23

cryopad
Piwigo Team
Grenoble, France
2015-11-01
166

Re: [resolved] Did anyone successfully upload mp4 by VideJS

Hello,

VideoJS 2.9b available on GitHub works correctly with Piwigo 12.2.0 and the native browser player option.

For configuring it, the following wiki page might help you get mediaInfo recognised.

Replacing the .MOV extension with .MP4 is not recommended because they are different containers and some players are unable to read 'wrong' MP4 files. The Piwigo iOS app converts automatically .MOV files to .MP4 before uploading them.

All the best,
Eddy


If you enjoy Piwigo for iOS…
➤ We would appreciate an AppStore review.
➤ Comments, suggestions ? Tell us on GitHub…
➤ Not yet available in your language ? Help us translate it…

Offline

 

#7 2022-03-22 17:01:52

rajdude
Member
2021-05-18
71

Re: [resolved] Did anyone successfully upload mp4 by VideJS

Thanks Eddy,

I have already tried those steps. Somehow mediainfo is STILL not found by VideoJS.

VideoJS does work. I mean it shows the video inside Piwigo. However I also would like the automatic thumbnail generation. That uses FFmepg. That is not installed on my webhost. I read that it is rather difficult to install inside my home directory...and.......I am afraid that just like after spending hours trying to install mediainfo inside my home directory, it still does not work for VideoJS (it does work on a terminal window)....I guess it is not worth trying to get FFmpeg installed.

Anyway, I have put in a ticket with my web hosting company, maybe they can install mediainfo and FFmpeg inside /usr/bin


bye
-Raj

Offline

 

#8 2022-03-22 20:53:47

cryopad
Piwigo Team
Grenoble, France
2015-11-01
166

Re: [resolved] Did anyone successfully upload mp4 by VideJS

Hi Raj,

Have you checked that mediaInfo is executable by www (or any user?) in your home folder? As for FFmpeg, you can easily install a static build on your server (no compilation needed). Make it executable and set its path in LocalFile Editor as described in the wiki page I mentioned. That should work.

All the best,
Eddy


If you enjoy Piwigo for iOS…
➤ We would appreciate an AppStore review.
➤ Comments, suggestions ? Tell us on GitHub…
➤ Not yet available in your language ? Help us translate it…

Offline

 

#9 2022-03-23 03:20:58

rajdude
Member
2021-05-18
71

Re: [resolved] Did anyone successfully upload mp4 by VideJS

Hi Eddy,
I got this reply from my web host:

FFMPEG is a resource-intensive application that is not supported on our shared hosting plans.

Oh well!

mediainfo executable is there, and also executes just fine (will post a screenshot tomorrow)
But I will try to install FFmpeg like you mention later today.

Anyway, ffmpeg is the one which is really needed for thumbnail generation.
I can live without exif data from mediainfo.


One question:

Does VideoJS support HEVC a.k.a. MPEG5 video files?
Today I uploaded a few and they do not show video, Audio does play.


Thanks
-Raj

Offline

 

#10 2022-03-23 07:33:19

cryopad
Piwigo Team
Grenoble, France
2015-11-01
166

Re: [resolved] Did anyone successfully upload mp4 by VideJS

Hi Raj,

HEVC video files are still not supported by most servers so the MP4/H.264 format remains the most appropriate choice for the moment. This also applies to new formats of images. We must be patient.

All the best,
Eddy


If you enjoy Piwigo for iOS…
➤ We would appreciate an AppStore review.
➤ Comments, suggestions ? Tell us on GitHub…
➤ Not yet available in your language ? Help us translate it…

Offline

 

#11 2022-03-23 15:01:00

rajdude
Member
2021-05-18
71

Re: [resolved] Did anyone successfully upload mp4 by VideJS

Hi Eddy,
I worked on this a bit today. Here are some screenshots:

Showing mediainfo executable and its permissions
This should be fine, right?

https://i.imgur.com/ThI44AL.png

Showing that mediainfo does execute, but needs something in its path. I remember I had to add something to the path to make this error go away....but now I have forgotten what I need to include in the path :-(
Do you know?

https://i.imgur.com/q509Jiv.png

As for FFmpeg, I installed (actually copied) a static build here. Here I am showing that it does work

https://i.imgur.com/MmKdrNU.png


I tried to change the path in VideoJS' config, like this...

https://i.imgur.com/62sGgjX.png

...but it gives me an error the moment I hit submit :-( Looks like it needs the path for mediainfo's dependencies.

Interestingly, at the bottom, you can see there is a green checkbox for ffmpeg. Guess that means at least ffmpeg will work?

https://i.imgur.com/ZxCZfKK.png

Offline

 

#12 2022-03-23 22:58:26

cryopad
Piwigo Team
Grenoble, France
2015-11-01
166

Re: [resolved] Did anyone successfully upload mp4 by VideJS

Hi Raj,

The permissions look fine and you installed FFmpeg. Great!

Among the error messages, some tell that exiftool is not installed. It is extremely easy to install. You download the latest version from here. Upload the .tar file to your Piwigo server as you did with FFmpeg. Then, you extract the tar with 'tar -xvf Image-ExifTool-12.30.tar' and then enter the absolute path in your VideoJS configuration.

As for mediainfo, it cannot be executed without the library file libmediainto.so.0. Here is how I installed it on my virtual server:

- Download the all-in-one package source code v21.09 from the official web site
- Upload the archive to the server in /home directory   
- Upgrade instance so that it is powerful enough to compile mediainfo
- tar -xvf MediaInfo_CLI_21.09_GNU_FromSource.tar
- cd MediaInfo_CLI_GNU_FromSource
- ./CLI_Compile.sh
- Copy /tmp/MediaInfo_CLI_GNU_FromSource/MediaInfo/Project/GNU/CLI/mediainfo to /home folder   
- Add 'Execute' rights to mediainfo file (755)
- Enter the path to mediainfo in the VideoJS configuration
- Revert to a cheaper (less powerful) server

Hope this helps.


If you enjoy Piwigo for iOS…
➤ We would appreciate an AppStore review.
➤ Comments, suggestions ? Tell us on GitHub…
➤ Not yet available in your language ? Help us translate it…

Offline

 

#13 2022-03-24 14:49:25

rajdude
Member
2021-05-18
71

Re: [resolved] Did anyone successfully upload mp4 by VideJS

Hi Eddy,
Ok thanks, I will try to install exiftool also.


Meanwhile about mediainfo:

A few days back, I was able to install all the dependencies of mediainfo successfully and was able to test mediainfo as described here:

https://github.com/Piwigo/piwigo-videoj … ing-system

There is a catch though:
Seems to me defining the absolute path is not enough, it needs the dependency libraries included in the PATH variable.

mediainfo will NOT work until a path is defined. I read that somewhere (cannot find that article). However, I remembered it. Here is the command I use to define that path

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/rajivm/app/mediainfo/usr/lib64
After defining that path, mediainfo actually worked perfectly fine. See screenshot below.

Now, here are the problems:
1. That path is only inside my terminal session.
2. It vanishes the moment I close my terminal session (of course)
3. That path is not visible to the VideoJS plugin

Is there a possibility of defining the path inside VideoJS or maybe Piwigo?


https://i.imgur.com/1XnVU6y.png

Offline

 

#14 2022-03-24 15:23:56

rajdude
Member
2021-05-18
71

Re: [resolved] Did anyone successfully upload mp4 by VideJS

HI Eddy,
I just installed exiftool and now it looks like I am getting somewhere!
See screenshot below :-)

PS: Does not look like mediainfo will work without that PATH defined somewhere....and I do not know where to define it :-(
Do you know?


https://i.imgur.com/Av7Ut4B.png

Offline

 

#15 2022-03-24 15:33:21

rajdude
Member
2021-05-18
71

Re: [resolved] Did anyone successfully upload mp4 by VideJS

Uh Oh! :-(
I guess I was too optimistic.
When I ran it with the simulation checkbox unchecked, it threw up errors in red :-(
Interestingly, it has actually created the poster jpg files in the file system, but they all are 0 bytes!

See the error

https://i.imgur.com/D9637rQ.png

Offline

 
  •  » Extensions
  •  » [resolved] Did anyone successfully upload mp4 by VideJS

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2022 · Contact