123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|336|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Site & Server -> Supporting Modern File Formats

Thu, 12 Jun 2025, 03:07
Jayenkai

Supporting Modern Technology


Kuron .avif file has been a new standard for several years


SoCoder was created in 2006, then entirely rewritten in 2017.
Apparently the .avif format came out in 2019.
I stand by my argument that .avif is new.
Bloody modern stuff. Pah.

Right, if I'm delving into the code... Are there any other files/formats that you think the site oughta support?

-=-=-
''Load, Next List!''
Thu, 12 Jun 2025, 03:28
cyangames
Check if php (GDLib / imagemagick) supports them also first

I know GDLib added extra type support since PHP 7.4 /8.0


www.php.net/manual/en/function.imageavif.php Yup 8.0

-=-=-
Web / Game Dev, occasionally finishes off coding games also!
Thu, 12 Jun 2025, 03:30
Jayenkai
Yeah, it says it does, but I'd need to triple check first. Last thing we need is the site crapping itself because some silly developer decided WebP wasn't compressed enough.

-=-=-
''Load, Next List!''
Thu, 12 Jun 2025, 05:42
cyangames
yarp, makes sense to
Thu, 12 Jun 2025, 09:49
Jayenkai
Hey, ChatGPT, what other file formats should I let people upload, willy nilly, to my server?

What about .html and .php files? Developers use those all the time!


LOL.. Sure, ok, ChatGPT..

-=-=-
''Load, Next List!''
Thu, 12 Jun 2025, 11:00
Jayenkai
OK, .avif is allowable in the BBCode, but isn't allowable for uploads, because .. It's doing something weird with the resulting images, and I'm not sure what, and I'm not sure why, and I'm not 100% happy with the security of that..
Blame PHP, maybe?!

ChatGPT suggested I try using ImageMagik, but IMO, if something might be corruptible with plain PHP, then god only knows what could happen if I try adding more layers.
So, no uploading, but you can link to them.

-=-=-
''Load, Next List!''
Thu, 12 Jun 2025, 11:03
Pixel_Outlaw
Hehe ImageMagik has a really bizarre inconsistent nasty interface.
It kind of wants to be a programming language without being a programming language.
Thu, 12 Jun 2025, 12:00
cyangames
Yup, it's weird in PHP there's kinda 3 ways of using it, each one is very version / server dependant as I've found when making many auto-images. It doesn't help when sometimes a server bod flicks a switch and boom, all your image generation fails silently!( yes, that happened today and I found a way through with GDLib instead

-=-=-
Web / Game Dev, occasionally finishes off coding games also!
Thu, 12 Jun 2025, 12:03
cyangames
If it's not working then I guess just apply a filter to the uploader in an html attribute maybe? Or scan it's mime-type upon upload.

Orrr just leave a message on the uploader saying: "Hey! No Fancy AVIF's / HEIC's ya weirdo!"

-=-=-
Web / Game Dev, occasionally finishes off coding games also!
Thu, 12 Jun 2025, 14:49
Kuron
MS didn't support AVIF in Edge until around a year ago, not that MS is a beacon of rationality.

I try to always put stuff in PostImage now, as long as the forum code supports it, I am happy.

One other thing that would really help is support for Rumble's code it gives for sharing a video, like you do for YT. X, BSky and others all support Rumble videos now. Not sure what you would have to do for rumble.

https://rumble.com/embed/v6sgm99/?pub=4kv62u

https://rumble.com/v6unii3-brian-wilson-of-the-beach-boys-has-passed-away-at-the-age-of-82.html

Otherwise, just links.
Thu, 12 Jun 2025, 14:54
Kuron
IMHO, ImageMagik would be overkill for what you asked ChatGPT. That said, I have used CoolText since it first appeared and I believe it uses ImageMagik under the hood. Great and reliable but not needed for simply loading an AVIF
Thu, 12 Jun 2025, 15:07
Jayenkai
Music Supplied : Enigmatically Knighted
Lyrics : By Me
: Download | Suno Link

-=-=-
''Load, Next List!''
Thu, 12 Jun 2025, 15:18
Kuron
Song made me think, WEBP was supposed to be the greatest thing since two ply toilet paper a few years back, but has pretty much been bitched out by AVIF.

Think the only major source of WEBP files nowadays are WordPress-based sites.

Really hard to keep up anymore. Still doing PNGs for things, but heavily optimizing them.
Thu, 12 Jun 2025, 15:24
Jayenkai
.webp is the default for thumbnails here, now. I made that change a couple of years ago when I started uploading daily AI generated pics to my blog, and came to the conclusion that I'd better optimise them a little bit. Had to flick through all the images, site wide, and generate _thumb.webp companions to everything, before uploading and fixing up the script.

I don't think anyone noticed the change.

-=-=-
''Load, Next List!''
Thu, 12 Jun 2025, 16:13
Kuron
About a year ago, I was looking to use .webp on what I was working on, then I found a killer PNG optimizer and could get PNGs that were smaller than the .webp and looked just as good (if not better). Unfortunately, I Have no idea what optimizer that was and can't find it now.
Thu, 12 Jun 2025, 16:41
cyangames
tinypng.com is very good

I did find a PHP implementation which I had trawl works website and then save a fair bit of space.

-=-=-
Web / Game Dev, occasionally finishes off coding games also!
Thu, 12 Jun 2025, 16:46
Kuron
Thanks.
Fri, 13 Jun 2025, 06:04
Jayenkai
I opened up the BB script to add Rumble, and found that I'd already done it previously..
But I also commented it out, and wrote...
// There's something weird going on with this iframe. I'm not 100% sure on the security of it.

I wonder why that was...?!

-=-=-
''Load, Next List!''
Fri, 13 Jun 2025, 09:07
Kuron
dunno, but I think they may have changed the way they link to videos, not sure. Now they offer a specific iframe link as well as other specific links.


This is the iframe version:




They also offer a monetized direct URL:




They also offer an embedded player link:


Fri, 13 Jun 2025, 14:05
Kuron
IIRC, I think before the issue you ran into was when I would post a normal link to the video, the letters/numbers within the link were not the actual video ID like in YT, so parsing those out would not work like for YT.

I am guessing somebody would always need to use the iframe embed code for you reliably get the video.

This should always be the same with the iframe embed video URL:




This should be different for each video and what you would need to catch and parse like you do for the YT video.




The above is from the link in the previous post.

That said, in BlueSky and X if you juct post the normal link (below) for that video in a post, they manage to parse it and display the video as they would a YT video. Not sure what they are doing to achieve that.


Fri, 13 Jun 2025, 14:35
Jayenkai
The length of that explanation may indeed have been why I didn't add it.

-=-=-
''Load, Next List!''
Fri, 13 Jun 2025, 15:00
Kuron
We are on a coding forum, coders are used to clicking on links if need be and don't mind. Different on a normal forum where folks are terrified to click on shit and everything has to be embedded. But, Rumble is very popular.
Fri, 13 Jun 2025, 15:11
Jayenkai
Aaah, here we go. This was the reason.
Two urls that end up going to two different videos, even though "the bit that looks like the video's code" are identical.

Myself from a couple of years ago
But http://rumble.com/video/v3auuxo is NOT the same as http://rumble.com/embed/v3auuxo


This is why I never added Rumble.

-=-=-
''Load, Next List!''
Fri, 13 Jun 2025, 16:14
Kuron
Is what I said above, if you do it, anybody posting a Rumble link has to click on the button for iframe embed code for the video and you just parse the part of that after embed word. SHould never be any issue then.

Like YT, no need to parse the tail end of the rumble iframe code and the tracking "?pub=4kv62u" part.

It should be easy, if everybody always uses the iframe code which every video displays when you click on it.

For YT, you have people just copy the numbers/letters of the video. For Rumble, the message needs to simply say copy the numbers/videos from the iframe embed code. Then for the actual url use the embed url with the embed video code tagged onto it.
Fri, 13 Jun 2025, 16:20
Kuron
I am guessing X/Rumble use some sort of API to get the video code from the embed URL when somebody posts a normal rumble link. *shrugs*