Hello,
As I'm sure many others are, I am migrating over from Gallery3. I was able to get my photos imported into the new install of Piwigo using menalto2piwigo plugin, but I am having difficulty getting the videos to show up
I have tried using VideoJS, but when I tell it to sync on a simulated run, it doesn't show any imported videos. I believe all of my videos are in .MP4 extension.
I'm on Dreamhost shared hosting plan. I did a manual install of Piwigo. I have the binary path for FFMPEG set, but there doesn't seem to be an install of Mediainfo on the server. Does Mediainfo have to be installed?
Any ideas?
Thanks
Jason
Piwigo version: 2.7
PHP version: 5.4
MySQL version: 5.1.56
Piwigo URL: http://cotting.us/piwigo
Offline
Hello
Never used that plugin, but you might need to set your local config to sync files with mp4 extension
media info is just to gather metadata from the video
Offline
Hello
Thanks for responding
I'm afraid I don't know how to proceed with what you suggested. "Set your local config to sync files with the mp4 extension". I looked in the sync tab and didn't see anything about file types.
Could you point me in the right direction for that please?
Thank you
Jason
Offline
Hello again
I was able to make some progress. I have Ubuntu 12.04 running on my home server and the same is running on my host DreamHost.
I was able to get videos to work first on my home server, but its not something I want the outside world coming to visit.
Something that took some investigating on my part to understand is the use of the Localfiles Editor Plugin. For the sake of other who may run into this trouble, I added these two lines to it:
$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_. ]+$/';
$conf['upload_form_all_types'] = true;
There is a space included in there because, well I unfortunately have spaces in my video file names. I need to work on that habit.
I have both ffmpeg and mediainfo installed on my home server. The video I put on there is showing sideways, however the video poster is oriented correctly. It was recorded on a -//:---\spam and the video plays on the site sideways where it is now taller than it is wide. However, the videos I recorded with a camcorder are oriented correctly. That is a secondary problem for now, getting the orientation fixed.
The problem I now have is trying to get the videos to work on my host. It does not have mediainfo on it, but it does have ffmpeg. The settings within the videojs player shows a green checkmark next to the path for ffmpeg, and I have verified with my host's Wiki page that the path is correct. From what I understand, mediainfo is not required to make the video play.
When I go to the gallery where there is a video, it doesn't show a poster for it. Its my understanding that ffmpeg will now add a poster for the video. It does automatically create the pwg_representative subdirectory for me, but it is empty. The other problem on my host, when I go to play a video, it says:
"The video could not be loaded, either because the server or network failed or because the format is not supported."
I tried the exact same video on my home install and it works fine. So that tells me that the encoding is ok. The videos are mp4s.
What else can I try
Thanks
Jason
Offline
I notify the author, xbgmsharp
Offline
Hello,
Thanks using VideoJS plugin and giving feedback.
I updated the documentation to details how to allow special character, but the documentation state:
"The video clip must be a support format (mp4, ogg, webm or MP4, OGG, WEBM) and must contain no space neither special character."
https://github.com/xbgmsharp/piwigo-vid … equirement
MediaInfo must be install, if you don't want to populate the database manually.
Here how to install both tools, https://github.com/xbgmsharp/piwigo-vid … rnal-tools
As you point out, those external binary are not need to play video.
However the metadata injected into PWG via MediaInfo is used on play, so you must populate the database manually.
This is to avoid parsing the video on play. The mandatory metadata to play are Width and Height.
Regarding the rotation, the plugin detect the rotation parameter and import it into PWG.
Using the photo edit page, you can see all those details.
https://github.com/xbgmsharp/piwigo-vid … photo-edit
If the rotation metadata is present and the rotation sub-plugin is activate then the video will be rotate.
It is useful for video record on mobile device.
The sub-plugin can be deactivate in the configuration page of the plugin.
https://github.com/xbgmsharp/piwigo-vid … ojs-plugin
To fix you video problem, first try to play the VideoJS demo page and see if it play correctly. the demo page is located at:
/piwigo/plugin/piwigo-videojs/videojs/demo.html
Then I would suggest you run MediaInfo and FFMPEG manually and check the output is valid.
Also depending on your hosting, you need to check some details, https://github.com/xbgmsharp/piwigo-vid … laying-mp4 and
https://github.com/xbgmsharp/piwigo-vid … -or-piwigo
Your understanding is correct, FFMPEG is used to generate the poster and the thumbnail and it does create the 'pwg_representative' subdirectory for you if possible.
What is you the output when you try to synchronize the video? Do you have any errors/warnings?
You could use handbrake http://handbrake.fr/ to check the actual codec use of your video.
MP4 is an extension not a codec. The video must be encode in H264.
Video from iPhone or Android and GoPro works straight out of the box using VideoJS
Hope this helps.
Last edited by xbgmsharp (2014-10-18 09:54:26)
Offline
Thanks taking the time to write all that information in your post, as well as all the work you did to develop the plugin. I will try working on some of these things.
Jason
Offline
Hello
I've changed my hosting from a shared plan at DreamHost to a Virtual Private Server (VPS) at DreamHost. This allows me to install Mediainfo.
sudo apt-get install mediainfo doesn't work. It produces this:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package MediaInfo
So I followed your instructions for installing Mediainfo from here:
https://github.com/xbgmsharp/piwigo-vid … -2-install
I noticed there is a typo in the dpkg line, there needs to be a space between the first two .deb files
After installing, I try to run mediainfo from the command line and I get this:
mediainfo: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /usr/lib/libmediainfo.so.0)
I'm not sure what to do
Thanks
Jason
Offline
Hello.
FFMPEG can be install the distribution repository.
# apt-get install ffmpeg
apt-get is case sensitive. it should be:
# apt-get install mediainfo
The Debian 7 stable distribution include a too old version of it. https://packages.debian.org/wheezy/mediainfo
MediaInfo must be install manually.
This sample is for Debian 7 x64.
Be sure to download the correct version according to your distribution and your architecture.
# wget http://mediaarea.net/download/binary/libmediainfo0/0.7.70/libmediainfo0_0.7.70-1_amd64.Debian_7.0.deb # wget http://mediaarea.net/download/binary/mediainfo/0.7.70/mediainfo_0.7.70-1_amd64.Debian_7.0.deb # wget http://mediaarea.net/download/binary/libzen0/0.4.29/libzen0_0.4.29-1_amd64.Debian_7.0.deb # dpkg -i libzen0_0.4.29-1_amd64.Debian_7.0.deb libmediainfo0_0.7.70-1_amd64.Debian_7.0.deb mediainfo_0.7.70-1_amd64.Debian_7.0.deb
Offline
Hello
Thanks for writing me back
I have discovered that I am on Debian 6. My hosting provider has plans to move to Ubuntu 12.04, but they did not say when that will happen.
The mediainfo package is not available for Debian 6 as it is for 7 using apt-get. I managed to install mediainfo, libmediainfo0, and libzen0 intended for my distro, and the plugin still does not play videos. The videos are added and a poster is created though. When I go to play the movie it says "The video could not be loaded, either because the server or network failed or because the format is not supported". It may be that the it just doesn't work on Debian 6. I have no idea.
Here is where I got the files for Debian 6:
http://mediaarea.net/en/MediaInfo/Download/Debian
When I run mediainfo from the command line, it works with no errors. Here is a sample output when I tried a video file from the command line
General Complete name : miamovie.mp4 Format : MPEG-4 Format profile : Base Media / Version 2 Codec ID : mp42 File size : 56.5 MiB Duration : 49s 116ms Overall bit rate mode : Variable Overall bit rate : 9 650 Kbps Encoded date : UTC 2013-01-19 16:49:46 Tagged date : UTC 2013-01-19 16:51:16 Writing application : HandBrake 0.9.8 2012071800 Video ID : 1 Format : AVC Format/Info : Advanced Video Codec Format profile : Main@L4.0 Format settings, CABAC : Yes Format settings, ReFrames : 4 frames Codec ID : avc1 Codec ID/Info : Advanced Video Coding Duration : 49s 116ms Bit rate : 9 482 Kbps Width : 1 440 pixels Height : 1 080 pixels Display aspect ratio : 16:9 Frame rate mode : Variable Frame rate : 29.889 fps Minimum frame rate : 9.990 fps Maximum frame rate : 29.980 fps Color space : YUV Chroma subsampling : 4:2:0 Bit depth : 8 bits Scan type : Progressive Bits/(Pixel*Frame) : 0.204 Stream size : 55.5 MiB (98%) Writing library : x264 core 120 Encoding settings : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=2 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=3 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=1 / keyint=300 / keyint_min=30 / scenecut=40 / intra_refresh=0 / rc_lookahead=10 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=3 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00 Encoded date : UTC 2013-01-19 16:49:46 Tagged date : UTC 2013-01-19 16:51:16 Color primaries : BT.709 Transfer characteristics : BT.709 Matrix coefficients : BT.709 Audio ID : 2 Format : AAC Format/Info : Advanced Audio Codec Format profile : LC Codec ID : 40 Duration : 49s 67ms Bit rate mode : Variable Bit rate : 163 Kbps Maximum bit rate : 187 Kbps Channel(s) : 2 channels Channel positions : Front: L R Sampling rate : 48.0 KHz Compression mode : Lossy Stream size : 975 KiB (2%) Encoded date : UTC 2013-01-19 16:49:46 Tagged date : UTC 2013-01-19 16:51:16
I tried reencoding it in Handbrake just to make sure it was h264.
Well, if this can't be figured out, I may just wait until my provider changes my server's OS to try again. In the mean time I can let users download the movie to watch on their own.
Thanks for all your help
Jason
Offline
Hello,
I don't think your problem is from MediaInfo or FFMPEG.
If you can run them from the command line it is fine.
To fix you video problem, first try to play the VideoJS demo page and see if it play correctly. the demo page is located at:
/piwigo/plugin/piwigo-videojs/videojs/demo.html
Then check the wiki troubleshooting section.
https://github.com/xbgmsharp/piwigo-vid … oubleshoot
You video and poster must be accessible (wget/curl) and must return the correct mime type and must no be compress.
Some users mention some special Apache settings, [Github] piwigo-videojs issue #39
Some other from the VirtualHost Apache settings, [Github] piwigo-videojs issue #26
In regards to h264, it is better to optimize the metadata, [Github] piwigo-videojs issue #31
A link would help, so I can see the web source.
Offline
Finally got it all figured out.
You are right, the mediainfo and ffmpeg packages were working correctly.
My problem was that Piwigo was installed in a subdirectory of a Concrete 5 installation. It wasn't wanting to allow individual files to pass through unless it was coming out of Concrete 5. I reinstalled Piwigo outside of Concrete 5 and it works. Now I just have to go through and rename my video files to remove special characters and spaces. That will just take time, but the ones I have changed are working
Thanks again for all your help.
Jason
Offline