iZAP Videos (revised edition by iionly) - failure to convert video


I'm running Elgg 3.3.14 on Ubuntu 20.04 VPS with Plesk Obsidian, PHP 7.4.13, PHP-FPM on Apache 2.4.

For the past week, I've been transferring my Elgg site from Windows Xampp to the VPS and for some as yet unidentified reason the iZap video (iionly) plugin will not convert 'on-server' videos. The plugin settings are all green, I've set the data directory permission to 777 and recursed down, I've run ffmpeg 'convert' successfully using the command paths, however the videos remained queued.

The plugin is producing the png thumbnails and I have opened the queue.db, extracted the file paths and run ffmpeg as domain user to check ffmpeg can write to the izap_videos/uploaded directory.

I have checked the php error log and can find nothing obvious. The only anomaly is this:

"filesize(): stat failed for /var/www/vhosts/mydomain.com/data/1/55/tmp/mydomain_com_izap_videos_1608147805_VID_20190418_00004.3gp" in file /var/www/vhosts/mydomain.com/httpdocs/mod/izap_videos/views/default/izap_videos/admin/getQueue.php (line 33)  

The error log then displays all the ffmpeg processes and ends with the following:

WARNING: [pool mydomain.com] child 422394 said into stderr: "video:162kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%"

Does anyone have any ideas what I might try next?

Thanks in advance.

  • Have you configured the cronjobs of Elgg on your server and are you sure they are running as they should? Videos staying in queue sounds to me that at least the cronjob for the interval selected on the iZAP Videos plugin settings page for triggering the queue might not run.

    The error about filesize(): stat failed might also indicate that even if you set the data directory permissions to 777 the files and folders within might not all have sufficient permissions. Does the file /var/www/vhosts/mydomain.com/data/1/55/tmp/mydomain_com_izap_videos_1608147805_VID_20190418_00004.3gp exist at this location AND are the folders within data (i.e. 1 and 1/55  and 1/55/tmp) readable, writeable and accessible by the webserver process? If you moved the data directory from your local installation to the VPS and these folders already existed there might be some permissions lacking within the content of the data directory.

    Not sure what else could be the problem.

  • Hello iionly,

    Thanks for your prompt response. I've been on this all afternoon and still no joy. Ffmpeg just appears to stop after the creation of the png thumbnail. I'm also using Tidypics and that is working fine. Cron is enabled and running, the files exist, I can video convert via the command line using the domain user and the data directory group includes www-data.

    I'll keep at it and let you know when I've succeeded. It's probably something embarrassingly simple :) 

    Thanks again.

  • It's working now. My fault :(

    I finally tracked it down to an orphan record in the queue.db (I don't know how it got there). This appeared to cause a problem in: /izap_videos/views/default/izap_videos/admin/getQueue.php Line 33 with a call to PHP filesize(). As the orphan record was first in the queue I believe it prevented the queue from running the conversion on the other videos. What led me to this was attempting to delete the first record in the queue threw a critical error.

    Anyway, if anyone else should have problems converting videos and a "Warning: filesize() [function.filesize]: stat failed for..." is logged in the error.log and deleting a video in the queue causes a critical error it could be the result of an orphan record in the queue.db. 




Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking