Enable forum WebM video upload

Cannot click the upload button and successfully upload a video recorded from the Inspector. The forums give me an error “not supported.” I found this post on another Discourse forum that suggests it’s easy to add: How to allow uploading videos? - #2 by twofoursixeight - Support - Discourse Meta

I think the .webm extension needs to be added to the list on the admin console. “Supported formats…” or similar.

I have to upvote this, since my video screenshoter (Ubuntu 22.04) is as well recording some .webm, and it would be nice to be able to directly drop them in the forum.


Hint for linux users :
I have put in my /home/myself/.local/share/nautilus/scripts/ a script so that it’s added to the context menu (right click). It ables to instant convert a .webm video to a .gif. I use to do it before sharing on this forum. I added a (pre-filled) prompt for resize and fps. Very handy !

#!/bin/bash

# Get the file path
FILE="$1"

# Get the directory and filename without extension
DIR=$(dirname "$FILE")
BASENAME=$(basename "$FILE")
FILENAME="${BASENAME%.*}"

# Default values
DEFAULT_FPS=15
DEFAULT_SCALE=640

# Get user input for fps and scale
FPS=$(zenity --entry --title="FPS Input" --text="Enter FPS:" --entry-text="$DEFAULT_FPS")
SCALE=$(zenity --entry --title="Scale Input" --text="Enter scale width (height will be auto-calculated):" --entry-text="$DEFAULT_SCALE")

# Check if user canceled
if [ -z "$FPS" ] || [ -z "$SCALE" ]; then
    zenity --error --text="Conversion cancelled."
    exit 1
fi

# Generate palette
PALETTE="${DIR}/${FILENAME}_palette.png"
ffmpeg -i "$FILE" -vf "fps=$FPS,scale=${SCALE}:-1:flags=lanczos,palettegen" -y "$PALETTE"

# Convert video to gif using the generated palette
OUTPUT="${DIR}/${FILENAME}.gif"
ffmpeg -i "$FILE" -i "$PALETTE" -filter_complex "fps=$FPS,scale=${SCALE}:-1:flags=lanczos[x];[x][1:v]paletteuse=dither=sierra2_4a" -y "$OUTPUT"

# Remove the palette image
rm "$PALETTE"

# Notify user
zenity --info --text="GIF saved as $OUTPUT"

That will be a @Deltakosh mission then as it requires full admin of the forum

1 Like

Done!

4 Likes

Works great! Thank you so much!

1 Like

Now that’s a quick feature request completion :grin:

2 Likes