Log in

View Full Version : Upscaling from 640*480


ficofico
5th December 2006, 00:15
I want to film videos with my 5200 coolpix, the camera record in 640*480 30 fps. If I want to convert this format in PAL, which value of crop are exact to preserve original ratio?

Lanczos4Resize(720, 576, ????, ?????, 640, 480)

Tanks.

foxyshadis
5th December 2006, 02:27
You're going for a 1:1 pixel ratio, right? And you want no black borders? Then you calculate it as 480/576*720, giving 600. So you should crop 20 off each side.

If you don't mind black borders, switch it around: 720/640*480=540, so you would pad 16 pixels with black, probably the bottom 16. (Going halfsies would screw up the encoding.)

G_M_C
5th December 2006, 09:24
My guess is taht you want to convert to PAL, because of the size you want to convert to is the PAL pixel ratio (720 x 576).

You could also just simply resize to 720 x 576, en force Xvid to encode als 4:3 PAL. Than you wont have to pad of crop anything, and stay to the 4:3 aspect ratio like 640x480.

This way would be my choise., because many stand-allone players these days honour the PAR (*), at least mine does :). So you can get full PAL resolution on stand-allones quite easily these days, no matter if it is 16:9 anamorphic or 4:3 (also anamorphic ;) ).

For resizing I allways prefer one of the 2 spline-resizers, because it gives a more balanced result imho (less sharp, but equally detailed).

So i would simply use;
Spline36Resize (720,576).

Then force the PAR to 4:3, telling Xvid that a pixel isn't square, but has a ratio of 4:3. The display sould then resize automatically to 768 x 576 wich is 4:3 aspectratio again. This is actually the way it happens on PAL TV systems.

But remember to change the framerate, PAL only does 25 FPS progressive or 50 FPS interlaced.

Read the AviSynth manual on how to do that (it comes with the installer, and should be in the start-menu ifolder avisynth).. And btw. the manual also describes the command xxxxxxxResize (xxx,xxx), just look under R of Resize. You can read more on how to resize there :)

(*) PAR stands for Pixel Aspect Ratio btw.

2Bdecided
5th December 2006, 13:47
IMO you should go for 704x576 without any cropping.

This is a fully supported DVD resolution, 4:3 aspect ratio without padding.

Changing the frame rate is a much bigger deal - it's a pity these cameras can't be set to record at 25fps or 50fps!

Cheers,
David.

ficofico
5th December 2006, 16:54
Changing the frame rate is a much bigger deal - it's a pity these cameras can't be set to record at 25fps or 50fps!

My camera have the 2 standard video on setting (pal & ntsc) but even change settings the frame rate and the resolution doesn't change!!!!:confused:

You could also just simply resize to 720 x 576, en force Xvid to encode als 4:3 PAL. Than you wont have to pad of crop anything, and stay to the 4:3 aspect ratio like 640x480

I use "super", great program that convert videos in "all" format from "all" format and resolution.
In the option I can change the resolution and aspect ratio of videoclip, but I haven't understand why resizing video from 640*480 to 720*576 and setting 4:3 of aspect ratio the video result without black borders. Super can accept avisynth script, then I've tried to convert the video whit avisynth and with black borders and true aspect ratio with a script.

Spline36Resize (720,576)

Now try this script and write my opinion, thanks.

Frame rate isn't a problem, super can change frame rate and sync video and audio at the same time with the "avisynth most used way".



p.s. Camera record with .mov extension with Jpeg encoders video. 1 second is about 1,35 mega:eek: (45 min, 4 giga memory card), but the result are very nice, only a lot of grain and noise (avisynth rulez), but without block and with a good definition.

foxyshadis
5th December 2006, 17:52
In the option I can change the resolution and aspect ratio of videoclip, but I haven't understand why resizing video from 640*480 to 720*576 and setting 4:3 of aspect ratio the video result without black borders. Super can accept avisynth script, then I've tried to convert the video whit avisynth and with black borders and true aspect ratio with a script.

It's because when you set the AR in the file, the playback system reads it and resizes the video to match. All DVDs are encoded that way. If you just open the script in virtualdub, it'll look all wrong, but that's because the AR hasn't been set yet (and vdub wouldn't read it even if it was).

2Bdecided
6th December 2006, 13:37
My camera have the 2 standard video on setting (pal & ntsc) but even change settings the frame rate and the resolution doesn't change!!!!:confused:


Same here - it changes the TV out, but not the capture/record format.

Using the camera to play back the 640x480 30fps footage at Xx576 50i (i.e. PAL output) isn't great, so set it to NTSC (which my TV supports anyway), not that I watch the output this way very often.

Cheers,
David.

wonkey_monkey
6th December 2006, 17:42
IMO you should go for 704x576 without any cropping.

This is a fully supported DVD resolution, 4:3 aspect ratio without padding.

I've never seen a DVD at 704x576 - I think you're right that it's supported, but I've only ever seen 720x576.

Then force the PAR to 4:3, telling Xvid that a pixel isn't square, but has a ratio of 4:3.

That's telling the decoder that the video has a 4:3 aspect, not the pixels. The pixels have a (if I've got my numbers right) 16:15 aspect ratio (for 720x576).

David

foxyshadis
6th December 2006, 21:05
I've never seen a DVD at 704x576 - I think you're right that it's supported, but I've only ever seen 720x576.
704 (or 702) is the ITU standard for overscan. You resize to 704 and then pad with black borders to 720. With the steady decline of TVs that even have overscan, though, its popularity is waning. (Further reference (http://forum.doom9.org/showthread.php?p=252751#post252751), and there's a lot more around the board.)

wonkey_monkey
6th December 2006, 23:49
704 (or 702) is the ITU standard for overscan. You resize to 704 and then pad with black borders to 720.

So your resize your 4:3 source, say a 640x480 image, to 704x576, and then pad? So your pixels have a ratio of 60:55? :eek:

David

Alain2
7th December 2006, 20:34
PAL standard is indeed a SAR of 59:54
Quick and easy summary (http://www.mir.com/DMG/aspect.html)

wonkey_monkey
7th December 2006, 20:42
Wow, you really learn something new every day here. Think how much simpler life would have been if they'd started out with square pixels, no interlacing, and the same frame rate/resolution on both sides of the Atlantic...

David

binba
4th March 2007, 21:13
Think how much simpler life would have been if they'd started out with square pixels, no interlacing, and the same frame rate/resolution on both sides of the Atlantic...

It's called HDTV ;)

wonkey_monkey
4th March 2007, 22:56
It's called HDTV ;)

You're exactly right, apart from the bit about no interlacing and having the same frame rates ;)

David

binba
5th March 2007, 09:08
Ok, it's called HDTV 1080p24.
How 'bout that? :p

2Bdecided
5th March 2007, 13:23
704 (or 702) is the ITU standard for overscan.

It doesn't matter how many times doom9 forum members say this, it won't make it true. 720vs702 has nothing to do with overscan, and everything to do with sampling an analogue video waveform and making sure you get both edges, even if the timing slips a bit!

Cheers,
David.

binba
5th March 2007, 23:06
I couldn't find any connection between the ITU and the 704, all I did find is an ITU-R tutorial (http://www.itu.int/dms_pub/itu-t/opb/tut/T-TUT-OPAVQ.04-2004-PDF-E.pdf)which actually calls for a 14 frame lines / pixels non-active video region from each and every side of the frame (p. 32) which would make it 692...
ITU-R BT.601 (aka CCIR 601) specifies 720 samples per line. 704 is in ATSC, and I think also in the MPEG specification.

Mug Funky
6th March 2007, 05:35
704 is "D1 cropped", and is perfectly DVD compliant.

of course, how DVD players handle this (particularly with subtitles) can be another issue, but shouldn't be bothersome even if it is (it's not a big difference). if you were working 352x480 you'd have to be careful with subtitles. some authoring programs actually allow the mixing of 352, 704 and 720 assets in the same VTS, which is completely not-compliant (see a particular DVD's extras disc where black spacers of 720 were put in with talking-head footage at 352. some players crashed, some worked fine, some played half-width footage. it's random. this problem was of course fixed as soon as it was discovered, but it's disturbing that the authoring software threw no errors or even warnings).

i'd just take it up to 720.