Previously, I had decided to ditch Google apps, including Google Photos. That meant that I needed a new photo backup solution, of which I have written several articles on this blog. The main portion of the server was Piwigo, a photo viewing/sharing/organizing server that you can view from other devices over the internet. Feel free to check out my previous posts by searching Piwigo to see the setup.

One feature that was missing, however, was the ability to display and view videos. This brought me on a long adventure that I will summarize here, because it wasn’t as easy as it first seemed.

The first thing I needed was to download the right plugin. There were several to pick from, but the one that seemed to be the easiest to integrate was called video-js. I simple logged into my Piwigo server as the administrator and went to the plugins and clicked install. Seemed pretty simple so far….

But, that’s when the problems began.

Following the video-js documentation, I set all my settings under the settings tab, and then moved over to the synchronization tab. I was immediately greeted by yellow triangles because ffmpeg, mediatool, ffprobe, and exiftool were not found. So, I jumped into the terminal, but found that those packages don’t exist in CentOS’s yum repositories. A little bit of internet searching lead me to do this (wish I had written down the reference) :

# yum install mediainfo
# rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
# yum install ffmpeg ffmpeg-devel -y
# yum install perl-Image-ExifTool.noarch

After installing those packages, now I could go to the synchronize page and received no errors. Unfortunately, after setting the synchronization settings to my liking, pressing submit returned only this error: “You ask me to do nothing, are your sure?”

So, after more web searching, I went to the video-js plugin issue tracker and found others with the same problem. Included was also a fix by a user named ipsedix: https://github.com/xbgmsharp/piwigo-videojs/issues/162#issuecomment-605990233

Back at the command line again, I jumped into my MariaDB like so:

[root@localhost alaskalinuxuser]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 1302
Server version: 5.5.65-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> SHOW DATABASES;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| piwigo             |
| test               |
| uloggerdb          |
+--------------------+
6 rows in set (0.01 sec)

MariaDB [(none)]> USE piwigo;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [piwigo]> SHOW TABLES;
+-------------------------------+
| Tables_in_piwigo              |
+-------------------------------+
| piwigo_caddie                 |
| piwigo_categories             |
| piwigo_comments               |
| piwigo_config                 |
| piwigo_favorites              |
| piwigo_group_access           |
| piwigo_groups                 |
| piwigo_history                |
| piwigo_history_summary        |
| piwigo_image_category         |
| piwigo_image_format           |
| piwigo_image_tag              |
| piwigo_image_videojs          |
| piwigo_images                 |
| piwigo_languages              |
| piwigo_old_permalinks         |
| piwigo_plugins                |
| piwigo_rate                   |
| piwigo_search                 |
| piwigo_sessions               |
| piwigo_sites                  |
| piwigo_tags                   |
| piwigo_themes                 |
| piwigo_upgrade                |
| piwigo_user_access            |
| piwigo_user_auth_keys         |
| piwigo_user_cache             |
| piwigo_user_cache_categories  |
| piwigo_user_feed              |
| piwigo_user_group             |
| piwigo_user_infos             |
| piwigo_user_mail_notification |
| piwigo_users                  |
+-------------------------------+
33 rows in set (0.00 sec)

MariaDB [piwigo]> UPDATE piwigo_config SET value="a:0:{}" WHERE param="vjs_sync";
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [piwigo]> exit
Bye

Now we were getting somewhere! Unfortunately, because I had over 1000 videos in the server, I kept getting errors and time outs. This caused the process to fail repeatedly when I try to synchronize. It would usually only get through the first 200 or so videos before stopping. So, as a quick and dirty fix for that I unchecked the setting to “Overwrite existing posters”. This way, even though it would time out or fail, it would make the posters (thumbnails) for about 200 videos before it quit. Then all I had to do was run the synchronization process five or six times to get them all done!

Linux – keep it simple.

Leave a Reply

Your email address will not be published. Required fields are marked *