[bug] Allow m4v on upload #322

Closed
opened 2026-10-04 23:52:03 +02:00 by adam · 3 comments
Owner

Reported by xbgmsharp on 4 Apr 2015 11:24

Version: 2.7.4

Hello,

A user report than some video works fine and some other no.
After checking, the limitation is on PWG core upload function.

The variable $ffmpeg_video_exts does not allow m4v file.

File: admin/include/functions_upload.inc.php
Line: 320

Steps to reproduce: Upload an MP4 video file and you will have a poster created.
Upload an M4V video file and you won't have a poster.

Piwigo Bugtracker #3217

**Reported by xbgmsharp on 4 Apr 2015 11:24** **Version:** 2.7.4 Hello, A user report than some video works fine and some other no. After checking, the limitation is on PWG core upload function. The variable $ffmpeg_video_exts does not allow m4v file. File: admin/include/functions_upload.inc.php Line: 320 **Steps to reproduce:** Upload an MP4 video file and you will have a poster created. Upload an M4V video file and you won&#039;t have a poster. [Piwigo Bugtracker #3217](http://piwigo.org/bugs/view.php?id=3217) <!-- github-sync-id:97252333 -->
adam closed this issue 2026-10-04 23:52:03 +02:00
Author
Owner

Comment posted by xbgmsharp on 4 Apr 2015 11:32

I suggest the following:

$ffmpeg_video_exts = array( // extensions tested with FFmpeg
'wmv','mov','mkv','mp4','mpg','flv','asf','xvid','divx','mpeg',
'avi','rm', 'm4v', 'ogg', 'ogv', 'webm', 'webmv',
);

$ffmpeg_video_exts = array_merge ($ffmpeg_video_exts, $ffmpeg_video_exts, array_map('strtoupper', $ffmpeg_video_exts) );

**Comment posted by xbgmsharp on 4 Apr 2015 11:32** I suggest the following: $ffmpeg_video_exts = array( // extensions tested with FFmpeg &#039;wmv&#039;,&#039;mov&#039;,&#039;mkv&#039;,&#039;mp4&#039;,&#039;mpg&#039;,&#039;flv&#039;,&#039;asf&#039;,&#039;xvid&#039;,&#039;divx&#039;,&#039;mpeg&#039;, &#039;avi&#039;,&#039;rm&#039;, &#039;m4v&#039;, &#039;ogg&#039;, &#039;ogv&#039;, &#039;webm&#039;, &#039;webmv&#039;, ); $ffmpeg_video_exts = array_merge ($ffmpeg_video_exts, $ffmpeg_video_exts, array_map(&#039;strtoupper&#039;, $ffmpeg_video_exts) ); <!-- github-comment-id:124899278 -->
Author
Owner

Comment posted by xbgmsharp on 13 Apr 2015 10:20

Works better that way.

$ffmpeg_video_exts = array( // extensions tested with FFmpeg
'wmv','mov','mkv','mp4','mpg','flv','asf','xvid','divx','mpeg',
'avi','rm', 'm4v', 'ogg', 'ogv', 'webm', 'webmv',
);

$ffmpeg_video_exts = array_merge ($ffmpeg_video_exts, array_map('strtoupper', $ffmpeg_video_exts) );

**Comment posted by xbgmsharp on 13 Apr 2015 10:20** Works better that way. $ffmpeg_video_exts = array( // extensions tested with FFmpeg &#039;wmv&#039;,&#039;mov&#039;,&#039;mkv&#039;,&#039;mp4&#039;,&#039;mpg&#039;,&#039;flv&#039;,&#039;asf&#039;,&#039;xvid&#039;,&#039;divx&#039;,&#039;mpeg&#039;, &#039;avi&#039;,&#039;rm&#039;, &#039;m4v&#039;, &#039;ogg&#039;, &#039;ogv&#039;, &#039;webm&#039;, &#039;webmv&#039;, ); $ffmpeg_video_exts = array_merge ($ffmpeg_video_exts, array_map(&#039;strtoupper&#039;, $ffmpeg_video_exts) ); <!-- github-comment-id:124899298 -->
Author
Owner

@xbgmsharp I didn't add the array_merge...strtotupper because the next line we check on strtolower...

@xbgmsharp I didn't add the array_merge...strtotupper because the next line we check on strtolower... <!-- github-comment-id:187686979 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#322