Page 1 of 1

[Mod Portal] webm support

Posted: Tue Jan 23, 2018 4:35 pm
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.

Re: [Mod Portal] webm support

Posted: Sun Dec 13, 2020 3:14 am
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...

Re: [Mod Portal] webm support

Posted: Sun Dec 13, 2020 10:22 am
by ssilk
moved to mod-portal suggestions — ssilk

Why not linking to a video-portal?

Re: [Mod Portal] webm support

Posted: Mon Dec 14, 2020 12:23 am
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?

Re: [Mod Portal] webm support

Posted: Mon Mar 22, 2021 1:48 pm
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.

Re: [Mod Portal] webm support

Posted: Fri Apr 16, 2021 3:36 am
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!]

Re: [Mod Portal] webm support

Posted: Fri Apr 16, 2021 8:40 am
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.

Re: [Mod Portal] webm support

Posted: Fri Apr 16, 2021 8:59 am
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.

Re: [Mod Portal] webm support

Posted: Fri Apr 16, 2021 10:23 am
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?

Re: [Mod Portal] webm support

Posted: Sat Apr 17, 2021 9:28 am
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.

Re: [Mod Portal] webm support

Posted: Sat Apr 17, 2021 9:45 am
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.

Re: [Mod Portal] webm support

Posted: Sun Apr 18, 2021 8:04 pm
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.

Re: [Mod Portal] webm support

Posted: Wed Jun 02, 2021 2:47 pm
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 :)

Re: [Mod Portal] webm support

Posted: Wed Jun 02, 2021 2:54 pm
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...

Re: [Mod Portal] webm support

Posted: Thu Jun 03, 2021 1:02 pm
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)?

Re: [Mod Portal] webm support

Posted: Mon Jun 07, 2021 9:07 am
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.

Re: [Mod Portal] webm support

Posted: Mon Jun 07, 2021 10:07 pm
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

Re: [Mod Portal] webm support

Posted: Wed Aug 04, 2021 8:42 am
by vinzenz
new videos are looking great, thanks for testing this new feature :)

Re: [Mod Portal] webm support

Posted: Sun Aug 08, 2021 5:27 am
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.

Re: [Mod Portal] webm support

Posted: Tue Aug 17, 2021 8:13 pm
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