View Full Version : Requesting advices for TV samples
neutrogenik
4th April 2006, 22:45
I'm trying to get as close as possible from lossless result with my TV recorded videos using xvid (click here for the sample) (http://rapidshare.de/files/17046879/original.m2v.html), i'm getting something not too bad but i'm such a noob so i guess there is something better that can be done :helpful:
I used this script :
LoadPlugin("Tdeint.dll")
LoadPlugin("DGDecode.dll")
mpeg2source("original.d2v", idct=5 , cpu=4)
tdeint()
Lanczos4Resize(544,408) # i want to resize it to 4/3 so it looks the same than with mpeg2
encoding : xvid @ lossless setup (eqm ehr @q2)
decoding : YV12 for output colorspace / VMR9 renderer from Media Player Classic for solving bad red/blue chroma upsampling
screenshots : original (http://img486.imageshack.us/img486/4750/original7pu.png) / result (http://img486.imageshack.us/img486/871/avisynth4qb.png)
What I'd like to do is
1°) Deinterlace
2°) Cropping the borders
3°) Resizing for having the same aspect as viewing the mpeg2 (4/3)
4°) Removing the logos
... and loosing the less quality as possible from the original vid even if the filesize is 3 times larger.
I'm looking for any advices / scripts that could help me to do that.
:thanks: in advance
scharfis_brain
4th April 2006, 23:34
and loosing the less quality as possible from the original vid even if the filesize is 3 times larger. As I said earlier: leave it as it is.
I dunno what you want to achieve here.
1) Recompression reduces quality, especially, if not macroblock aligned
2) resizing reduces Quality
3) deinterlacing - if not done properly/if not necessary - reduces quality
So, why do you want to recompress this video at all cost even if the final filesize is bigger than the inital video? As I saw you even don't aim for higher resolutions....
neutrogenik
5th April 2006, 06:09
1) Recompression reduces quality, especially, if not macroblock aligned
2) resizing reduces Quality
3) deinterlacing - if not done properly/if not necessary - reduces quality
So, why do you want to recompress this video at all cost even if the final filesize is bigger than the inital video? As I saw you even don't aim for higher resolutions....
Because i'm watching the original vid in 4:3 mode, the resizing is automaticly done by my player software and i'd like to have a result which is close to that.
Moreover the vid needs to be deinterlaced, and it'd be even better to remove black bands and logos, because i'm watching it always on my computer.
And about the filesize, in fact i don't care about it if it's not huge files like real lossless codecs.
Thanks for answering :)
neutrogenik
5th April 2006, 13:36
2) resizing reduces Quality
I checked that and it's right, when i compare a screenshot from the original vid resized to 4:3 and a screenshot from the output vid that has been resized with a filter to 4:3 and encoded with uncompressed rgb it looks much more blurred.
I don't understand why the quality loss is greater with the filter than with my video player resizing process ???
scharfis_brain
5th April 2006, 13:52
I don't understand why the quality loss is greater with the filter than with my video player resizing process ???because you are downsizing the video in vertical. And then the player scales it a second time to fit the playing window.
THe original untouched video is only scaled once: to fit the playing window!
If you want to filter out logos and stuff, you can do that, but:
- don't scale
- don't crop (cropping with non-mod16 sizes shifts the block boundaries)
- don't deinterlace
- recompress to interlaced mpeg2
neutrogenik
5th April 2006, 15:06
If I understand what do you say in the first case the video is scaled to larger dim. by software and in the second one it's scaled to lower by encoding and then scaled to larger so that's why there is a quality loss.
What i don't understand then is why the TV video signal is not 4/3, it wouldn't be needed to convert and loose quality !
scharfis_brain
5th April 2006, 15:24
huh? I do not understand. digital TV signals NEVER has square pixels.
4x3 PAL commonly uses 704x576 pixels (in your case 544x576), which need to be stretched to 768x576 pixels.
But since analogue TV sets do not work with pixels it really doesn't matter which horizontal resolution is used (of course image resolution/detail is a matter), because analogue TV doesn't need any scaling in the horizontal domain.
Also I do not understand why you strictly want to convert the resolution to be 4x3 with AVI. Just leave it as MPEG2 and your Player will stretch it for you to 4x3 with minimal (or none) loss.
Also try NVideas Purevideo MPEGDecoder. It has a very nice inbuilt realtime deinterlacing which reduces shimmer and stairstepping a lot compared to the much simpler bob-method
neutrogenik
5th April 2006, 16:31
in fact i wanted to encode with xvid because with eqm ehr @ q2 it's near lossless quality and i don't know how to have the same with an mpeg2 encoder.
But since analogue TV sets do not work with pixels it really doesn't matter which horizontal resolution is used
So you mean that it's my TV player that is making this resolution with TV signal ? Strange because when i record a vid from different channels they don't have the same resolution, so i thought each channel signal had a specific resolution : ()
I'm gonna give a look to this NV Purevideo, thanks :)
foxyshadis
5th April 2006, 16:57
It's just that you aren't doing anything to the video. If you were heavily filtering it, that's one thing, but you can always deinterlace in realtime and the original mpeg-2 will already resize properly on playback. So there's no point in tripling the size.
As for tv, all analogue tv is ~4/3, but DTV can have different aspect ratios and can change aspect ratio anytime. DVDs do that too, you'll notice. I'm sure most channels just pick a preferred resolution and mostly stick to it though.
neutrogenik
5th April 2006, 18:13
scharfis > i just tested NV Purevideo and it's great, thanks 4 the tip ;)
foxy > they can change aspect ratio anytime but do you think i could look for another TV software that let me capture in another resolution ?
I'm still looking for a good mpeg2 encoder if you know some too :)
:thanks: again for the help guyz
scharfis_brain
5th April 2006, 18:22
they can change aspect ratio anytime but do you think i could look for another TV software that let me capture in another resolution ?
1) they do not change the display aspect ratio (DAR, which is either 4x3 or 16x9. ALWAYS!).
they are changing the pixel aspect ratio (PAR).
but a changing pixel aspect ration never affects the DAR. at least regarding Television standards.
so, 720, 704, 544, 528, 480 and 352 pixels horizontally and 576 pixels vertically can represent only two Display aspect ratios: 4x3 and 16x9.
2) you cannot capture DVB in another reolution than the one provided by the content provider (broadcaster/channel).
You capturing device is not receiving true images/video. it is receiving a data stream like a download from the internet!
3) A good encoder for interlaced contents is Canopus Procoder2
neutrogenik
5th April 2006, 20:08
they do not change the DAR
Of course but when i capture a vid it's with the PAR so if the PAR is not 4:3 i have to resize it, that's why i say why the PAR is not 4/3 ?
A good encoder for interlaced contents is Canopus Procoder2
Thanks for the info :)
Anyway what would be great is a video player that could detect black borders and fit the video window to the video image without the black borders isn't it ? :D
scharfis_brain
5th April 2006, 20:51
Of course but when i capture a vid it's with the PAR so if the PAR is not 4:3 i have to resize it, that's why i say why the PAR is not 4/3 ?Sorry if I sound a bit harsh now: I think you don't understand the concept of PAR/DAR.
This is one of the documents that try to explain it:
http://www.arachnotron.nl/videocap/doc/Karl_cap_v1_en.pdf
Also I say it again (3rd time or so...): you do not need to resize to 4x3. Just set the flags in your resulting video to 4x3. Then the player will do the proper scaling to 4x3.
Anyway what would be great is a video player that could detect black borders and fit the video window to the video image without the black borders isn't it ?No.
neutrogenik
5th April 2006, 21:21
Sorry if I sound a bit harsh now
No problem, i know i'm kinda slow to understand things, thanks for the link :)
Also I say it again (3rd time or so...): you do not need to resize to 4x3. Just set the flags in your resulting video to 4x3. Then the player will do the proper scaling to 4x3.
Yeah i understood how this thing is working, i was meaning "if I encode with xvid"
No.
You mean "No it's impossible" or "No it's useless, go back play CS and let the real guys give the good ideas" ? :D
scharfis_brain
5th April 2006, 21:35
Yeah i understood how this thing is working, i was meaning "if I encode with xvid"Then use .mkv instead of .avi and set the flags right. Resizing still is not necessary.
You mean "No it's impossible" or "No it's useless, go back play CS and let the real guys give the good ideas" ?No, I don't know a player offering such functionality.
neutrogenik
5th April 2006, 22:39
Then use .mkv instead of .avi and set the flags right. Resizing still is not necessary.
It's really working ? Omg it's great, gonna test this tomorrow :thanks:
No, I don't know a player offering such functionality.
I'm currently using MPC and i added this to repository, it'll maybe implemented one day ... in 2706 :D
:thanks: again for all your help :)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.