3 ms·
Which part is not how zip works? > That's not how a video file structured You're under the impression that uncompresed raw video does not contain repeated bit
by bawolff 6y ago
Which part is not how zip works?
> That's not how a video file structured
You're under the impression that uncompresed raw video does not contain repeated bit patterns??? How do you think it is structured?
- dylan604 6y agoplease, show me an example with downloadable samples to recreate the experiment where zipping a video file decreases the file size.
- bawolff 6y agoUsing https://archive.org/download/ElephantsDream/ed_hd.mp4 https://archive.org/download/ElephantsDream/ed_hd.mp4 Convert to uncompressed YUV420P: $ ffmpeg -i ed_hd.mp4 elephant_dream_uncompressed.yuv Compress with zip with default compression (I also tried -9 but it didn't make much difference): $ zip compressed_elephants_dream.zip elephant_dream_uncompressed.yuv adding: elephant_dream_uncompressed.yuv (deflated 64%) $ ls -la elephant_dream_uncompressed.yuv compressed_elephants_dream.zip -rw-r--r-- 1 bawolff bawolff 1961679613 Mar 25 08:54 compressed_elephants_dream.zip -rw-r--r-- 1 bawolff bawolff 5422809600 Mar 25 08:46 elephant_dream_uncompressed.yuv 1-1961679613/5422809600 = .63826 ----- So, 63.8% compression ratio. This is terrible compared to any lossy video codec obviously, but its hardly nothing. i would expect even better ratio if the source contained mostly solid colours like a screencast
- dylan604 6y agosorry, i forgot about this thread, and absolutely did not think you'd respond. kudos. yay, you proved a RAW video can be zipped. you're right, i'm wrong. i have to ask though, why? what in the world is this trying to achieve? this has to be one of the worst ideas for making video smaller and useable.
- bawolff 6y agoI was just responding to the hypothetical, i agree you would never want to do this. The only case i could see is in high-end video editing or archiving where you need lossless compression, but even then there are lossless formats that provide better compression ratio (i assume), and more importantly better random access which would probably be important to that use case.