Log in

View Full Version : suggestions for PAL 576p (HD!) to 576i


frednerk
4th February 2006, 03:12
Hi people... in Australia, channel 7 is allowed to claim PAL 576p@50hz (720x576 progressive) is HD and broadcast it :)

Captured and burned-to-DVD their demo clip "Great outdoors in HD" (usng PVAStrumento etc) but it seems to have a "horizontal shimmering lines" effect in the best parts of the clip (beach sand and water scenes) in my el-cheapo DVD player. Not sure of the technical term for this, happy to be enlightened so I could do some searching and see if filtering could also help.

Just wondered if capturing the (HD!) 576p and turning it into 576i could let it play better in my situation, worth a try with and without filtering (suggestions welcome), but don't know how... any script suggestions for making a 576p clip into 576i ?

Cheers

midnightsun
4th February 2006, 03:26
if it's really 576p@50Hz a simple


assumexff().separatefields().converttoyuy2().selectevery(4,0,3).weave()

[where x is either t (top field first) or b (bottom field first)]

will do the trick, giving you 576i at 25frames/s

frednerk
4th February 2006, 04:38
Thanks midnightsun. Will give it a go tonight.

Tinkered some more and the artifacts appear in the original capture when played on the PC... a link to 4.3Mb sample clip is:

URL removed, as clip no longer relevant

See on the logs of the jetty, and the bow of the boat... Pity, smooth clip and smooth music to it, very relaxing and even more so if I can beat this. Any ideas on the technical term for it so I can search here some more for appropriate filters ?

Cheers Dave

frednerk
4th February 2006, 09:40
Hi, from searching the forum on what the "shimmering" could be,

in Aus channel 7 is broadcasting PAL 576p@50hz - do the artifacts look to you like they could be a result of poor interlaced resizing technique prior to or during deinterlacing into a result for broadcasting ?

I'd value your analysis.. I wonder what the clips started life as. It may be from NTSC in which case I can't guess what was done. At face value it seems to be a series of less than optimal choices by the local channel (576p as its ongoing HD format, then unfortunate video manipulation technique to process material for its flagship HD demo loop for all hours) ?

Thankyou.

scharfis_brain
4th February 2006, 10:49
it seems to be a 1080i to 576p downconversion with massive sharpeing applied.

also the content is 25p!
in this sample you'll find frames 1&2, 3&4, 5&6 etc. being pairs.

I don't know whether the whole movie stays 25p from beginning the to the end.

If it is 25p all the time, try this to get 576@25p:

mpeg2source("shimmering-clips.d2v")
trim(1,0) #comment this line, if you get horrible blending
merge(last,last.trim(1,0)).selecteven()

if it still shows horrible ghosting/blending, you should use the re-interlacing approach and encode as 576@25i


mpeg2source("shimmering-clips.d2v")
trim(1,0)
converttoyuy2()
assumetff()
separatefields().selectevery(4,0,3).weave()

frednerk
5th February 2006, 09:00
Crikey, thankyou scharfis_brain :goodpost: you are indeed switched on with your answers and intelligent observations.

Gentle hint - a lengthy post, please forgive me in advance and use your wheely mouse to skip past it quickly :) :devil:

I don't know whether the whole movie stays 25p from beginning the to the end.
Thanks, had a look via VirtualDubMpeg2 it does indeed seem to be 25p in a kind of way, there being "closely related frame pairs" (0,1) (1,2) etc all the way through... although many of the frames in each pair are visibly different in some way seemingly unrelated to movement... the island clip below shows something of that in the waves as do other parts with horizontal movement.
Clips 1.2Mb extracted using Mpeg2Schnitt v7.19 from the captured .TS via PVAStrumento, so are "unprocessed":
URLs removed as clips no longer relevant

I almost cracked a beer at your superlative knowledge, as it worked a treat on the PC screen... alas via HC (*CQ_MAXBITRATE 2 and 9100) and NERO to the Sony DVP-NS530 DVD player and SONY TV, it didn't seem to make much difference - still the "shimmering" even though HC's .mpv looked reasonable when played on the PC via MP9. Also verified same effect on a separate older, dumber, DVD/TV combo.

In desperation :scared: I tried burning/playing combinations via these rather raw :o scripts:

1. Re-Interlacing script

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
# ran DGIndex over it, as dgdecode threw up at the mpv
iMS1 = mpeg2source("D:\HDTV\shimmer2\shimmer1-boats.d2v").trim(0,49)
iMS2 = mpeg2source("D:\HDTV\shimmer2\shimmer2-jetty.d2v").trim(0,49)
iMS3 = mpeg2source("D:\HDTV\shimmer2\shimmer3-island.d2v").trim(0,49)
iMS4 = mpeg2source("D:\HDTV\shimmer2\shimmer4-boat.d2v").trim(0,49)
iMS = iMS1+iMS1+iMS1+iMS1+iMS1 + iMS2+iMS2+iMS2+iMS2+iMS2 + iMS3+iMS3+iMS3+iMS3+iMS3 + iMS4+iMS4+iMS4+iMS4+iMS4
iDS1 = DirectShowSource("D:\HDTV\shimmer2\shimmer1-boats.mpv").trim(0,49)
iDS2 = DirectShowSource("D:\HDTV\shimmer2\shimmer2-jetty.mpv").trim(0,49)
iDS3 = DirectShowSource("D:\HDTV\shimmer2\shimmer3-island.mpv").trim(0,49)
iDS4 = DirectShowSource("D:\HDTV\shimmer2\shimmer4-boat.mpv").trim(0,49)
iDS = iDS1+iDS1+iDS1+iDS1+iDS1 + iDS2+iDS2+iDS2+iDS2+iDS2 + iDS3+iDS3+iDS3+iDS3+iDS3 + iDS4+iDS4+iDS4+iDS4+iDS4
# AVIsynth doco MERGE() is a bit thin, its example suggests this script averages frame N and N+1 Luma/Chroma into N
jMS=iMS.trim(1,0)
kMS=merge(iMS,jMS)
mMS=merge(jMS,jMS.trim(1,0)) # just for fun
iMS1 = iMS.assumetff().separatefields().selectevery(4,0,3).weave()
iMS1 = iMS1.ScriptClip("""subtitle("MS1.Simple Reinterlace TFF Frame " + string(current_frame),size=20,x=40,y=40)""")
jMS1 = jMS.assumetff().separatefields().selectevery(4,0,3).weave()
jMS1 = jMS1.ScriptClip("""subtitle("MS2.Trim(1,0) then Reinterlace TFF Frame " + string(current_frame),size=20,x=40,y=40)""")
kMS1 = kMS.assumetff().separatefields().selectevery(4,0,3).weave()
kMS1 = kMS1.ScriptClip("""subtitle("MS3.merge(i,i.trim(1,0)) then Reinterlace TFF Frame " + string(current_frame),size=20,x=40,y=40)""")
mMS1 = mMS.assumetff().separatefields().selectevery(4,0,3).weave()
mMS1 = mMS1.ScriptClip("""subtitle("MS4.Trim(1,0) then merge(i,i.trim(1,0)) then Reinterlace TFF Frame " + string(current_frame),size=20,x=40,y=40)""")
iMS2 = iMS.assumeBFF().separatefields().selectevery(4,0,3).weave()
iMS2 = iMS2.ScriptClip("""subtitle("MS1.Simple Reinterlace BFF Frame " + string(current_frame),size=20,x=40,y=40)""")
jMS2 = jMS.assumeBFF().separatefields().selectevery(4,0,3).weave()
jMS2 = jMS2.ScriptClip("""subtitle("MS2.Trim(1,0) then Reinterlace BFF Frame " + string(current_frame),size=20,x=40,y=40)""")
kMS2 = kMS.assumeBFF().separatefields().selectevery(4,0,3).weave()
kMS2 = kMS2.ScriptClip("""subtitle("MS3.merge(i,i.trim(1,0)) then Reinterlace BFF Frame " + string(current_frame),size=20,x=40,y=40)""")
mMS2 = mMS.assumeBFF().separatefields().selectevery(4,0,3).weave()
mMS2 = mMS2.ScriptClip("""subtitle("MS4.Trim(1,0) then merge(i,i.trim(1,0)) then Reinterlace BFF Frame " + string(current_frame),size=20,x=40,y=40)""")
#
jDS=iDS.trim(1,0)
kDS=merge(iDS,jDS)
mDS=merge(jDS,jDS.trim(1,0)) # just for fun
iDS1 = iDS.assumetff().separatefields().selectevery(4,0,3).weave()
iDS1 = iDS1.ScriptClip("""subtitle("DS1.Simple Reinterlace TFF Frame " + string(current_frame),size=20,x=40,y=40)""")
jDS1 = jDS.assumetff().separatefields().selectevery(4,0,3).weave()
jDS1 = jDS1.ScriptClip("""subtitle("DS2.Trim(1,0) then Reinterlace TFF Frame " + string(current_frame),size=20,x=40,y=40)""")
kDS1 = kDS.assumetff().separatefields().selectevery(4,0,3).weave()
kDS1 = kDS1.ScriptClip("""subtitle("DS3.merge(i,i.trim(1,0)) then Reinterlace TFF Frame " + string(current_frame),size=20,x=40,y=40)""")
mDS1 = mDS.assumetff().separatefields().selectevery(4,0,3).weave()
mDS1 = mDS1.ScriptClip("""subtitle("DS4.Trim(1,0) then merge(i,i.trim(1,0)) then Reinterlace TFF Frame " + string(current_frame),size=20,x=40,y=40)""")
iDS2 = iDS.assumeBFF().separatefields().selectevery(4,0,3).weave()
iDS2 = iDS2.ScriptClip("""subtitle("DS1.Simple Reinterlace BFF Frame " + string(current_frame),size=20,x=40,y=40)""")
jDS2 = jDS.assumeBFF().separatefields().selectevery(4,0,3).weave()
jDS2 = jDS2.ScriptClip("""subtitle("DS2.Trim(1,0) then Reinterlace BFF Frame " + string(current_frame),size=20,x=40,y=40)""")
kDS2 = kDS.assumeBFF().separatefields().selectevery(4,0,3).weave()
kDS2 = kDS2.ScriptClip("""subtitle("DS3.merge(i,i.trim(1,0)) then Reinterlace BFF Frame " + string(current_frame),size=20,x=40,y=40)""")
mDS2 = mDS.assumeBFF().separatefields().selectevery(4,0,3).weave()
mDS2 = mDS2.ScriptClip("""subtitle("DS4.Trim(1,0) then merge(i,i.trim(1,0)) then Reinterlace BFF Frame " + string(current_frame),size=20,x=40,y=40)""")
#
return iMS1 + jMS1 + kMS1 + mMS1 + iMS2 + jMS2 + kMS2 + mMS2 + iDS1 + jDS1 + kDS1 + mDS1 + iDS2 + jDS2 + kDS2 + mDS2

2. Leave as Progressive script

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
# ran DGIndex over it, as dgdecode threw up at the mpv
iMS1 = mpeg2source("D:\HDTV\shimmer2\shimmer1-boats.d2v").trim(0,49)
iMS2 = mpeg2source("D:\HDTV\shimmer2\shimmer2-jetty.d2v").trim(0,49)
iMS3 = mpeg2source("D:\HDTV\shimmer2\shimmer3-island.d2v").trim(0,49)
iMS4 = mpeg2source("D:\HDTV\shimmer2\shimmer4-boat.d2v").trim(0,49)
iMS = iMS1+iMS1+iMS1+iMS1+iMS1 + iMS2+iMS2+iMS2+iMS2+iMS2 + iMS3+iMS3+iMS3+iMS3+iMS3 + iMS4+iMS4+iMS4+iMS4+iMS4

iDS1 = DirectShowSource("D:\HDTV\shimmer2\shimmer1-boats.mpv").trim(0,49)
iDS2 = DirectShowSource("D:\HDTV\shimmer2\shimmer2-jetty.mpv").trim(0,49)
iDS3 = DirectShowSource("D:\HDTV\shimmer2\shimmer3-island.mpv").trim(0,49)
iDS4 = DirectShowSource("D:\HDTV\shimmer2\shimmer4-boat.mpv").trim(0,49)
iDS = iDS1+iDS1+iDS1+iDS1+iDS1 + iDS2+iDS2+iDS2+iDS2+iDS2 + iDS3+iDS3+iDS3+iDS3+iDS3 + iDS4+iDS4+iDS4+iDS4+iDS4
# AVIsynth doco MERGE() is a bit thin, its example suggests this script averages frame N and N+1 Luma/Chroma into N
a1MS=iMS.trim(1,0)
a1MSoriginal = a1MS.selecteven().assumeFPS(25)
MS1 = a1MSoriginal.ScriptClip("""subtitle("MS 1. 25fps progressive original unmerged initialTrim Frame " + string(current_frame),size=20,x=40,y=40)""")
a1MSmerged = merge(a1MS,a1MS.trim(1,0)).selecteven().assumeFPS(25)
MS2 = a1MSmerged.ScriptClip("""subtitle("MS 2. 25fps progressive merged initialTrim Frame " + string(current_frame),size=20,x=40,y=40)""")
MS3 = stackhorizontal(MS1,MS2).Lanczos4Resize(720,576)
a2MSoriginal = iMS.selecteven().assumeFPS(25) # effectively commenting out the initial trim(1,0)
MS4 = a2MSoriginal.ScriptClip("""subtitle("DS 3. 25fps progressive original unmerged NO initialTrim Frame " + string(current_frame),size=20,x=40,y=40)""")
a2MSmerged = merge(iMS,iMS.trim(1,0)).selecteven().assumeFPS(25)
MS5 = a2MSmerged.ScriptClip("""subtitle("DS 4. 25fps progressive merged NO initialTrim Frame " + string(current_frame),size=20,x=40,y=40)""")
MS6 = stackhorizontal(MS4,MS5).Lanczos4Resize(720,576)
MallS = stackVertical(stackhorizontal(MS1,MS2) , stackhorizontal(MS4,MS5)).Lanczos4Resize(720,576)
#
a1DS=iDS.trim(1,0)
a1DSoriginal = a1DS.selecteven().assumeFPS(25)
DS1 = a1DSoriginal.ScriptClip("""subtitle("DS 1. 25fps progressive original unmerged initialTrim Frame " + string(current_frame),size=20,x=40,y=40)""")
a1DSmerged = merge(a1DS,a1DS.trim(1,0)).selecteven().assumeFPS(25)
DS2 = a1DSmerged.ScriptClip("""subtitle("DS 2. 25fps progressive merged initialTrim Frame " + string(current_frame),size=20,x=40,y=40)""")
DS3 = stackhorizontal(DS1,DS2).Lanczos4Resize(720,576)
a2DSoriginal = iDS.selecteven().assumeFPS(25) # effectively commenting out the initial trim(1,0)
DS4 = a2DSoriginal.ScriptClip("""subtitle("DS 3. 25fps progressive original unmerged NO initialTrim Frame " + string(current_frame),size=20,x=40,y=40)""")
a2DSmerged = merge(iDS,iDS.trim(1,0)).selecteven().assumeFPS(25)
DS5 = a2DSmerged.ScriptClip("""subtitle("DS 4. 25fps progressive merged NO initialTrim Frame " + string(current_frame),size=20,x=40,y=40)""")
DS6 = stackhorizontal(DS4,DS5).Lanczos4Resize(720,576)
DallS = stackVertical(stackhorizontal(DS1,DS2) , stackhorizontal(DS4,DS5)).Lanczos4Resize(720,576)
#
return MS1 + MS2 + MS3 + MS4 + MS5 + MS6 + MallS + DS1 + DS2 + DS3 + DS4 + DS5 + DS6 + DallS


Alas, to no avail, same problem with all outputs. So ensured all DVD player and TV options to nil-enhancement etc etc... same problemo. Guess it must be that combination of clip and DVD player/telly...

For interest, left it as 50FPS on the PC via this script and it looked reasonable too

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
# ran DGIndex over it, as dgdecode threw up at the mpv
iMS1 = mpeg2source("D:\HDTV\shimmer2\shimmer1-boats.d2v").trim(0,49)
iMS2 = mpeg2source("D:\HDTV\shimmer2\shimmer2-jetty.d2v").trim(0,49)
iMS3 = mpeg2source("D:\HDTV\shimmer2\shimmer3-island.d2v").trim(0,49)
iMS4 = mpeg2source("D:\HDTV\shimmer2\shimmer4-boat.d2v").trim(0,49)
iMS = iMS1+iMS1+iMS1+iMS1+iMS1 + iMS2+iMS2+iMS2+iMS2+iMS2 + iMS3+iMS3+iMS3+iMS3+iMS3 + iMS4+iMS4+iMS4+iMS4+iMS4
iDS1 = DirectShowSource("D:\HDTV\shimmer2\shimmer1-boats.mpv").trim(0,49)
iDS2 = DirectShowSource("D:\HDTV\shimmer2\shimmer2-jetty.mpv").trim(0,49)
iDS3 = DirectShowSource("D:\HDTV\shimmer2\shimmer3-island.mpv").trim(0,49)
iDS4 = DirectShowSource("D:\HDTV\shimmer2\shimmer4-boat.mpv").trim(0,49)
iDS = iDS1+iDS1+iDS1+iDS1+iDS1 + iDS2+iDS2+iDS2+iDS2+iDS2 + iDS3+iDS3+iDS3+iDS3+iDS3 + iDS4+iDS4+iDS4+iDS4+iDS4
# AVIsynth doco MERGE() is a bit thin, its example suggests this script averages frame N and N+1 Luma/Chroma into N
iMS1 = iMS.ScriptClip("""subtitle("1. Original 50fps Mpes2Source frame " + string(current_frame),size=20,x=40,y=40)""")
kMS = merge(iMS,iMS.trim(1,0))
kMS1 = kMS.ScriptClip("""subtitle("2. merge(j,j.trim(1,0)) 50fps Mpes2Source frame " + string(current_frame),size=20,x=40,y=40)""")
sMS1 = stackhorizontal(iMS1,kMS1).Lanczos4Resize(720,576)
iDS1 = iDS.ScriptClip("""subtitle("1. Original 50fps DirectShowSource frame " + string(current_frame),size=20,x=40,y=40)""")
kDS = merge(iDS,iDS.trim(1,0))
kDS1 = kDS.ScriptClip("""subtitle("2. merge(j,j.trim(1,0)) 50fps DirectShowSource frame " + string(current_frame),size=20,x=40,y=40)""")
sDS1 = stackhorizontal(iDS1,kDS1).Lanczos4Resize(720,576)
#
return iMS1 + kMS1 + sMS1 + iDS1 + kDS1 + sDS1


however the DVD s/w won't let me build a 576p (50fps) DVD from HC's 50fps .mpv for NERO to burn.... not sure if it's a DVD standard or whether my DVD player could handle it anyway. I must have inadvertently converted to 25fps last time I tried, I guess.

Any other suggestions ?

At my wits end... got there rather quickly it seems :) :confused:

scharfis_brain
5th February 2006, 12:49
you won't get rid of the flicker/shimmer on a standard DVD/TV combo!

If you wish so, you either can buy a 100Hz TV with LFR (LineFlickerReduction) or a progressive scan DVD-Player.

To reduce the flicker on a standard-TV you have to blur the source by a big amount!

frednerk
5th February 2006, 15:24
OK. Sorry, I thought it was possible but it isn't. Need to save up for 2 yrs for new equipment... :) Fyi re any future Aus-related source clip queries, late-night googling accidentally yielded http://www.dtvforum.info/lofiversion/index.php/t1768.html which eventually said

re "The minimum HD picture resolution is be 576 lines x 720 pixels @ 50Hz progressive (576p)"

576p as impemented in Australia is 25 progressive frames of 576 lines per second, not 50 progressive frames per second.

Some local broadcasters original material in what's known as 1080 pSf which means "progressive segmented frame". This is actually 50 interlaced fields per second. However these fields are derived from the exact same point in time (unlike conventional interlaced images which are 1/50th second in time apart) and so the segmented frame's fields can be combined to form a true progressive frame with no quality loss or atifacting.
The 1080 pSf material is converted to 576p for HD transmission with a high quality converter which retains the progressive nature of the source material without the artifacting and resolution loss you'd see with de-interlacing conventional 576i50 source material.
Hope this helps.

which seems to be what Scharfis_brain identified in "closely related frame pairs" (0,1) (1,2) etc.

Thankyou and Kind Regards.