4 ms·
> GitHub supports embedded videos in README.md files True since May 2021 so I think a lot of people are still finding this out... In my experience GIF is stil
by jazzyjackson 5y ago
> GitHub supports embedded videos in README.md files
True since May 2021 so I think a lot of people are still finding this out...
In my experience GIF is still the most set-it-and-forget-it way to know a video will play, to get cross-platform support out of mp4 you may have to provide two different codecs. Anyway, not disagreeing with you and most gifs could drop 90% of their size with better choice of resolution and framerate. This readme is particularly egregious doing a screen capture with scrolling.
As for saving bandwidth until you want to play, I haven't tried this yet but it seems adequately clever to wrap a loading=lazy gif inside a details/summary tag: https://css-tricks.com/pause-gif-details-summary/ https://css-tricks.com/pause-gif-details-summary/
- Melatonic 5y agoNot to mention that H264 can take quite a bit of horsepower to decode and play as well (assuming your machine doesnt have a hardware chip specifically for doing just that)
- tambourine_man 5y agoWhich machine doesn't? Anything in the last 10 or so years will decode H264 with much less power than GIF because of it. Even a Pi supports it.
- jjice 5y agoMy 2014 Thinkpad X1 Carbon (gen 3) doesn't have hardware transcoding as far as I can tell made Zoom and Discord impossible to use for class, especially because there was no way (that I knew of) to disable all video except the presenter. Even playing a YouTube video on it makes it ramp up.
- botdan 5y agoI'm not sure which CPU you have specifically but the lowest-end model of the X1 Carbon Gen3 has an i5-5200U [1] that lists Intel Quick Sync Video support. From the wiki page for Quick Sync [2]: > Intel Quick Sync Video is Intel's brand for its dedicated video encoding and decoding hardware core. Quick Sync was introduced with the Sandy Bridge CPU microarchitecture on 9 January 2011 and has been found on the die of Intel CPUs ever since. I can't confirm but I'd guess your performance issues lie elsewhere than in the h264 decoding specifically. [1] - https://ark.intel.com/content/www/us/en/ark/products/85212/intel-core-i55200u-processor-3m-cache-up-to-2-70-ghz.html https://ark.intel.com/content/www/us/en/ark/products/85212/i... [2] - https://en.wikipedia.org/wiki/Intel_Quick_Sync_Video https://en.wikipedia.org/wiki/Intel_Quick_Sync_Video
- jjice 5y agoIf you check out the generation-codec table in that wikipedia article [1], under Broadwell (I believe that's the 5200U's generation name), it says there is support for AVC (which I believe is H264, I'm not a codec wiz), so that's a really good point. I'm not sure why I've consistently had issues with this on my machine then. I wonder if this is something with a configuration on Linux then? Thanks for pointing that out. I've looked at this table before and payed attention to HEVC, not AVC, so I believe that's where my mistake came from. [1] https://en.wikipedia.org/wiki/Intel_Quick_Sync_Video#Hardware_decoding_and_encoding https://en.wikipedia.org/wiki/Intel_Quick_Sync_Video#Hardwar...
- zerocrates 5y agoAVC is H.264, yes. Accelerated video decode is often disabled by default on Linux versions of browsers and can be quite dependent on versions of drivers/mesa/X-vs-Wayland/etc.
- black3r 5y agoYouTube by default prefers newer, bitrate saving codecs over old ones if it thinks your CPU can handle software decoding them. On my 2017 Dell XPS 1080p and lower resolutions on YouTube play in software decoded AV1, only 1440p and higher play in hardware decoded VP9, so playing 4K video on YouTube is less taxing for my CPU than playing a 1080p video....
- folmar 5y agoYou can use h264ify extension to fix it.
- ksec 5y agoThe problem is Zoom and Discord are doing multiple streams. But it really shouldn't be a problem. H.264, even on the high profile is not CPU intensive on a 2014 machine. Unless you are watching 1080P with 5-10Mbps, which is not the norm for internet video.
- Mogzol 5y agoIs this really still an issue in 2022? How many people are browsing the internet on a device that can't do hardware H264 decoding?
- TingPing 5y agoSome browsers have poor hw decoding support on Linux (their problem, not drivers) but its gotten a lot better recently.
- divbzero 5y ago> to get cross-platform support out of mp4 you may have to provide two different codecs Video codecs are not my area of expertise. Which codecs are these and what tool(s) would you typically use to ensure you provide them?
- jazzyjackson 5y agoSee this gist and the code comments [0] - basically you just need to know the magic flags to pass to ffmpeg, transcoding the file with all the right settings. [0] https://gist.github.com/ingramchen/e2af352bf8b40bb88890fba4f47eccd0 https://gist.github.com/ingramchen/e2af352bf8b40bb88890fba4f...