Log in

View Full Version : interesting idea for better compression. thoughts?


evilhomer
3rd September 2002, 00:20
I got the idea from windvd4. It has this crazy feature that lets you play a movie faster. So a 1 hour movie can be finished in 45mins, etc. It compensates for the voice distortion amazing well, you don't even notice (relatively, depending on how fast you're going) that you're watching the movie speeded-up.

Is there a way to make a divx, using this speeded-up idea? Saving Private Ryan barely makes an acceptable 2 disc divx, but if it played so it was 30 minutes shorter that would allow more bits/(pixel*frame). I'm sure some people would hate the idea, but those people are probably more concerned with keeping the director's original intent (and thus should probably stick to the DVD itself ;)) than with compressibility. I make primarily 1 CD rips. Anyway, anyone have any idea how I could do this?

redcane
3rd September 2002, 00:46
Video is easy, just interpolate the frames into less frames... Changing sound speed is easy, but holding correct pitch isn't.... You have to speed it up, and then adjust the pitch (pitch bend) it back down. The thing is your no longer really compressing video, your just modifying it... Kind of like resampling a WAV to 8Khz to save space, and sampling it back to 44Khz... your just throwing video away.... It would be kind of like a more subtle time-lapse-video....

All you need is a good video editing suite, and a good sound editor, split the video and the sound, shorten the sound by speeding it up and pitch bending, then modify the frame rate of the video and throw away some frames!

By all means, go ahead, but don't send any of your "compressed" vids my way.

evilhomer
3rd September 2002, 02:27
give yourself a blind test, that's how I discovered the feature.

I walked in on someone who was watching 15% faster, sat down and had no idea. Only when the movie was over did I find out. I bet you couldn't tell the difference either....

What program could I use to interpolate? Much better idea than 'decimate.' :)

redcane
3rd September 2002, 12:24
Are you planning on undoing your little speed up later? I bet you can notice....

Anyway I imagine it would be a bit like the difference between an axe in the head and a sledgehammer.... your not going to notice the difference.

I don't know what you might use... Personally I'd write a filter plugin to transcode to do it and use an external program to repitch the sound.

pacohaas
3rd September 2002, 16:54
could this be done by encoding at a higher fps, 35fps or something, then using a playback filter that would play at the original ~30fps?

Antti
3rd September 2002, 17:24
I don't think it's a great idea. Temporal compression of audio & pitch shift shouldn't be any better than saving bits by resampling audio to 32 kHz (and/or using lower quality encoding). Just encoding at higher fps doesn't do any benefit, and frame rate decimation looks horrible.

evilhomer
3rd September 2002, 23:26
redcane: Yes I agree with you that it would look terrible if I undid the speed-up it for playback. I was just thinking of leaving the movie shorter like that. As I said I didn't even notice when watching.

Antti: I'm really not sure how they do it, but to my ears there is almost zero quality loss. You should try it, the trial of windvd is free. www.windvd.com I think. (and yes, decimation looks terrible, but it does kinda look like the scene with the ramblers in "resevoir dogs" :))

pomo
4th September 2002, 01:32
when you like the idea of speeding up movies you'll probably like PAL, because (as far as I know, I may be wrong) a PAL DVD which is created from a Theatre-movie (Cinema) is just speeded up 1fps because the original movie in cinemas is running @24fps and the PAL version is running @25fps which also explains why PAL releases are about 5 mins shorter than NTSC (which run wether neraly @24fps(23.97..) or are pulldowned to neraly 30fps(29.97..).)

I know this doesn't completely fit in this thread but makes at least clear that one doesn't see the difference as long as it is not much (1fps-faster=4%-faster).

Antti
4th September 2002, 08:07
@evilhomer: 30 % reduction in audio track time means also that 30 % of samples are thrown out, because you still have 48,000 samples per second. Thus temporal compression + pitch shift contains implicitly a low pass filter. If you have a mp3 (or vorbis) file of certain size, try to resample it (from original, of course) to 32 kHz and make a 30 % smaller file. I wonder if you hear the difference, because the effect should be roughly same as in you method.

((( atom )))
4th September 2002, 08:44
i am sure speeding up a movie would put a subtile stress to it, maybe not really noticeable but surely there. in other words i guess it would go on your nervers and you couldn't even tell why you were stressed a little more afterwards. life isn't meant to be speeded up and anyway that is what is done to us more and more. optimized life.. no time left for shit. my movies are freetime (little there is..) so relax........

just my recommodation..

/jc

Belgabor
4th September 2002, 16:53
This is a very bad idea (Yes, I'm holding myself back from saying 'crap' ;) ). This only works in WinDVD because your not kicking out frames. If you start to kick out frames to actually safe space this will be very noticable (interpolation bewteen frames, jerky movements). Guess why they are speed up a film to 25 fps for PAL and not recalculate the frames.

Cheers
Belgabor

TheXung
5th September 2002, 07:09
For some reason this thread has motivated me to go out an find a player that will play my 24 fps movies at 26 or 27 fps. That way, I can watch a movie 15 minutes faster.

Anyway on topic again, this will make for some shitty frames. You're better off clipping out parts of the movie. broadcast tv does it all the time. Robin Hood Prince of Thieves is a 2:30 hour movie yet has always been broadcasted with much shorter runtimes. There were numerous scenes that I had never seen before watching the DVD. Seriously, you can get away with clipping scenes. The only way you can get away with speeding up video is with extremely powerful and probably non-existent temporal interpolation software.

However, you may be able to run with this idea with cartoons or some vector based "codec" like flash.

oddball
5th September 2002, 09:48
DiVXG400 can speedup 23.976/24FPS to 25FPS PAL standard.

Chibi Jasmin
5th September 2002, 11:28
DVobSub let's you enter any frame rate you want :)

adam
5th September 2002, 21:08
Forget about the logistics of making this work, how does this even accomplish anything?

Bitrate is allocated per second!

Just because your playtime is shorter that doesnt mean you are going to be able to get a higher bitrate. Those extra frames didn't disappear they are just being displayed faster. Your playtime may be, say %15 shorter but the number of frame per sec will be %15 higher, so the bitrate is still being spread out over the same number of frames. Its all relative, either way you still have the same exact number of bits per pixel so the quality doesn't change. Its just like pal. Its sped up by %4 so your playtime is %4 shorter but your fps is %4 larger...they cancel each other out.

Now if you were to decimate frames that would be another issue entirely.

Actually this is exactly the process that many broadcasting companies use. They have highly sofisticated hardware devices that can intelligently remove frames at points where they won't be noticable. It sounds weird but its true. By using this frame decimation techinque they decrease playtime by around 5 mins for every 1 hr of film, just enough to squeeze in a couple extra commercials, and this is exactly why they do it. Of course they do this in addition to editing out certain scenes as well.

I remember there was some controversy over this process a couple years ago when it was used on the SuperBowl broadcast because it is supposed to be a live broadcast but this process requires processing, so its not actually live because it adds a couple secs delay.

Anyway, uless you have access to this kind of technology I don't think you are going to be able to pull off decimating random frames without causing noticable playback problems, and simply speeding up your playback speed won't affect your bits per pixel ratio. You'd be much better off just editing out entire scenes from the movie.

Maybe its a pipe dream but this would make a great filter, one that could intelligently remove frames with a totally unoticable result. Hell the professionals do it why not us?

evilhomer
6th September 2002, 20:01
i wasn't just wanting to make my movies shorter. i wanted to do it for the purposes of improving compression. cutting scenes is undesirable, and playing faster doesn't satisfy the compression aspect.

let's think for a minute about bits/second. bits are constant limited by CD size. as I said, I mostly make 1 CD rips, so for the purposes of our discussion we'll say total bits = 700mb.

a 90min movie playing at the same fps as a 100min movie will have better quality because there are more bits/(pixel*frame). WITHOUT decimating frames, i'm trying to figure how to acheive this effect.

everyone should really try windvd4 to see this.

adam
6th September 2002, 20:59
Didn't you read my post?

The only way to make a 100min movie into a 90 min movie and maintain the same fps is to remove frames, thats just common sense. Your fps is your playback speed, if you change your playback speed than you change your fps. If you simply speed up playback, which is what you are suggesting, then you are increasing the fps proportionally, so even though you have say, %10 more bits every second, you have %10 more frames every second also. It all cancels out and all you end up with is bizarre looking playback.

Ok here's an anlogy. Lets say you have $100 and you owe me exactly $100. It doesnt matter if you pay me $10 a day over 10 days (lets say, 29.97fps)or $20 a day over 5 days (60fps,) the result is the same. You still have the same amount of total money (bitrate) being spread out to cover the same amount of total debt (pixels.)

Now give me my $100.

TheXung
6th September 2002, 21:32
The only way to do what you want to do is to generate temporally interpolated frames. This is not easy, at least not for high action scenes, or when there's scene changes in the way. This is actually best done within a codec since only in there are the motion vectors already calculated. And no matter what you do, interpolated data will always look less sharp. And there's no garantee if you would get anything out of this; having less frames to portray an event will make the motion vectors larger, scenes with larger motion vectors will have larger residues to store, etc.


ps. don't take lightly the gains one can realize by cutting out scenes.

CaPPyD
7th September 2002, 19:16
After reading everything in this thread, I think that the bottom line is:

IT CAN'T EASILY BE DONE!!!!!!!!!!!!

Belgabor
8th September 2002, 20:17
no its:
IT ABSOLUTELY CAN'T BE DONE WITHOUT SERIOUS IMPACT ON QUALITY

evilhomer
8th September 2002, 22:25
balgabor: try it in windvd! it happens with minimal impact on quality.

Slogra
8th September 2002, 22:38
Originally posted by Belgabor
no its:
IT ABSOLUTELY CAN'T BE DONE WITHOUT SERIOUS IMPACT ON QUALITY

^^^

WinDVD just plays the movie faster, no frames are dropped.

Belgabor
9th September 2002, 11:14
I start to go low on possibilities to explain it so you will understand. Perhaps if i put it this way. What takes space on a cd are frames, not time. So to get lower you need to ditch frames. If you do that, the film will look like crap. WinDVD doesnt ditch frames (like said in the post before this), so it doent look like crap. But the way WinDVD does it YOU HAVEN'T GAINED A SINGLE BIT!!!!

Cheers
Belgabor

redcane
9th September 2002, 13:17
Originally posted by Slogra


^^^

WinDVD just plays the movie faster, no frames are dropped.
So it still plays a full DVD full of info, just faster, thus increasing bits per second, and decreasing seconds proportionally, ending up with the same mount of total its.... Wow!!!

so if you reduce fps, and maintain identical bits per frame your just losing quality by reducing frame rate, but you do get a smaller amount of bytes per second.... joy.

oddball
25th September 2002, 18:44
Doesn't work on DiVX unfortunately. Cannot speed it up or slow it down.

Also does not work with AC3 output (For me at any rate) just kinda plays the audio and video superfast (Don't hear the audio) no matter what when SPDIF is enabled in WinDVD 4.