Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have access to a server via SSH, I download files from it over SFTP or HTTP. I want to pull down a 4.4GB .mkv file but I have limited bandwidth.

I have used zip, gzip and p7zip, but the file is always 4.4GBs after the compression process. After fiddling with some of the CLI args I managed on one attempt to get the file down to 4.3GBs. I understand that the video file I have is a compressed h.264 file. I don't understand why I can't compress this further though (perhaps a question for another Stack-exchange forum)

Is there some way I can compress at a byte level so the compression tool would be agnostic of the file contents (which I presume these other tools are anyway, but they aren't working).

Is there perhaps some other way I can pull this fill down using less than 4.4GBs? I have no target file size in mind, but 4.3GBs for example is pointless (only 2-3%~ less).

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

Compression takes advantage of the fact that there are patterns in data that can be optimized out and indicated in a different way. This results in a drastic reduction in the number of patterns (since if a pattern was left then the original compression could just optimize it out instead of leaving it in the final file), which means that another round of compression can't perform much further reduction in size.

share|improve this answer
add comment

Your h264 stream is likely to already be highly compressed. Likely by attempting to compress it further you will in fact inflate the file size slightly (through the addition of headers, etc). You can't merely continue compressing a file down to a size that you like without compromising elsewhere, gzip and other compressors are not magic.

Likely the only way you can do this is by re-encoding your h264 stream to a lower bitrate.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.