Duplicate Video upload fails due to non-whitelisted ftyp

Kirby

Well-known member
Affected version
2.2.8 PL 1
Apparently https://xenforo.com/community/threa...s-not-a-video-as-expected.178773/post-1546143 was missed so I am opening a new bug report.

Currently videos with typ 3gp5 (which is used by Samsung Galaxy S21 Ultra at least) cannot be uploaded as this ftyp is missing in the whitelist.
As diagnosing such issues is kinda complicated (we have to ask the users for the original files to inspect the header) it might make sense to at least add some kind of logging if an unknown ftype is discovered.

Ideally, it should be possible to configure additional types (via config.php) so it is not necessary to patch (or extend the class and overwrite the whole method) just to add an new type.
 
I've reported this too (https://xenforo.com/community/threads/3gp-encoded-mp4-videos-not-accepted.206305/) and have been other reports before me (oh just seen this is an older thread and linked in the reply to mine).

You're welcome to use the attached hacky workaround addon I implemented for this. It re-defines the entire function that checks the video and adds in a few characters to allow these videos. It's unlikely this file will change between patch version upgrades, but it does log an error the error log if you upgrade and haven't upgraded the addon, just to note that the code may be mismatched. But it will solve this problem for you.
 

Attachments

Last edited:
I've reported this too (https://xenforo.com/community/threads/3gp-encoded-mp4-videos-not-accepted.206305/) and have been other reports before me (oh just seen this is an older thread and linked in the reply to mine).

You're welcome to use the attached hacky workaround addon I implemented for this. It re-defines the entire function that checks the video and adds in a few characters to allow these videos. It's unlikely this file will change between patch version upgrades, but it does log an error the error log if you upgrade and haven't upgraded the addon, just to note that the code may be mismatched. But it will solve this problem for you.

Installed your addon, still having the issue.
The video I wanted to upload is less that 2MB, downloaded from Twitter.
 
Yeah, is a different issue... first few bytes of the video are ftypiso5 iso6, XF's video encoding regex includes iso6 but it has to come immediately after ftyp which it doesn't here.

I can't prep a new version of this addon right now, but if you edit src/addons/ThemeHouse/Allow3GpVideos/XF/Http/Upload.php, line 37, change:

Code:
'ndxm', 'ndxp', 'ndxs', 'xavc', '3gp'

to:

Code:
'ndxm', 'ndxp', 'ndxs', 'xavc', '3gp', 'iso5'

it will accept it.
 
Top Bottom