INDEX  F.A.Q.  SEARCH  LATEST POSTS     Rules  Register  Profile  Private messages  Login


Login:   Username:  Password:   Log me on automatically    
Register I forgot my password I forgot my username Resend the activation key

HDTV 720p 50 fps -> SDTV PAL 576i/p 25fps

Forum Index -> Video -> Advanced Video Conversion Printer-friendly version
Reply to topic
Author Message
joosty
Member


Joined: 23 Jul 2007
Location: Netherlands

Post Posted: Jul 23, 2007 06:19 Posts Comp View users profile Send private message Reply with quote

I've been fooling around with this for days now. I'm a newbie getting up to speed, reading a lot and experimenting.

I have an HDTV source, 1280x720p, 50 fps, demuxed into ac3 and mpv/d2v, and I want to convert it to SDTV, PAL 720x576, 25 fps, for DVD. I'm using AviSynth 2.5 to achieve (frameserve) this.

So far I have come up with two approaches:

1. Just drop every other frame, ie. use SelectEven() or SelectOdd().
Result is 25 fps progressive.

Pro: Simple
Con: Degradation of smoothness

2. Split up frames in fields and combine them to produce interlaced 25 fps:
Assumetff().SeparateFields().SelectEvery(4, 0, 3).Weave()

Pro: Retains smoothness
Con: I see artifacts on both tv and monitor (jagged edges, lines)

Both approaches also contain:
LanczosResize(720,576) # Done before interlacing
BT709ToBT601()

Personally, I prefer the second approach, retaining the smoothness. But there is a mismatch between my (apparently incomplete) mental model of what is happening, because I can see interlacing effects on both my tv and monitor (jagged edges, lines during movment). They go away if I for instance do a FieldDeinterlace() after the weaving, but no point in deinterlacing when I just interlaced in the previous instruction, is there??

Any help is greatly appreciated!

Joost


Last edited by joosty on Jul 23, 2007 07:33, edited 1 time in total


DJRumpy
There is no try


Joined: 09 Sep 2002
Location: Dallas, Texas

Post Posted: Jul 23, 2007 06:29 Posts Comp View users profile Send private message Reply with quote

Many HDTV broadcasts in the US simply double the frame rate so that you have two duplicate frames, making reduction to a lower framerate simple (just decimate every other frame). Make sure you view your source frame by frame to verify if that applies to your source as well.

Just ensure the D2V you produced is set to honor the pulldown flags, rather than ingore them so that you can get an accurate ID of what your source is composed of.
_________________
Impossible to see the future is. The Dark Side clouds everything...


joosty
Member


Joined: 23 Jul 2007
Location: Netherlands

Post Posted: Jul 23, 2007 06:44 Posts Comp View users profile Send private message Reply with quote

Thanks for the suggestions. The source I have really is 50 fps, not 25 fps duplicated. And the pulldown flag has been honored everywhere possible also (although I haven't read up on the 'pulldown flag' to know if it actually applies to my source...)

manono
Member


Joined: 28 Aug 2003

Post Posted: Jul 23, 2007 06:58 Posts View users profile Send private message Reply with quote

Hi-
Quote:
Both approaches end with:
LanczosResize(720,576)

There's your mistake. Do the resize before interlacing it. You screw it up royally if you try and resize interlaced material


Alex_ander
Member


Joined: 12 Oct 2006
Location: Russian Federation

Post Posted: Jul 23, 2007 07:20 Posts Comp View users profile Send private message Reply with quote

I'd prefer your second approach (not killing motion phases). But are you sure your source is not just an interlaced 25fps, what is the size of what you consider a frame? Then the artifacts you see on TV might come from your resizing script (as just mentioned). Only progressive frames can be resized directly.

joosty
Member


Joined: 23 Jul 2007
Location: Netherlands

Post Posted: Jul 23, 2007 07:31 Posts Comp View users profile Send private message Reply with quote

Alex_ander wrote:
... what is the size of what you consider a frame? ...

I'm not sure how to answer this..

And as far as I know (stats in eg. Projectx) my source is 50fps, progressive. It is concerning a live satellite broadcast to UK cinema's of a concert of a well known band that played in Dusseldorf, on 27th of June 2007...

And about the resizing, I'm pretty sure I thought of that myself too, and that the resizing is done before the interlacing. At this time I can't check my actual script at home now (I'm at work and port 22 is blocked). But like I just said I'm almost certain that I resize before I interlace, so that shouldn't be the cause of the problems...

Things I'm not sure of:
- I do assumetff(), but I'm not sure if I'm assuming correctly??
- Is applying a deinterlace filter after the weave() completely stupid or not??
- I'm weaving top/odd lines of frame 1 with bottom/even lines of frame 2, is this correct? Can one do the 'weaving' wrong?

- Also I'm encoding the frameserved mpv with CCE, no special settings entered, could that cause the problems?


Last edited by joosty on Jul 23, 2007 07:54, edited 4 times in total


DJRumpy
There is no try


Joined: 09 Sep 2002
Location: Dallas, Texas

Post Posted: Jul 23, 2007 07:34 Posts Comp View users profile Send private message Reply with quote

Not necessarily true. If the video is interlaced and you wish to resize it, you can simply separate the fields and resize each field individually. I agree that just resizing raw interlaced frames will look bad without either deinterlacing, or separating the fields first.
_________________
Impossible to see the future is. The Dark Side clouds everything...


Alex_ander
Member


Joined: 12 Oct 2006
Location: Russian Federation

Post Posted: Jul 23, 2007 08:26 Posts Comp View users profile Send private message Reply with quote

If you are sure it's progressive 50fps and resize before interlacing, it's OK.
joosty wrote:

Things I'm not sure of:
- I do assumetff(), but I'm not sure if I'm assuming correctly??
- Is applying a deinterlace filter after the weave() completely stupid or not??
- I'm weaving top/odd lines of frame 1 with bottom/even lines of frame 2, is this correct? Can one do the 'weaving' wrong?

- Also I'm encoding the frameserved mpv with CCE, no special settings entered, could that cause the problems?

1. Assuming TFF is OK, you just have to use the same setting in CCE (advanced/output TFF + offset line =0).
2.Deinterlace filter is useless here, for progressive target you could simply discard frames.
3.Weaving is correct here and keeps your assumed field order, with representing motion phases from the full set of original frames.
4.(CCE) as in line 1


Alex_ander
Member


Joined: 12 Oct 2006
Location: Russian Federation

Post Posted: Jul 23, 2007 08:42 Posts Comp View users profile Send private message Reply with quote

DJRumpy wrote:
If the video is interlaced and you wish to resize it, you can simply separate the fields and resize each field individually.

It's not enough to just separate fields. Resizing a field gives artifacts (especially noticeable on thin horizontal structures) due to missing information of intermediate lines, e.g. if a pixel at resizing should move from a line in missing field to a line in currently resized field, it will not. For this reason the trusted methods include rebuilding a complete frame from each separated field before resizing (bob function).


joosty
Member


Joined: 23 Jul 2007
Location: Netherlands

Post Posted: Jul 23, 2007 11:35 Posts Comp View users profile Send private message Reply with quote

Allright, here's the current status:

Used following Avisynth script to serve file to CCE (set offset line=0):

BT709ToBT601()
LanczosResize(720,576)
Assumetff().SeparateFields().SelectEvery(4, 0, 3).Weave()
ConvertToYUY2(interlaced=true)

Now, if I play the resulting file in PowerDVD on my computer, everything looks fine.

But when I play the file on my TV (using XboxMediaCenter), the following happens (see screenshot)

http://img262.imageshack.us/my.php?image=img1531largeue1.jpg

Anybody have a clue?


manono
Member


Joined: 28 Aug 2003

Post Posted: Jul 23, 2007 12:17 Posts View users profile Send private message Reply with quote

Did you encode as progressive? If you don't know, open a VOB in DGindex and run the Preview?

I don't really think that's it, though, since you said PowerDVD deinterlaces it OK. Don't you have a regular standalone you can use to play it? I don't know anything about X-Box or whatever you're using to play it.

Maybe you can cut out a small piece of an M2V using DGindex and upload it somewhere.

Also, why are you converting the colorimetry, since CCE outputs BT.709? Is it necessary for some reason?


joosty
Member


Joined: 23 Jul 2007
Location: Netherlands

Post Posted: Jul 23, 2007 12:31 Posts Comp View users profile Send private message Reply with quote

I'm doing an HDTV to SDTV conversion, and according to http://forum.doom9.org/showthread.php?s=&threadid=50588 the colorspace is different, but according to DGIndex preview the colorimetry is still BT709 ?!

DGIndex says it's 25fps, interlaced. I've uploaded a short sample m2v:

http://rapidshare.com/files/44585259/test.m2v.html

(Pay attention to the drum sticks, effects are most apparent there)

Thanks for the help so far guys!!


jagabo
Member


Joined: 09 Dec 2005
Location: none

Post Posted: Jul 23, 2007 13:01 Posts Comp View users profile Send private message Reply with quote

I'm not sure there's any reason to believe XBMC will do anything useful with interlaced video.

Your m2v file was resized after weaving. Or possibly the source wasn't progressive (which means you resized woven material, the same thing).

Here's an 8x enlargment (nearest neighbor) of properly interalced video:

Notice how the fields are contained in exactly every other scanline.

Here is the drumstick from your m2v file enlarged 8x:

The two fields are comingled. This is what happens when you enlarge interlaced video improperly.

Here's the first video scaled as if it was progressive (equivalent of reducing 720 scanlines to 576 scanlines):

Note the similar pattern of comingling.


Last edited by jagabo on Jul 23, 2007 13:41, edited 3 times in total


joosty
Member


Joined: 23 Jul 2007
Location: Netherlands

Post Posted: Jul 23, 2007 13:26 Posts Comp View users profile Send private message Reply with quote

jagabo wrote:
I'm not sure there's any reason to believe XBMC will do anything useful with interlaced video.

Your m2v file was resized after weaving.


I burned a test dvd and put in a standalone player, and all is well, so I guess XMBC doesn't do anything with interlaced video, you're right...

The matter is solved! Now I need to decide which route I take, interlacing or dropping frames, the latter provides normal playback on XBMC as well....

Thanks for the support!


jagabo
Member


Joined: 09 Dec 2005
Location: none

Post Posted: Jul 23, 2007 13:49 Posts Comp View users profile Send private message Reply with quote

You must have burned a different file to DVD. There's no way the m2v above would ever look right on TV. Though I wouldn't be surprised if it looked better than the same file on an XBMC.

joosty
Member


Joined: 23 Jul 2007
Location: Netherlands

Post Posted: Jul 23, 2007 14:08 Posts Comp View users profile Send private message Reply with quote

I'm not going to argue there, I have tried so many things, I must have messed it up sometime...

Bottom line, this works as expected:

LanczosResize(720,576)
Assumetff().SeparateFields().SelectEvery(4, 0, 3).Weave()
ConvertToYUY2(interlaced=true)


jagabo
Member


Joined: 09 Dec 2005
Location: none

Post Posted: Jul 23, 2007 14:43 Posts Comp View users profile Send private message Reply with quote

That should work. Then CCE should encode the frames as-is (no resizing) and then burn that resulting m2v to DVD as TFF.

CubDukat
Member


Joined: 10 Apr 2001
Location: United States

Post Posted: Jul 24, 2007 11:33 Posts Comp View users profile Send private message Reply with quote

I've been having the same problem myself, except I'm working in NTSC.

I've been recording the Formula One races on Fox this year, but I have run into problems using the methods described here. Simply knocking out every other frame makes it jerky, and while making it into an interlaced image works better, it has another, unwanted side effect--the audio goes out of sync. I've been using VideoReDo plus to cut out the commercials on the original 720p file and then saving it out as a .mpg file, but it didn't seem to be correcting the sync errors, so I tried it as a .ts, which helped somewhat in that DGIndex spit out an AC-3 file with an offset. Unfortunately, even with the offset, the sync error still remains.

Does the interlacing process automatically cause audio sync issues, and if so, is there a workaround for this? I had this exact same problem with the Oscars this year, and I'd like to get it fixed before the next ones roll around--not to mention before the end of the F1/IndyCar season.


manono
Member


Joined: 28 Aug 2003

Post Posted: Jul 24, 2007 11:37 Posts View users profile Send private message Reply with quote

Quote:
Does the interlacing process automatically cause audio sync issues...

No, everything discussed in this thread keeps the video the same length. If you're getting audio asynchs, it's for a different reason.


DJRumpy
There is no try


Joined: 09 Sep 2002
Location: Dallas, Texas

Post Posted: Jul 24, 2007 13:10 Posts Comp View users profile Send private message Reply with quote

Possibly by the way your removing the commercial content. If your cuts doesn't also cut the audio it could cause this. Also, depending on the quality of the HD broadcast, it can have a gradual skew. I found this to be true for many HD broadcasts that I recorded. They had to be fixed manually.
_________________
Impossible to see the future is. The Dark Side clouds everything...


ofbarea
Member


Joined: 01 Dec 2002
Location: Costa Rica

Post Posted: Nov 04, 2007 21:45 Posts Comp View users profile Send private message Reply with quote

This is exactly what I was trying to accomplish but for 480p NTSC. 480p 60 fps -> 480i/p 30 fps

It happened that a friend of mine created a progressive AVI DV file of a school play, using the Progressive Scan Weave+Bob deinterlace method, as an intermediate step before rendering a nice PC friendly DivX movie.

A little later the camera and the original video tape were lost, and the best available copy of this play was the 60 fps 480p DV copy. Hopefully the reassembled interlaced DVD will still look fine.

Thanks to all that have participated in this tread.


Reply to topic All times are GMT - 6 Hours
Forum Index -> Video -> Advanced Video Conversion Page 1 of 1





You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Jump to:  
Display:   
About   Advertise   Forum Archive   RSS Feeds   Statistics