Hi,
I have the following question. When I upload videos taken on my iPhone and using piwigo app to upload the videos, they upload as .ov and on my Mac I cannot play them. I doubt they can be played on any device... If you rename the uploaded file to .mp4 and update the piwigo_images table in the database it works great. I can play the videos.
I tried to create a plugin to capture the when the video is uploaded but for some reason iOS Piwigo app uploads bypass both add_uploaded_file and add_uploaded_file_post hooks. In the plugin I rename the file and update the DB, the plugin never gets fired. If I upload manually the files the plugin works. But if I upload directly, it doesn't.
Any ideas on how to automate the process? I can create a script, and crontab it every 5 mins. But would be nice to automate the process after an upload.
Thank you!
Piwigo 15.5.0
PHP 8.2
Linux
Offline
Hi @peshko,
Unless the video is already in the MP4 format, the Piwigo iOS app converts the video to the MP4 format and upload it with the .mp4 file extension. This conversion is performed to ensure a full compatibility with web browsers.
I do not understand how you get a .ov file extension.
Did you follow the below instructions for configuring your Piwigo?
- Help page of the iOS app
- Help page of the VideoJS plugin
Eddy
Offline
cryopad wrote:
Hi @peshko,
Unless the video is already in the MP4 format, the Piwigo iOS app converts the video to the MP4 format and upload it with the .mp4 file extension. This conversion is performed to ensure a full compatibility with web browsers.
I do not understand how you get a .ov file extension.
Did you follow the below instructions for configuring your Piwigo?
- Help page of the iOS app
- Help page of the VideoJS plugin
Eddy
@cryopad
Hi Eddy. I appreciate your response!
I thought I was doing everything correctly... until I noticed that for some reason I had .mov in the list ... All fixed.
Another point from the documentation.
For me $conf['ffmpeg_dir'] = '/usr/bin' did not work. I get an error. What worked for me was:
$conf['vjs_ffmpeg_dir'] = '/usr/bin';
$conf['vjs_ffmpeg_name'] = 'ffmpeg';
Another point. If I Sync I got:
Video ./upload/2025/06/30/20250630212549-0e7ff77a.mp4
Number of metadata items: 18
filesize, width, height, date_creation, latitude, longitude, FileSize, Duration, DurationSeconds, AvgBitrate,
VideoBitrate, VideoFrameRate, VideoCodecID, VideoCodecInfo, AudioCodecID, AudioCodecInfo, AudioChannels, AudioSampleRate
Poster ./upload/2025/06/30/pwg_representative/20250630212549-0e7ff77a.jpg
I use Bootstrap Darkroom theme. When I go to the album, the only data I see is Date Created and Date Posted. No other metadata. How do I set to see other metadata?
And in general, what would you recommend as a best theme for mobile viewing. Currently if I use mobile version, I cannot play any video. If I switch to the Desktop version all is good.
Thanks again!
Offline
Hi @peshko,
Bizarre. There is no vjs_ffmpeg_dir variable in the VideoJS plugin, nor any vjs_ffmpeg_name. Have you installed the latest version of the VideoJS plugin (i.e. 15.f)? Have you edited the code of the plugin or installed a plugin which may be in conflict with VideoJS?
I also use Bootstrap Darkroom (the only active theme) and can play videos with either Safari on iOS 18.x or the Piwigo iOS app. To display the metadata below the video in Safari, select the options "Card grid below the image" or "Tabs below the image" as Picture page display (available at the bottom of the Bootstrap Darkroom Settings page). I use the first one.
All the best,
Eddy
Offline
cryopad wrote:
Hi @peshko,
Bizarre. There is no vjs_ffmpeg_dir variable in the VideoJS plugin, nor any vjs_ffmpeg_name. Have you installed the latest version of the VideoJS plugin (i.e. 15.f)? Have you edited the code of the plugin or installed a plugin which may be in conflict with VideoJS?
I also use Bootstrap Darkroom (the only active theme) and can play videos with either Safari on iOS 18.x or the Piwigo iOS app. To display the metadata below the video in Safari, select the options "Card grid below the image" or "Tabs below the image" as Picture page display (available at the bottom of the Bootstrap Darkroom Settings page). I use the first one.
All the best,
Eddy
@cryopad
Hi Eddy!
Thanks again for the response! I just checked again - I use 15.f. I have not changed the code and the plugins I have are:
Activated plugin list:
Additional Pages
Advanced Menu Manager
Extended Description
Grum Plugins Classes.3
LocalFiles Editor
VideoJS
I found somewhere on the web a reference to vjs_ffmpeg_dir... I was struggling for awhile to figure out why I was getting an error with ffmpeg_dir...
This is what I have:
// ─────────────────────────────────────────────────────────────────────
// File extensions — to allow video and other file types
// ─────────────────────────────────────────────────────────────────────
$conf['file_ext'] = array_merge(
$conf['picture_ext'],
array('heic','tif','tiff','mp4','m4v','mpg','ogg','ogv','webm','webmv')
);
$conf['graphics_library'] = 'ext_imagick';
$conf['upload_form_all_types'] = true;
/* File names — to allow special characters */
$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_. ]+$/';
// ─────────────────────────────────────────────────────────────────────
// Tell VideoJS where to find FFmpeg, FFprobe and MediaInfo
// ─────────────────────────────────────────────────────────────────────
$conf['vjs_ffmpeg_dir'] = '/usr/bin';
$conf['vjs_ffmpeg_name'] = 'ffmpeg';
//$conf['ffmpeg_dir'] = '/usr/bin';
$conf['vjs_ffprobe_dir'] = '/usr/local/bin';
$conf['vjs_mediainfo_dir']= '/usr/local/bin';
// ─────────────────────────────────────────────────────────────────────
// VideoJS — to add video metadata support
// ─────────────────────────────────────────────────────────────────────
$conf['show_exif'] = true;
$conf['show_exif_fields'] = array(
'Make',
'Model',
'ExifVersion',
.
.
I also have a "Card grid below the image" in the theme setting, but all I get under the Video is:
Information
Created on Tuesday 1 July 2025
Posted on Tuesday 1 July 2025
Visits 5
Albums Test
Who can see this photo? Every body
For the photos, I see tons of data...
Now on my iPhone, I have the latest Piwigo app. There was an update recently. I can upload a video and it converts it. If I try to go to the album and watch the video, I get a spinning wheel right at the bottom/middle. it spins forever and no video is played. It is a very short test video I took with my iPhone - 3 seconds.
If I go on the web interface, I can play the video with no issues.
I am not sure why I get that issue with the app.
Thank you again!
Offline
Hi @peshko,
The Sync command of the VideoJS plugin retrieves the metadata of the videos and store them in the database. From the post you sent yesterday at 03:51, this works. So you should be able to see the metadata with the [Show EXIF data] button at the bottom of the webpage presenting the video (as for a photo).
If you don't get that button, there may be a conflict between the theme and one of the following plugins: Additional Pages, Advanced Menu Manager Extended Description and Grum Plugins Classes. Have you tried to disabled them?
The spinning wheel shown by the iOS app in the middle of the white bar at the bottom of the screen is presented during the download of the video. As soon as a sufficient portion of the video file is downloaded, it is replaced with commands for playing the video. Apart from a corrupted file or a file renamed manually, I do not see reasons why it cannot be downloaded.
Your Piwigo is in version 15.5.0 on Linux + PHP 8.2. Which version of MySQL do you use?
Best regards,
Eddy
Offline
cryopad wrote:
Hi @peshko,
The Sync command of the VideoJS plugin retrieves the metadata of the videos and store them in the database. From the post you sent yesterday at 03:51, this works. So you should be able to see the metadata with the [Show EXIF data] button at the bottom of the webpage presenting the video (as for a photo).
If you don't get that button, there may be a conflict between the theme and one of the following plugins: Additional Pages, Advanced Menu Manager Extended Description and Grum Plugins Classes. Have you tried to disabled them?
The spinning wheel shown by the iOS app in the middle of the white bar at the bottom of the screen is presented during the download of the video. As soon as a sufficient portion of the video file is downloaded, it is replaced with commands for playing the video. Apart from a corrupted file or a file renamed manually, I do not see reasons why it cannot be downloaded.
Your Piwigo is in version 15.5.0 on Linux + PHP 8.2. Which version of MySQL do you use?
Best regards,
Eddy
@cryopad
Hi Eddy, I disabled those plugins and I see Exif data, after I sync in the VideoJS Settings.
Video ./upload/2025/07/02/20250702183407-5e610c34.mp4
Number of metadata items: 18
filesize, width, height, date_creation, latitude, longitude, FileSize, Duration, DurationSeconds, AvgBitrate,
VideoBitrate, VideoFrameRate, VideoCodecID, VideoCodecInfo, AudioCodecID, AudioCodecInfo, AudioChannels, AudioSampleRate
Poster ./upload/2025/07/02/pwg_representative/20250702183407-5e610c34.jpg
VideoJS thumbnails:
0 s — ./upload/2025/07/02/pwg_representative/20250702183407-5e610c34-th_0.jpg
So what I see in the Exif section is:
date_creation 2025-07-02 18:34:01
filesize 14216.733398438
latitude 12,3456
longitude 12,3456
resolution 3840x2160
Have you experiebced the following:
Some videos that I upload can be played in the image view. Ans some videos cannot be played. If I expand to Fullscreen all videos play OK.
Offline
Hi @peshko,
If you get date_creation,… resolution and not FileSize, Duration, DurationSeconds… in the EXIF section while the VideoJS plugin returned a list of metadata keys including also FileSize, etc., this probably means that your settings are incorrect in LocalFiles Editor. You should have the following lines:
$conf['show_exif'] = true; $conf['show_exif_fields'] = array( 'date_creation', 'formatprofile', 'latitude', 'longitude', 'rotation', 'Artist', 'AspectRatio', 'AudioBitsPerSample', 'AudioChannels', 'AudioCodecID', 'AudioCodecInfo', 'AudioSampleRate', 'Author', 'AvgBitrate', 'Contrast', 'DateTimeOriginal', 'Description', 'Duration', 'DurationSeconds', 'ExifVersion', 'ExposureBiasValue', 'ExposureMode', 'ExposureProgram', 'ExposureTime', 'FileSize', 'FileType', 'Flash', 'FNumber', 'FocalLength', 'FocalLengthIn35mmFilm', 'Genre', 'ISOSpeedRatings', 'LightSource', 'Make', 'MeteringMode', 'MIMEtype', 'Model', 'Resolution', 'Saturation', 'Sharpness', 'Software', 'Title', 'VideoBitrate', 'VideoCodecID', 'VideoCodecInfo', 'VideoFrameRate', 'WhiteBalance', );
You wrote:
Some videos that I upload can be played in the image view. Ans some videos cannot be played. If I expand to Fullscreen all videos play OK.
Do you mean that you cannot sometimes play videos with your browser unless you are in fullscreen? As for the iOS app, videos are only played in fullscreen mode.
Best wishes,
Eddy
Offline
cryopad wrote:
Hi @peshko,
If you get date_creation,… resolution and not FileSize, Duration, DurationSeconds… in the EXIF section while the VideoJS plugin returned a list of metadata keys including also FileSize, etc., this probably means that your settings are incorrect in LocalFiles Editor. You should have the following lines:Code:
$conf['show_exif'] = true; $conf['show_exif_fields'] = array( 'date_creation', 'formatprofile', 'latitude', 'longitude', 'rotation', 'Artist', 'AspectRatio', 'AudioBitsPerSample', 'AudioChannels', 'AudioCodecID', 'AudioCodecInfo', 'AudioSampleRate', 'Author', 'AvgBitrate', 'Contrast', 'DateTimeOriginal', 'Description', 'Duration', 'DurationSeconds', 'ExifVersion', 'ExposureBiasValue', 'ExposureMode', 'ExposureProgram', 'ExposureTime', 'FileSize', 'FileType', 'Flash', 'FNumber', 'FocalLength', 'FocalLengthIn35mmFilm', 'Genre', 'ISOSpeedRatings', 'LightSource', 'Make', 'MeteringMode', 'MIMEtype', 'Model', 'Resolution', 'Saturation', 'Sharpness', 'Software', 'Title', 'VideoBitrate', 'VideoCodecID', 'VideoCodecInfo', 'VideoFrameRate', 'WhiteBalance', );You wrote:
Some videos that I upload can be played in the image view. Ans some videos cannot be played. If I expand to Fullscreen all videos play OK.
Do you mean that you cannot sometimes play videos with your browser unless you are in fullscreen? As for the iOS app, videos are only played in fullscreen mode.
Best wishes,
Eddy
@cryopad
Hi Eddie,
This is what I have in my local config:
// ─────────────────────────────────────────────────────────────────────
// VideoJS — to add video metadata support
// ─────────────────────────────────────────────────────────────────────
$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',
);
On the second point. Yep, in the browser (MacOS Safari latest version) I can play all videos in fullscreen, but in image mode, I can play some and others I cannot.
Last edited by peshko (2025-07-08 17:30:22)
Offline