Oddbean new post about | logout
â–² â–¼
 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.
 
â–² â–¼
 I think the confusion came from the button labelled, "download." why is it labelled that way when the file isn't coming from the cloud? 
â–² â–¼
 Same for you profile picture, 5MB gif pfp anon 👀
nostr:nevent1qqsx46xywspgtxj9yxzq0xk24z006dm6uwjmf2njc3fm8hhv9sc45csppemhxue69uhkummn9ekx7mp0qgsvdac80utfn4gvly4fv54la0l6cp0udpptnm3ezzyajkdc44w53lgrqsqqqqqpytfn5d 
â–² â–¼
 I gotta remember to do this 
â–² â–¼
 thx! 
â–² â–¼
 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!  
â–² â–¼
 Is this part of the reason most files with hash filenames are incorrect? 
â–² â–¼
 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. 
â–² â–¼
 $1.99 is not much though. Can think of it as a tip to the devs. 
â–² â–¼
 If they were on Nostr, we could just zap them. Zap to remove ads would be awesome. 😀 
â–² â–¼
 Clients should really be doing this for users though 
â–² â–¼
 I would be cool to chain compression and upload with callback urls or dvms or something so users only have to transfer the file once 
â–² â–¼
 Clients must implement this 
 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 
â–² â–¼
 Consider writing it in Zig. 
â–² â–¼
 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.