Reduce h264 mp4 video size without recoding (like dvdshrink used to do this for DVDs)

1

1

I have a large bunch of MP4 files which I need to reduce in size to roughly half. I can recode them all of course, but I remember having used dvdshrink quite some time ago which had an option to reduce the size of mpeg-2 files to roughly half without recoding by just dropping data or something like that. Used to be very fast and retained a good quality, only problem was you could reduce by max. ~50%. But that would be enough for me. Is there any such tool currently available? Something open source maybe? Does anybody know the .264 standard well enough to tell me how to code this myself? Should be fairly easy? Read the file in openh264, drop some data, write it back?

Clarification (added after asking the question) :

I explicitly want to do compressed-domain video processing, not a full recode.

user2707001

Posted 2017-05-16T14:30:02.543

Reputation: 133

have you considered h265 ? it may be worth re-encoding. Same quality for 3/8 of the size.. – Neil – 2017-05-16T14:53:27.473

thanks for the comment. yes i considered it. but the real issue is the recoding time, i need to run for days to recode these videos, so this works but is so ugly that i'm searching for a viable alternative. – user2707001 – 2017-05-16T22:34:07.567

A good speed would be ~20x on a modern cpu. It's weeks of video runtime, would still take days. – user2707001 – 2017-05-16T23:06:24.737

Answers

0

DVD shrink would drop extra feature form the DVD. Like trailers, commentary tracks, behind the scenes, etc. If that did not make it small enough it would re encode. There is no 50% of useless data in an MP4 that can just be thrown away.

szatmary

Posted 2017-05-16T14:30:02.543

Reputation: 2 181

This is not what I said. Did you use dvd shrink? There's no useless data, in fact the image quality suffers a bit of course, but I'm sure that there was no full recoding done as it was very quick (>>10x) or my old cpu. Maybe they just changed the quantization or something like that.. I don't remember. – user2707001 – 2017-05-16T22:35:29.477

Just to make clear what I mean - if you have a progressive encoded jpeg file, you can easily reduce its size without recompressing by just dropping the last "pass" of coefficients. I want to know whether there is a similar way to do this for h264. – user2707001 – 2017-05-16T22:41:04.183

from https://en.wikipedia.org/wiki/DVD_Shrink : "The transcoder in DVD Shrink was unusual at the time of its release in that it employs compressed domain video processing technology to avoid a full decode and re-encode of the video stream. This boosts performance significantly as only part of the video stream is decoded and scraped.[3] "

– user2707001 – 2017-05-16T22:50:59.520