82 comments

[ 3.5 ms ] story [ 162 ms ] thread
It's a good start but it's a shame they are limiting file types at all. We have been using GitLab which has allowed this for a while and we use it to share webm files which unfortunately still appear to be blacklisted by github.
Honest question because I might be behind on how common environments behave: is webm the format your OS/device/workflow produces by default or one you convert to for sharing/optimization?
Not GP, but on a Mac, which produces mov per default.

Started using Kap to record to webm: https://getkap.co/

Sorry, to clarify, all of my devices are Apple so I expect .mov with H264/H265 encoding. I’m wondering if other devices encode to webm without conversion now, and it’s a format people expect to be able to exchange by default.
The Android emulator when doing a screen recording can only select between .gif and .webm, at least on my system. So especially when working on an Android app I would expect that, yes.
Webm and webp have become pretty standard usage on the internet now. Imgur, reddit and many other major sites use it by default when support is detected. Usually when I save an image in the browser it will be webp.
And just it time for AV1. 11th-gen Intel chips have hardware decoding too.
Webm is one of the formats my screen recorder supports and seems to be the one my coworkers use. It’s pretty convenient since it works without having to install proprietary codecs and it even works on safari now.
Yes, webm is much much better than GIFs for the same purpose.

Webmy.com is my giphy clone, but using webm.

Webm can’t be played on safari, so I imagine it’s for compatibility reasons.
Thankfully this is no longer the case - Safari has support for WebM as of macOS 11.3.
Safari on mobile unfortunately still doesn’t seem to support .webm playback as of today.
Linux distros by default don’t support mp4. I’d say those are more common GitHub users.
Why use "blacklisted" here? Why not just say not allowed...
Blacklisted is the specific terminology for when a website rejects certain file types. I guess in githubs case it would be that webm is not whitelisted since only 2 formats are permitted.
But since in this case it only allows certain other formats, it's the wrong wording.
Because it's a real word that is applied in this case.
They're free to use real specific words that aren't actually offensive if they want.

Although in this case I would have thought GitHub uses a whitelist rather than a blacklist, so they should have said "webm isn't whitelisted".

(Notice how that is different to "webm is blacklisted" but your alternative wouldn't have captured that distinction.)

The limited whitelist of video formats is IME secondary to that of uploads in general. Having to put archives in archives because github rejects the original one is painfully dumb.

Had that recently, as GitHub still has no support for private upload I wanted to upload an age-encrypted tarball of the logs / repro (incidentally this otherwise works extremely well as github exposes public keys through an endpoint, you can just age with a few `-r$(curl …)` and you have a file decryptable by all the specified github users, really convenient).

But then I had to zip the entire thing again…

Huh? I assume you mean commit signing keys? I only found ssh pubkeys. What endpoint gives out the PGP keys?
> I assume you mean commit signing keys?

No.

> I only found ssh pubkeys.

Yes.

> What endpoint gives out the PGP keys?

I neither know nor care.

Webm files can be uploaded by renaming them to mp4s.
Big fan, as a very active GitHub user the conversion to GIF for screen grabs had been a constant paper-cut
Is it really that hard to use screen2gif?
gifs are hard to look good and make small, in my experience
(comment deleted)
ffmpeg has the best gif output I've found.
Still much larger than the equivalent video, and without any audio or pause/scrub functionality.
But it's still big. And if you try to get a decent one to sub-1MB, you'll likely either have to sacrifice quality quite a bit. Especially if the gif is anything complicated.

ffmpeg can work videos down much better

As a past user of Screen2Gif I can say on Windows ShareX does a very good job of screen capture and recording.
Does it work well with high dpi screens now? Last time I tried to use ShareX it didn't handle 150% scaling well. Cursor alignment was a all over the place.
It's really hard to make it output small videos with audio!
Gif is a dumb waste of bandwidth and space.
I really hope this comes to GHE!
> Today, we’re announcing that the ability to upload video is generally available for everyone across GitHub. Now you can upload .mp4 and .mov files in issues, pull requests, discussions, and more.

Is there a filesize limit?

Yes, but as I recall it's fairly reasonable (maybe 10MB?). A huge pain for GIFs which are huge, but it should be fine for videos.
(comment deleted)
Dope. Will make writing guides so much easier. And I do mean written guides. Just sometimes they could use a little context with short clips.
Will GitHub become an alternative to YouTube?
It might for security professionals given YouTube's hostile policy towards content on "hacking".
github/MSFT don't have an impeccable track record either: https://github.com/github/site-policy/pull/397#issuecomment-...

I'd imagine the moment some OSINT outfits or activists start uploading footage of conflicts (perhaps to be referenced in future reports or studies) they will censor it - not because they have to, but because they don't have the staff/know-how to assure that the videos are what they claim to be.

Being a video streaming alternative seems antithetical to the whole code repository thing.

Smart thing to do would be to take a vertical chunk of hacker/dev/bug fix content that youtube has neglected over the years.

ctrl-f of 'lfs' yielded no results, are those files gonna clutter git repos?
GitHub issues are not stored in git. This is just video attachments in the text of issues.
Didn't realise it was a beta feature and have been uploading them for months. Such a great feature, a ten second clip can save paragraphs of ineffective description.
You still need the explanation, videos are not accessible nor search engine friendly.

It's a good complement though.

Why is that relevant for private repositories?
Accessibility is, search engine friendliness isn't. But being able to search the available documentation instead of clicking through videos can still be a nice touch.

Also, since making a video requires a bit more effort than changing a few lines of text, video documentation often gets outdated fairly quickly.

But nevertheless, in some instances, videos are definitely the way to go.

Possibly GitHub could make video more accessible by OCRring videos for search.
Oh, nice. Just what's needed for game dev bug reports.
Sweet jesus, fucking love you github. Was surprised i can upload images already, this one is way way cooler.
Any tips on the best software for Windows to record video? Would be nice to be able to record a part of the screen. Also, I am very wary about what I install so please no obscure software.
OBS has a slight learning curve, but I find that it's able to do everything I need, including screen region recording, single window recording, and overlaying/switching between screen and webcam.
How do you record portion of the screeb? Filters > Crop?
Windows actually has screen recording software built in now with the XBox Game Bar. It’s meant for recording games but there isn’t any reason that you can’t use it for other programs.
Tried it and it was 700mb for a few minutes of recording.. didn't find any way to tweak that
Hmm, I just tried it for the first time yesterday, and was actually quite impressed. I made a screen recoding of a desktop app, with me talking over it the whole time. The quality of both video and audio was good, and the file size was something like 5-10MB.

I can't believe I've been using Windows 10 for so long and didn't even know about this - I kind of wish they'd change the name TBH; would also make it seem more reasonable to be installed be default on Enterprise eds!

ShareX is pretty good for recording short clips/gifs of part of the screen
If you're recording the full desktop, then use ShadowPlay if you have an nvidia card (it comes with the nvidia software and utilizes the native GPU encoding). Otherwise, use the Xbox Game Bar, which is installed by default in Windows 10.

If you need to record a specific portion of the screen, I'd recommend the open source tool Captura: https://mathewsachin.github.io/Captura/

It's no longer maintained as of July 2020, but it's quite effective at what it does and is not lacking for features. I use it for recording UI interactions all the time.

Xbox Game Bar is very limited. It only captures a single window not the actual desktop, so you won't see any other window, dialog or context menu.

I noticed it when I tried to record a demo of a git merge flow in an IDE. Fail!

I wish this was properly built-in on Windows, since the recording is otherwise excellent.

As another comment recommended, ShareX is a very good and popular (if not the most popular) tool for small recordings. Also it's open source, small in size, and it has portable versions available in its repo[0] (so technically you don't have to install anything).

[0]: https://github.com/ShareX/ShareX/releases

Thanks! Didn't know this existed.
(comment deleted)
Screen2gif seems to be an option also
I wonder if Google search is going to be the primary interface through which people will end up reaching some of the helpful videos.
It's kind of funny that you still can't upload plain text files with arbitrary extensions when even videos are allowed. Like, try to upload a .json:

> We don’t support that file type. Try again with a GIF, JPEG, JPG, MOV, MP4, PNG, CSV, DOCX, FODG, FODP, FODS, FODT, GZ, LOG, MD, ODF, ODG, ODP, ODS, ODT, PDF, PPTX, TXT, XLS, XLSX or ZIP.

How hard can it be to just allow plain text regardless of file name?

Link to a gist?
I’m sure HN users are aware that there are ways to share files online. File upload exists on the form but it has been arbitrarily limited.
Even just friggin' allowing JSON and XML extensions would solve 80% of this problem. At my work I frequently have to change the extension to .json.txt to get it to work.
You can upload JSON via the GH API
Wonder if this will work for GitHub Pages as well. I've been using video uploads for issues but when I tried the same for some documentation on GitHub Pages I had to use <video> tags instead.
Little pet peeve, but one can't upload pics to Github wiki without first dropping it into PR, then copying resulting link.
If you tweet that at @natfriedman or find the product manager, they’ll add it soon. They just added file uploads to the file editor so they might also add it to the wiki (if they haven’t already)