🔒 Locked
Simulating MPEG2 Compression
Advertisement
Original Post
I have somewhat of a dilemma. I am trying to do some compositing effects for fun. I was able to come up with this (500k) as a test. Despite the fact that the car has no suspension, no texture, and strange lighting, it still looks super imposed. Its obvious that the car is much sharper than the video. Now my target camera is the Sony HDR-FX1 and since its resolution is 1920x1080 I thought maybe it would compensate for the sharpness. I was wrong. Source Image 1 Source Image 2 Those two images show samples of what the capture quality is like after it has been shrinked from 1080i to 720p. I also did some minor adjustments to the color and grain. Even after that, you can still see visible artifacts that a 3d rendering will not have. I realized what I needed: I need to add color bleeding, mpeg2 compression artificats and a smidge of grain in order to properly blend this and I don't know where to start. Does anyone have any suggestions? Edit: On an unrelated note...holy crap there's a train passing by my place and its loud like you wouldn't believe.
Actually I'm trying to do the reverse here. I'm trying to make a 3d rendering look as if it was captured on a CCD to enhance the blending. Then after that I'll go into the cliche "film effect" that everyone wants. I know it sounds backasswards but it would probably look more convincing to have all the effects blend in the same ways.
Could you render your 3D stuff to a seperate movie file, mpeg compress it with a high compression rate, then merge this with the video footage.
And perhaps keep an original to use as a mask when combining the two?
Just a thought.
And perhaps keep an original to use as a mask when combining the two?
Just a thought.
Thats quite a valid solution, but it brings up a few problems here. Firstly, by compressing to mpeg2 is somewhat counter-productive and very time consuming. Considering the fact that a single computer will spend 24 hours to compress 2 hours worth of MPEG2-TS at 80mbps is a little discouraging. Mainly because it would be a pain having to do it for each pass. Also, this still doesn't solve the color bleeding issue that the CCDs create.
Well perhaps just compress to mpeg1 instead, it should be a bit faster, and afaik virtualdub here does that.
Or of course you could run a paintshop pro batch process to save each frame as a jpeg with high compression. ;-)
As for the bleeding, not sure, could you render your scene with a filter effect to produce that?
[edit] I really need to brush up on my html ;) [/edit]
Or of course you could run a paintshop pro batch process to save each frame as a jpeg with high compression. ;-)
As for the bleeding, not sure, could you render your scene with a filter effect to produce that?
[edit] I really need to brush up on my html ;) [/edit]
If anyone knows anything about mpeg2 compression then please speak up...
I just had an idea. What if there was a plugin that would "compress" the image with the mpeg2 algorithm only enough to barely affect it. If you look at the source images, you'll notice that there isn't much compression at all. Only fine details degrade with distance. I probably need to factor in focus here too now. Anyway, I don't want to go outside of after effects again because the post production process for this project is complicated enough. There must be a cleaner solution to this!
I just had an idea. What if there was a plugin that would "compress" the image with the mpeg2 algorithm only enough to barely affect it. If you look at the source images, you'll notice that there isn't much compression at all. Only fine details degrade with distance. I probably need to factor in focus here too now. Anyway, I don't want to go outside of after effects again because the post production process for this project is complicated enough. There must be a cleaner solution to this!
As you are only looking to introduce the MPEG like artifacts, but don't need an actual MPEG stream (just individual images), why not look at using high quality JPEG compression. Since no motion compression needs to be done, it would be much faster to just compress and then decompress from JPEG, an algorithm that is very similar to MPEG, minus the motion prediction (and should look the same as high quality MPEG, they would only diverge if you started getting into low bitrates where motion has a highly percievable effect on compression).
If you're trying to simulate CCD artifacts, you want to do some filters on the color channels. I'm not sure what exactly, but IIRC CCDs don't actually capture all 3 channels per-pixel. Figure out what kind of interpolation it does and you can probably reverse engineer it to get the effect on a 'perfect' image. You'd probably want to apply those filters AFTER you superimpose, but only to the parts of the frame that weer changed so that way the edge of the superimposed image might adopt colors from the nearby 'real' image around the edges.
"color bleeding" isn't all that you need. here are a few things to do.
1) a slight motion blur (match the shutter-speed of your source video)
2) a slight defocus blur to match the focus pull of the camera.
4) color keying to match the atmosphereic haze in the scene.
3) and then maybe use a MJPEG compressor to introduce artifacts would help plant the object in the frame (just dont screw up the alpha channel mask).
But whats really making it stick out like a sore thumb, as you know, is lack of lighting, lack of texture, and the completely fake-looking specular highlight. Though you did a really good job on the motion track.
Really, for special effects shots like this, you should use a light probe to sample the light/reflections from the day. That will give you a good head start for matching the lighting.
Editing/Post from MPEG2 is never a good idea in the first place. If at all possible depending on the editing software you are using it should be DV or MJPEG. Any interframe compression codec is not a good idea for video editing, and the less compression the better. (Not many software packages support DV50 though, which is what you would need for the resolution you are working at.)
1) a slight motion blur (match the shutter-speed of your source video)
2) a slight defocus blur to match the focus pull of the camera.
4) color keying to match the atmosphereic haze in the scene.
3) and then maybe use a MJPEG compressor to introduce artifacts would help plant the object in the frame (just dont screw up the alpha channel mask).
But whats really making it stick out like a sore thumb, as you know, is lack of lighting, lack of texture, and the completely fake-looking specular highlight. Though you did a really good job on the motion track.
Really, for special effects shots like this, you should use a light probe to sample the light/reflections from the day. That will give you a good head start for matching the lighting.
Editing/Post from MPEG2 is never a good idea in the first place. If at all possible depending on the editing software you are using it should be DV or MJPEG. Any interframe compression codec is not a good idea for video editing, and the less compression the better. (Not many software packages support DV50 though, which is what you would need for the resolution you are working at.)
I never even thought of the atmosphereric haze. Thats actually a really important one that I'm probably forgetting here.
As for the editing, I wish I could have a cleaner source using something uncompressed, but I can't. Since its only a prosumer camera, it uses HDV which is 19mbps MPEG2-TS over firewire. Similar technology to HD digital satellite streams. Theoretically I could bring a laptop and record over component out using some mystery custom HD recording hardware that will record at the full 190mbps, but I don't see that happening either.
Anyway I think you're all on to something. Its not the mpeg2 artifacts that I need to get...its something else. And I think the CCD process might help this out a lot more.
See lighting isn't something I'm too concerned about right now. I know its one of the biggest parts of getting this done right. However, lighting is useless if the edges of my objects are too sharp.
As for the editing, I wish I could have a cleaner source using something uncompressed, but I can't. Since its only a prosumer camera, it uses HDV which is 19mbps MPEG2-TS over firewire. Similar technology to HD digital satellite streams. Theoretically I could bring a laptop and record over component out using some mystery custom HD recording hardware that will record at the full 190mbps, but I don't see that happening either.
Anyway I think you're all on to something. Its not the mpeg2 artifacts that I need to get...its something else. And I think the CCD process might help this out a lot more.
See lighting isn't something I'm too concerned about right now. I know its one of the biggest parts of getting this done right. However, lighting is useless if the edges of my objects are too sharp.
The target resolution is 1280x1024 (progressive) with anamorphic pixels to support a 2.35:1 aspect ratio for presentation in a theater. If I'm going to use Standard Definition then I might as well use a cheaper camera.
Its not a matter of getting rid of the artificats after the compositing. Its a matter of putting them in before hand. I have the post-post production process down to an art. 3:2 pulldowns, color correction, additional filtering and what not. I just need to blend 3D polys with real life objects.
I dunno...ratings++ for the help anyway.
Its not a matter of getting rid of the artificats after the compositing. Its a matter of putting them in before hand. I have the post-post production process down to an art. 3:2 pulldowns, color correction, additional filtering and what not. I just need to blend 3D polys with real life objects.
I dunno...ratings++ for the help anyway.
It actually looked quite good to me. I think that perhaps the car just needs a very slight gaussian blur; the background just has a more "smooth" feel to me. I also think that the motion blur isn't quite right, but I can't put my finger on exactly why. I don't think compression is really the issue.
EDIT: I think that, perhaps, the lighting is a bit off somehow, also. Perhaps if you play with the levels of the car it'll "fit in" better.
EDIT: I think that, perhaps, the lighting is a bit off somehow, also. Perhaps if you play with the levels of the car it'll "fit in" better.
Yes the lighting is off, but that is involved in the rendering pipeline, not the compositing. Here's what I"m talking about

Edit: That png version is messing up...here's the jpg

Edit: That png version is messing up...here's the jpg
For some reason that video is black for me, but my work machine is a bit of a mess so I probably don't have the right codecs installed or something.
Anyway check out some of Ben Dawkins' clips, especially this one of a Bogdan Raczynski track for some match move/tracking inspiration. The compositing is pretty good.
sam.
Anyway check out some of Ben Dawkins' clips, especially this one of a Bogdan Raczynski track for some match move/tracking inspiration. The compositing is pretty good.
sam.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement