Topic: Can't upload webm file despite meeting requirements

Posted under Site Bug Reports & Feature Requests

Hello,

I tried to upload a webm file but it failed and i don't get why. It's a webm video with the ratio 4:3, but at every try, i get this.

error: ActiveRecord::RecordInvalid - Validation failed: File ext audio/webm is invalid (only jpg, gif, png, and webm files are allowed

Could someone explain it ? I have no idea of what to do.

skippy01 said:
Hello,

I tried to upload a webm file but it failed and i don't get why. It's a webm video with the ratio 4:3, but at every try, i get this.

error: ActiveRecord::RecordInvalid - Validation failed: File ext audio/webm is invalid (only jpg, gif, png, and webm files are allowed

Could someone explain it ? I have no idea of what to do.

What was the process by which this file was encoded and stored as a WebM?

In a previous thread (see 4th and 5th posts), the same error was suggested to have been caused by the user trying to upload an MP4 file which has the wrong extension.

I asked my video editing software to export it in webm and asked the same thing to Handbrake, wich i used to bring some other modification to the video. So i'm sure that the file type is actually webm, i even checked with MediaInfo, so there's no reason for this error to appear.

skippy01 said:
I asked my video editing software to export it in webm and asked the same thing to Handbrake, wich i used to bring some other modification to the video. So i'm sure that the file type is actually webm, i even checked with MediaInfo, so there's no reason for this error to appear.

Post it somewhere then we can look at it. Mairo might know the reason. i.e. encoding options or the like. Handbrake should tell you what options it sent to FFMPEG (the backend that does all the actual encoding).

Does it still use x264.exe for most conversions? Could have sworn that it didn't. But same thing applies to finding what options it sent.

Hmm, found this list: https://superuser.com/questions/550710/how-do-i-translate-handbrakecli-options-to-ffmpeg-options

Updated

monroethelizard said:
What was the process by which this file was encoded and stored as a WebM?

In a previous thread (see 4th and 5th posts), the same error was suggested to have been caused by the user trying to upload an MP4 file which has the wrong extension.

This is basically it.
e621 basically ignores filename and file extension of files uploaded. It takes the file, checks what it actually is from header, then makes filename MD5.extension. That specific error means that site detected the extension to be something else than what's listed and allowed.

Primarily this is for security reasons, but there's fun aspect to this with sites like Furaffinity, because they have always been retarted at how they handle their files there, if in past you uploaded PNG file, the site would keep the extension .png, even though they compressed it into .jpg so there's thousands of uploads that are sourced as PNG but e621 corrected the files to be JPG: order:id mpixels:..1.64 source:*facdn.net*.png* filetype:jpg

skippy01 said:
I asked my video editing software to export it in webm and asked the same thing to Handbrake, wich i used to bring some other modification to the video. So i'm sure that the file type is actually webm, i even checked with MediaInfo, so there's no reason for this error to appear.

One thing that can be problem is that codec is something else than VP8 or VP9 (even though this shouldn't be possible, have seen some software do this) or that you selected Matroska container (.mkv) instead of WebM one (.webm). At least handbrake defaults and didn't use to even allow anything other than Matroska.

Also if you already exported as WebM on your editing software, then why push it through Handbrake anymore?

mairo said:

One thing that can be problem is that codec is something else than VP8 or VP9 (even though this shouldn't be possible, have seen some software do this) or that you selected Matroska container (.mkv) instead of WebM one (.webm). At least handbrake defaults and didn't use to even allow anything other than Matroska.

Also if you already exported as WebM on your editing software, then why push it through Handbrake anymore?

You've put your finger on it, handbrake used the wrong codec by default. I used handbrake because i found only after a first attempt that the video had to be 4:3, so i though it would be easier to use handbrake instead of my editing software to fix that.

  • 1