Pro Tip: Always consider compressing your videos before uploading them to Nostr. This can significantly reduce the load on CDN providers, faster video loading for everyone, with minimal impact on quality. It's free and takes few seconds, upto 90% size reduction. Compression tool: https://tools.rotato.app/compress https://i.imgur.com/ZLD1w5s.jpeg
Important best practice! I will start doing the same. nostr:nevent1qqsx46xywspgtxj9yxzq0xk24z006dm6uwjmf2njc3fm8hhv9sc45cspg3mhxw309a3xjarrda5kuu3kv3jn2mrtweurgarswajx67njv3nxgurvvy6hx7tpxfskvamsvdsky6n4wqe8surfx4j82mrzv9jzummwd9hkutczyrr0wpmlz6va2r8e92t990ltl7kqtlrgg2u7uwgs38v4nw9dt4y06qcyqqqqqqgdu2kjm
If we do this with content eg short form video clips Would it then be possible to replace the likes of YouTube as video hosts? I like the idea of totally uncensored content creation over time
Google currently uses compression algorithms for various services, including YouTube uploads.
Nice tool, but i am confused: https://image.nostr.build/d565fc0b01167f9b715a5d59d57637d23264a6c4097969863d84bb707e0f8f52.jpg https://image.nostr.build/35b7033c95799ec85b0f59d80371f880842228464a8a493bf0a9b0f51759c444.jpg
It uses ffmpeg open source library. FFmpeg compresses videos by: * Choosing a codec: This determines how the video is encoded (e.g., H.264, HEVC). * Reducing resolution: Making the video smaller (e.g., from 1080p to 720p). * Lowering frame rate: Showing fewer frames per second. * Adjusting bitrate: Controlling the amount of data used per second. * Using keyframes: Storing complete frames less often. * Quantizing colors: Reducing the number of colors in each pixel. * Analyzing motion: Finding and removing repeated information. By combining these techniques, FFmpeg can make videos smaller while maintaining good quality.
It would be nice to have this baked into the app somehow.
It uses FFmpeg, which is open-source, and there are many libraries available. I recently implemented it in JavaScript & flutter, both had library/package, implementation was simple.
Does it work all the time. Our current compressor is also ffmpeg, but I don't think it compresses really well most of the time. ☹ï¸
I tried the JS WebAssembly library, but it didn't work. Fluent-FFmpeg integration went smoothly, though it was a bit slow. I'll try to finish my Flutter implementation today. Once done, I can share the code if you're interested. Flutter also uses the Fluent-FFmpeg package.
What do you mean "our" compressor? In amethyst or some other project?
In amethyst, we do compress video and images using two different libraries.
Ah yes, I see now. The import com.abedelazizshe.lightcompressorlibrary.VideoCompressor seems to be a good choice!
On iOS I’ve had good results with an app called Compress. It’s free (with ads) or $1.99 for the ad-free version.
This one is ad-free, with 2GB. Btw Don't pay for compression, underlying technology (ffmpeg) is open source & easy to implement.
Good advice. The convenience of the mobile app is nice, I will say. I just use the ad version. They’re short anyway. Lol. On desktop I use Handbrake which is of course free.
Clients should really be doing this for users though
When in nostr clients as default? WhatsApp does an amazing job at compressing videos before sending, decent job compressing images. Options for high quality available. I would love all nostr media sent from client to be heavily compressed by default. Sharing uncompressed media is such a waste of bandwidth and space. Anything high quality or long content should be distributed externally before posting.
100% 0 nobody lose much of clarity esp if u record big file in phone for cli PROs use ffmpeg CLI on u console in linux then upload to fave blosson or cdn or nostrcheckme server e.g. ffmpeg -i laserharp5a.mp4 -vcodec libx264 -crf 20 laserharp5b.mp4 do it few times to make size much smaller
I'll soon be open-sourcing a native cross-platform image & video compression app for both iOS & Android. For PC, I may rewrite it in Rust. On medium settings, it reduces file size by 60%-70%, I can bring it to 90%. Its performance already surpasses any web-based alternative by a significant margin. Very early stage demo, already keeps history: https://w3.do/uh5PKbOz nostr:nevent1qqsx46xywspgtxj9yxzq0xk24z006dm6uwjmf2njc3fm8hhv9sc45csppemhxue69uhkummn9ekx7mp0qgsvdac80utfn4gvly4fv54la0l6cp0udpptnm3ezzyajkdc44w53lgrqsqqqqqpytfn5d
Champion
Strange how a metamask instance crashed when I loaded your page. (its my dapp tester, not actual wallet people) But that has never happened ever before.