[Mod Portal] webm support

A place to talk about the official Factorio mod portal (https://mods.factorio.com)
User avatar
Mylon
Filter Inserter
Filter Inserter
Posts: 525
Joined: Sun Oct 23, 2016 11:42 pm
Contact:

[Mod Portal] webm support

Post by Mylon »

I would like the ability to link to webm files in my mod portal description. I have a gif demonstrating the mod, but it's 7 MB in size! The webm is only 342 kB with an acceptable loss in quality.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [Mod Portal] webm support

Post by eradicator »

Has this ever been implemented? And if yes how do i use it. I have a 10 second video clip that's <1MB as webm, and converting it to a much lower quality gif blows it up to 36MB...
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [Mod Portal] webm support

Post by ssilk »

moved to mod-portal suggestions — ssilk

Why not linking to a video-portal?
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [Mod Portal] webm support

Post by eradicator »

ssilk wrote: Sun Dec 13, 2020 10:22 am Why not linking to a video-portal?
Because embedding a short 5-10 second silent "video" (aka "gif") allows the user to casually "happen" to see the information without having to conciously search for it. A large embedded (moving) picture has an entirely different informational effect than a tiny easy to miss link hidden in a wall of text. Also I prefer to keep my factorio content available via factorio services instead of relying on 3rd parties. Btw, the forum also already supports webm.

Ask yourself this: If I told you that I wanted "modern gif" support instead of using the technical term "webm", would you have asked the same question?
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Xorimuth
Filter Inserter
Filter Inserter
Posts: 708
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: [Mod Portal] webm support

Post by Xorimuth »

+1 for webm, mp4 or gifv support!
Gifs are orders of magnitudes larger with worse quality, so they take ages to load in. Even the devs in FFFs use mp4s now.
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [Mod Portal] webm support

Post by eradicator »

So, because this isn't supported I've now been forced to use a fake "video player" to trick the user into going to a seperate site that hosts the video. I really wish I wouldn't have to do shit like that. Simply allowing <video> tags would be sufficient. Eradicator's Screenshot Maker Deluxe 3.0.

[Edit: Removed now-broken demonstration of ugly hack. Thank you $new_hire!]
Last edited by eradicator on Mon Jun 07, 2021 10:14 pm, edited 2 times in total.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: [Mod Portal] webm support

Post by Deadlock989 »

There is no such thing as a "<video> tag" in Markdown. Markdown has poor support for media elements, by design. It was, and always will be, a plain text markup language.

You could deviate from the informal standard for Markdown and add one, but equally you could spend that time implementing something that isn't as ball-breaking as Markdown.
Last edited by Deadlock989 on Fri Apr 16, 2021 10:26 am, edited 1 time in total.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [Mod Portal] webm support

Post by eradicator »

Deadlock989 wrote: Fri Apr 16, 2021 8:40 am There is no such thing as a "<video> tag" in Markdown.
According to The Internet™ some markdown implementations allow injecting HTML tags directly, which is what I was referring to.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: [Mod Portal] webm support

Post by Deadlock989 »

eradicator wrote: Fri Apr 16, 2021 8:59 am According to The Internet™ some markdown implementations allow injecting HTML tags directly, which is what I was referring to.
Can we have <a>, <img>, <ul> and <li> as well then?
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [Mod Portal] webm support

Post by eradicator »

Deadlock989 wrote: Fri Apr 16, 2021 10:23 am
eradicator wrote: Fri Apr 16, 2021 8:59 am According to The Internet™ some markdown implementations allow injecting HTML tags directly, which is what I was referring to.
Can we have <a>, <img>, <ul> and <li> as well then?
I am not asking to allow every html tag, and unlike your constant complaints about how bad markdown is I'm not asking for "different methods to get the same thing done". I'm asking for something that is currently impossible to do. But you already know that, so I'm not sure why I even bother reacting to your obivous attempt to undermine my argument with an invalid generalization.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

Re: [Mod Portal] webm support

Post by Deadlock989 »

Try dialling that down by like 20%, sunshine.

Markdown barely even supports image formatting. I mean, it doesn't even have text alignment. You may as well complain that a bicycle without wheels doesn't have a jetpack installed.

I'd guess the chances of them turning on anything that remotely resembles "HTML injection" are as close to zero as make no odds.
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [Mod Portal] webm support

Post by eradicator »

Deadlock989 wrote: Sat Apr 17, 2021 9:45 am Try dialling that down by like 20%, sunshine.
Sure, you go first. "Sunshine".
Deadlock989 wrote: Sat Apr 17, 2021 9:45 am You may as well complain that a bicycle without wheels doesn't have a jetpack installed.
Not complaining at all, merely +1'ing a request thread so to speak. And posting workarounds for other people with the same problem.
Deadlock989 wrote: Sat Apr 17, 2021 9:45 am I'd guess the chances of them turning on anything that remotely resembles "HTML injection" are as close to zero as make no odds.
I don't really care about how it's done. The picture gallery bar, a new demo video tab, whatever. I would just really like to show and see mods in action on the portal using an actual video format instead of an ancient 256-color limited wannabe-video abomination.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
Sanqui
Factorio Staff
Factorio Staff
Posts: 332
Joined: Mon May 07, 2018 7:22 pm
Contact:

Re: [Mod Portal] webm support

Post by Sanqui »

webm and mp4 videos are now supported using the same syntax as pictures:

Code: Select all

![Video description](https://example.com/video.mp4)
You can thank an upcoming new hire for this feature :)
ovo
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [Mod Portal] webm support

Post by Qon »

Thanks new hire!
Deadlock989 wrote: Sat Apr 17, 2021 9:45 am I'd guess the chances of them turning on anything that remotely resembles "HTML injection" are as close to zero as make no odds.
No one asked for html injection specifically. And markdown isn't really one standard, every implementation is modded to support new features by everyone that uses it...
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [Mod Portal] webm support

Post by eradicator »

Sanqui wrote: Wed Jun 02, 2021 2:47 pm webm and mp4 videos are now supported using the same syntax as pictures:

Code: Select all

![Video description](https://example.com/video.mp4)
You can thank an upcoming new hire for this feature :)
It's nice to know that Wube is doing well enough to keep hiring great people :). Thank you! However...

I can't get it to work. I suspect it's because github file urls do not end directly in ".extension".
For this mod which currently uses an ugly static-pic-click-hijack-hack.

This does not work on the portal:

Code: Select all

![DemoVideo2](https://github.com/lossycrypt/lossycrypt.github.io/blob/master/factorio-modportal/screenshot-maker-resize-and-move-demonstration-vp9.webm?raw=true)
Nor does it without the "raw=true":

Code: Select all

![DemoVideo2](https://github.com/lossycrypt/lossycrypt.github.io/blob/master/factorio-modportal/screenshot-maker-resize-and-move-demonstration-vp9.webm)
This is how I currently host the video on my gitpage (in html).

Code: Select all

      <video
        controls autoplay loop
        src="https://github.com/lossycrypt/lossycrypt.github.io/blob/master/factorio-modportal/screenshot-maker-resize-and-move-demonstration-vp9.webm?raw=true"
        ></video>
Am I doing it wrong? Can you $new_hire fix it? And are there plans to allow hosting these on factorio infrastructure (i.e. like portal pictures)?
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
Sanqui
Factorio Staff
Factorio Staff
Posts: 332
Joined: Mon May 07, 2018 7:22 pm
Contact:

Re: [Mod Portal] webm support

Post by Sanqui »

eradicator wrote: Thu Jun 03, 2021 1:02 pm It's nice to know that Wube is doing well enough to keep hiring great people :). Thank you! However...

I can't get it to work. I suspect it's because github file urls do not end directly in ".extension".

[...]

Am I doing it wrong? Can you $new_hire fix it? And are there plans to allow hosting these on factorio infrastructure (i.e. like portal pictures)?
$new_hire has fixed it, so urls .webm and .mp4 URLs that include parameters now also work!

There are plans to provide hosting for more types of files.
ovo
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [Mod Portal] webm support

Post by eradicator »

Sanqui wrote: Mon Jun 07, 2021 9:07 am $new_hire has fixed it, so urls .webm and .mp4 URLs that include parameters now also work!
$new_hire += 1
Sanqui wrote: Mon Jun 07, 2021 9:07 am There are plans to provide hosting for more types of files.
$wube += 1

I've taken the occasion to re-encode all my demo videos and made a brand new second one for the stockpiles. Enjoy ;p.
Eradicator's Screenshot Maker Deluxe 3.0
Eradicator's Visible Stockpile
Eradicator's Belt Planner
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
User avatar
vinzenz
Factorio Staff
Factorio Staff
Posts: 352
Joined: Mon Aug 02, 2021 6:45 pm
Contact:

Re: [Mod Portal] webm support

Post by vinzenz »

new videos are looking great, thanks for testing this new feature :)
bringing the oops to devops
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [Mod Portal] webm support

Post by ssilk »

Tested on iPad with chrome and safari, both not working (I see only the play button). PM me if deeper inspection/testing needed.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5211
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [Mod Portal] webm support

Post by eradicator »

I just noticed that if I upload a jpg to a mods "Gallery" the server converts it to png. The implications for size are similar as webm vs gif (thus I didn't make a new thread). I uploaded two very-high-resolution pictures to my mod Eradicator's Screenshot Maker Deluxe 3.0. Because the pictures were 10MB and 60MB respectively I converted them to low-ish quality jpgs (1MB and 6MB), just to have the server convert them back to huge pngs.

Expected behavior: Don't re-convert uploaded pictures? Jpeg-tran could be used to strip personalized metadata etc if that's an issue.

Edit: Tried to upload the smaller one of the original PNGs and after some time I always get:

Code: Select all

    Error: Unknown error (JS2).
    Error information: Error: Network Error
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Post Reply

Return to “Mod portal Discussion”