ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Special User Sections > DC Website Help and Extras

Can we embed short MP4 animation inline in post?

<< < (3/3)

Nod5:
I think he explicitly has html embeds turned off, and for good reason.
-wraith808 (October 27, 2020, 10:32 AM)
--- End quote ---
I Agree that makes sense, but I thought the link also said BBCode for local video could be specifically enabled, without allowing any and all html embeds. But I maybe misinterpreted that.

Anyway embedded mp4 animations isn't very important, I mostly wanted to check if worked already. Nice to have feature if easy to enable and no strong reasons against.

wraith808:
.. but I thought the link also said BBCode for local video could be specifically enabled, without allowing any and all html embeds.
-Nod5 (October 27, 2020, 11:49 AM)
--- End quote ---

What they were saying is that you could write a mod to wrap that.

Also, if don't want to use the  tags, then you can add a new BBCode to use it for the local video files, something like this [video]/path/to/the/video.mp4[/video] and then it will show in the post like the code I added before.

--- End quote ---
That looks super easy to code, I may give that a try Saturday, schedule super booked til then. That is if no one beats me to it.

--- End quote ---

Emphasis mine.

Nod5:
Thanks. Looks like someone did code it, here https://custom.simplemachines.org/mods/index.php?mod=4131 . But that allows many different audio and video files. Might be possible to lock down? I guess a big downside with any local video embed is if people start uploading big files that autoplay and slow down page loads. On the other hand small, short and silent MP4 screencap clips can be a useful way to quickly show a feature or describe a bug.

wraith808:
He's already limited the size of attachments, so I don't think that size is going to be an issue.  And if you can't set it to autoplay- just that it allows attachments to be embedded and played, doesn't seem like it's too big of a deal if it can be locked down to limit types.

Nod5:
Follow up post to the above GIF tests. This FFmpeg oneliner has nice results

--- ---ffmpeg -y -i file.mp4 -filter_complex "[0:v]fps=10,split[v0][v1];[v0]palettegen[plt];[v1][plt]paletteuse" file.gifCan we embed short MP4 animation inline in post? (212 kB)
To my eyes it looks less grainy than the earlier GIFs from imgur and cloudconvert, at a pretty small filesize cost.

Found here https://stackoverflow.com/a/60041579 , and the doc page is https://ffmpeg.org/ffmpeg-filters.html#palettegen-1

We can also shave off a few extra kB by going down to fps=5 with similar output quality.

Navigation

[0] Message Index

[*] Previous page

Go to full version