В Linux стандартными средствами можно использовать часть оперативной памяти как диск. Для этого требуется указать тип монтирования tmpfs в команде mount
mount -t tmpfs -o size=5G tmpfs /mnt/ram
Теперь путь /mnt/ram можно использовать как обычный каталог. Для чего это может быть нужно?
▫️ Скорость работы с таким каталогом выше чем многие SSD и тем более HDD.
▫️ Если у вас очень быстрый SSD на NVMe M.2 то такой способ особо не прибавит вам скорости, но поможет сохранить ресурс SSD когда требуется обрабатывать очень много мелких файлов и оперативка позволяет выделить нужный объем.
▫️ Оперативка это энергозависимая память, поэтому выключении питания все файлы безвозвратно теряются. Такой "non persistent" каталог гарантирует удаление временных файлов.
Я написал небольшой скрипт для условного теста и сравнения скорости копирования файлов между SSD и RAM.
Вот мои результаты:
Single File Size: 30.0Gb
ssd > ssd: 0:00:12.850 / 2.3Gb/s
sdd > ram: 0:00:06.453 / 4.6Gb/s
ram > ram: 0:00:06.995 / 4.3Gb/s
ram > sdd: 0:00:06.217 / 4.8Gb/s
Dir size: 32.7Gb, File count: 11127
ssd > ssd: 0:00:15.063 / 2.2Gb/s
sdd > ram: 0:00:08.486 / 3.9Gb/s
ram > ram: 0:00:08.032 / 4.1Gb/s
ram > sdd: 0:00:07.026 / 4.7Gb/s
Скрипт для теста ↗️
На моём железе прирост скорости ~2x. Плюс экономия ресурса SSD.
В Windows такой фишки по умолчанию нет, но обязательно найдутся аналогичные решения
#linux#triks
📰 FFmpeg Introduces Vulkan-Accelerated 360 Degree Video Conversion
Beyond the capabilities of just the Vulkan Video API, the FFmpeg multimedia library has made interesting Vulkan-accelerated adaptations using compute shaders. With Vulkan compute they've implemented Apple ProRes video acceleration, FFV1 decode, and other features. The newest Vulkan feature now in place for FFmpeg is 360 degree video conversion...
🔗 Source: https://www.phoronix.com/news/FFmpeg-360-Degree-Vulkan
#ffmpeg
📰 FFmpeg 8.1 Released With Experimental xHE-AAC MPS212, More Vulkan Acceleration
FFmpeg 8.1 is out today as the newest stable release of this widely-used, open-source multimedia library...
🔗 Source: https://www.phoronix.com/news/FFmpeg-8.1-Released
#opensource#ffmpeg
📰 Gentoo-Based Redcore Linux Hardened 2601 Released with Kernel 6.19
Redcore Linux Hardened 2601 Vulpecula has been released, featuring Linux kernel 6.19, FFmpeg 8, and updates to the Sisyphus package manager.
🔗 Source: https://linuxiac.com/gentoo-based-redcore-linux-hardened-2601-released-with-kernel-6-19/
#ffmpeg#kernel#linux
Кстати! Я всем советую попробовать HandBrake — программу для ужатия видео.
Это графический интерфейс для мощной библиотеки ffmpeg, которая заточена на перегонку видео в разные форматы.
Я в основном использую для уменьшения размера файлов, чтобы телеграм проигрывал их без звука автоматически
Тут подробнее писал как это работает
Анимацию постом выше я просто закинул и без изменения настроек перегнал из mpg в mp4. Размер изменился с 4.5мб до 300кб
А для тизера «Коротких вопросов» нажав две кнопки, смог уменьшить файл со 167 мб до (!) 3 мб. За счет уменьшения размера сторон с 4к до 720p.
На мобиле разницы скорее всего не будет видно, а вовлечение в просмотр повысится — сплошная польза!
Работает на всех платформах, в том числе на маке и линуксе!
🎤Ссылки на утро — второй канал
⏲Ускорить YouTube за звезду (VPN за 2₽)
#ToolReview@cogload#ffmpeg@cogload#telegram@cogload
🔖 The creator of ffmpeg Fabrice Bellard(1) is truly a genius and has created so many amazing software that have been an amazing benefit to the world. | Hacker News #pinboard#pantheon#ffmpeg#person
Yeah definitely. If programming genius had a unit it should be called the bellard.
One 10x programmer = a 1/10th Bellard?
100x 工程师,可以放在万神殿了
https://news.ycombinator.com/item?id=25487711
This is Probably the Best Video Downloader App (And it is Free and Open Source) | itsFOSS
VidBee allows you to download videos from YouTube, Facebook, X, Instagram, etc. In fact, it supports over 1,800 websites.
It is built on top of popular command line tools like yt-dlp and #ffmpeg. For the interface, it uses the Electron framework. I understand that some people dislike Electron framework as it runs a web browser underneath, but the 'advantage' of this framework is that you get the same interface in all the operating systems. At least, it's an advantage for the developers as they don't have to build the interface separately for #Linux, #Windows and #macOS.
The source code for VidBee is available on its GitHub repository.
#VidBee - Free Open Source Video Downloader
https://vidbee.org/