Partial fix The uploaded file was not a video as expected.

HJW

Active member
Affected version
2.1
Sometimes get this for videos that play fine on mobile and desktop downloaded from a site using FBdown.net extenstion.

Is it something in my settings I need to change or a bug? Videos are too large to be allowed to be uploaded here
 
Maybe a bug. We'd need to see an example video to test it.

To upload that here, please add it to a zip file first before uploading.
 
I just got this error with a video downloaded from WhatsApp.

Tried to edit it in the Apple Photos app on iOS to crop some information out and not even Apple Photos could edit it. Kept getting an ‘There was an error saving this video. Please try again later’ when trying to crop it.

So maybe it’s something weird that Facebook does with their videos.
 
So I tried re-encoding it using handbrake and that resulting video uploaded fine.

The original does also open up and play just fine in the browser on it's own.

It's an mp4 and this is the codec information according to VLC

1608386361261.webp

It's a very low frame rate video, probably because it's from a security camera, maybe that's it. Although it does play just fine in the browser on it's own.

If a dev would like the file let me know and I can send it privately. Perhaps transcoding of vids uploaded to posts would help solve this.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.3).

Change log:
Improve video validation for a specific type of MP4 video file.
There may be a delay before changes are rolled out to the XenForo Community.
 
I've tagged this as a partial fix because I have resolved this for the video that I was sent, though it's not really knowable if the video in the first post had the same particular issue. If you run into this problem in 2.2.3+, please open a new bug report.
 
Perhaps transcoding of vids uploaded to posts would help solve this.
Unfortunately not. The validation happens way before transcoding is even tried, so any unsupported ftyp does get rejected.

We've just had the same issue with a MP4 video with ftyp 3gp5, after adding this to the whitelist in XF\Http\Upload::analyzeVideo() the video could be uploaded and transcoded.

The video was recorded with a Samsung Galaxy S21 Ultra using the standard camara app version 11.0.03.24 and was afterwards edited with Samsung video editor app 3.7.82.3, so I think this ftyp might be a pretty common.

Would it make sense to whitelist all brands from http://mp4ra.org/#/brands ?
Or log unknown ftyp in error log?
That would at least make it easier to support users.
 
Last edited:
Top Bottom