Log in

View Full Version : What should I use Yadif with to convert 60i to 24p?


shoopdabloop
27th March 2009, 03:56
I know Yadif(1) returns 60p video from 60i very nicely, but converting that to 24p makes the video juddery. I've heard that since 120 is the least common multiple between 24 and 60, I would have to interpolate the 60p video to 120p, and then convert that to 24p.

How should I do this?

LoRd_MuldeR
27th March 2009, 04:43
You can't deinterlace 60i to 120p. Your 60i source contains "60 snapshots per second". This can either be deinterlaced to 30p (discarding half of the temporal resolution, jerky motion) or it can be bobbed to 60p (retaining the full temporal resolution, fluid motion). There's not much more you can do. Up-converting the 60p to 120p would be possible, but it simply doubles any frame. So although you technically had 120p, there would be no additional motion (that means: each pair of consecutive frames looks identical). It would also be possible to generate "intermediate" images. So the "gaps" between the 60p frames would be filled to get 120p. These "dummy" images could be generated by blending the neighboring frames - a very simply method that generates "ghosting" effects. But in 120fps plyback it may look acceptable. Anyway I doubt that the up-converted 120p looks any better than 60p. PC screens usually have only 60 Hz. Last but not least I doubt that down-converting the up-converted 120p to 24p makes it look any better than a direct conversion. You better look for a method to convert from 30p to 24p in one step. Either ChangeFPS() or ConvertFPS() in Avisynth may help...

shoopdabloop
27th March 2009, 07:01
What about those plugins that use special algorithms to generate the intermediate images?

I'm talking about using Yadif(1) to deinterlace 60i to 60p, and then using one of those plugins to convert/interpolate the 60p to 120p and then grabbing every 5th frame to get 24p.

It seems pretty straightforward, I just don't know what to use.

Alex_ander
27th March 2009, 09:34
If you want to use frame interpolation like MFlowFPS of MVTools2, you'll have to deinterlace, but you will not gain from conversion to 120p. In case new/old framerates are not in multiple ratio, MFlowFPS will not just insert new frames, it will re-calculate all the frames from linear interpolation of motion vectors. So going directly from (deinterlaced to) 60p to 24p will give you as smooth result, but faster. Any frame interpolation method is not 100% artifact-safe. Usually at moderate framerates drum sticks and fiddles are typical problematic scenes, even if you interpolate to lower frequencies.

Varies
27th March 2009, 10:39
try this
#source
yadif(1)
selectevery(2,2)
or it gives a bad result?:rolleyes:

2Bdecided
27th March 2009, 10:59
If you want to use frame interpolation like MFlowFPS of MVTools2, you'll have to deinterlace, but you will not gain from conversion to 120p. In case new/old framerates are not in multiple ratio, MFlowFPS will not just insert new frames, it will re-calculate all the frames from linear interpolation of motion vectors. So going directly from (deinterlaced to) 60p to 24p will give you as smooth result, but faster.That's not why you go to 120fps. You go to 120fps (or higher) so you can then blend the frames together. Typical 60i shutter speeds (especially full auto on a typical consumer cam-corder) are far too high for 24p. By going up to a higher frame rate using motion compensation, then blending the frames together, and going back down to 24p, you get the illusion that you used a slower shutter speed in the first place, which gives smoother (more blured) motion.

That's why I do it anyway. The functionality is in MFlowBlur in mvtools v2 now.

You're absolutely right that, with mvtools, there's no advantage if you're not going to blend frames. mvflowfps(120).selectevery(5,0) is equivalent to mvflowfps(24), except you (might) waste a lot of time generating lots of frames that you'll never use.

Any frame interpolation method is not 100% artifact-safe. Usually at moderate framerates drum sticks and fiddles are typical problematic scenes, even if you interpolate to lower frequencies.Yes - though if you go the frame blending route, it helps to hide this a little. Still a problem though.

Cheers,
David.

Alex_ander
27th March 2009, 11:09
selectevery(2,2)

In every 2 there are just frames '0' and '1' (no '2'). Doesn't this give error message?

Gavino
27th March 2009, 11:21
In every 2 there are just frames '0' and '1' (no '2'). Doesn't this [(selectevery(2,2)] give error message?
No, it just loses frame 0, returning frames 2, 4, 6, ...

But clearly wrong here anyway as it gives 30fps, not the wanted 24fps.

Alex_ander
27th March 2009, 11:23
@2Bdecided
Thanks for the explanation. Does MFlowBlur give exactly the same result as blending 120->24, and how do you do it - is it with ConvertFPS?

Varies
27th March 2009, 12:57
In every 2 there are just frames '0' and '1' (no '2'). Doesn't this give error message?
no, its work very good :D
I use it with mcbob()
selectodd() and selectevery(2,1) gives strange angles (in my example)
while selectevery(2,2) gives normal picture :)
after all i used Decimate() for 24 fps :D

Leak
27th March 2009, 18:59
selectodd() and selectevery(2,1) gives strange angles (in my example)
while selectevery(2,2) gives normal picture :)
I think what you're really looking for is "SelectEvery(2,0)" or "SelectEven()"...

np: Zucchini Drive - Hidden Track (Goodyear Television Playhouse)

shoopdabloop
27th March 2009, 19:03
Okay, so since I simply need to smoothly convert the 60p to 24p, which version of MVTools should I use, and how?
This is what I have in my script so far:

loadcplugin("c:\program files\avisynth 2.5\plugins\yadif.dll")
AviSource("Tape 5 - Clip 003.avi").ConvertToYV12()
Yadif(1)
Blur(0.18)

Also, when filming the footage for this conversion, should I use a 1/60 shutter speed, or 1/125? Less motion blur makes the interpolation more accurate, no?
I'm filming standard 480i60 DV.

scharfis_brain
27th March 2009, 20:38
you should film with 1/120 sec shutter speed
then framedouble your footage with tempgaussmc() and mvflowfps() to 119.88 fps.
this way you'll get a fullframe motionblur.
now you'll merge two, three, or four frames out of five frames for 1/60, 1/40, or 1/30 sec final shutter speed.
That's how I'd do a proper 60i to 24p conversion.

Comatose
27th March 2009, 21:02
That's why I do it anyway. The functionality is in MFlowBlur in mvtools v2 now.
Can you elaborate please? How exactly do you use to replicate this functionality?

OP: p60to24p (http://forum.doom9.org/showthread.php?t=110093) can take it from there after you've bobbed to 60p.

shoopdabloop
27th March 2009, 21:09
Okay, this is the script I ended up using, but it's very slow to process and looks a little "choppy" (either I'm not used to 24p or there's not enough motion blur; i filmed the clip at 1/60 shutter speed)

loadcplugin("c:\program files\avisynth 2.5\plugins\yadif.dll")
loadplugin("c:\program files\avisynth 2.5\plugins\mvtools2.dll")
source = AviSource("the car.avi").ConvertToYV12().Yadif(1).Blur(0.18)
super = source.MSuper()
mvbw = MAnalyse(super,isb=true)
mvfw = MAnalyse(super,isb=false)
source.MFlowFps(super,mvbw,mvfw,num=23976,den=1000)

I'm new to MVTools, which is why I left most of the values alone. I'm starting to think 60p to 24p is a waste of time....
30p with 1/125 shutter speed and the right color correction looks pretty film-like....

MadMonkey57
28th December 2009, 14:58
you should film with 1/120 sec shutter speed
then framedouble your footage with tempgaussmc() and mvflowfps() to 119.88 fps.
this way you'll get a fullframe motionblur.
now you'll merge two, three, or four frames out of five frames for 1/60, 1/40, or 1/30 sec final shutter speed.
That's how I'd do a proper 60i to 24p conversion.

I got 2 (maybe n00b) questions regarding this worfkflow:

- How do we merge 2/3 or 4 frames out of 5 ?
- 1/60, 1/40 or 1/30.. what difference will it make ?

Thanks.

NerdWithNoLife
30th December 2009, 00:31
In a pinch, I've used: Yadif(mode=1).SelectEvery(10,0,2,5,7)

It's fast, but not ideal (jerky), as was mentioned!

scharfis_brain
30th December 2009, 00:43
merge 2 frames:
merge(last, last.deleteframe(0))

merge 3 frames:
temporalsoften(1,255,255)

merge 4 frames:
merge(merge(last.deleteframe(0).deleteframe(0), last.deleteframe(0)),merge(last, last.duplicateframe(0)))

merge 5 frames:
temporalsfoten(2,255,255)

MadMonkey57
31st December 2009, 09:03
Thanks guys. I'll give these a try.

MrVideo
1st January 2010, 10:27
Thanks guys. I'll give these a try.

What exactly are you trying to convert? 1080i29.97 to 1080p23.976 and or 720p59.94 to 720p23.97, where both, or either source, has 2:3 pulldown telecine material? H.264 and or MPEG-2?

If the answer is yes, take a look at this thread: http://forum.doom9.org/showthread.php?t=151680

Dig past all of the extraneous stuff and you'll find simple scripts for doing either 1080i or 720p. Do note that H.264 sources that are PAFF, which is discussed in the thread, will require particular hardware and some neuron2 software.

If you are trying to convert pure video to 23.976p, all I can say is: why?

MadMonkey57
3rd January 2010, 16:50
Well, no particular conversion in mind. My main objective is to learn.

In addition, I plan on buying an HD camcorder. Its specs say that it will output 1080i (I live in Europe so I assume 1080i50). I am currently considering:

1/ feeding Premiere CS4 with 1920x1080X50i files
2/ editing...
3/ producing 1920x1080X50i (highest possible bitrates)
4/ converting 1920x1080X50i to 1920x1080X23.976p
5/ encoding with x264 (for authoring on BD5)

At first, I wanted to perform step 4/ with tempgaussmc together with nnedi2 + selecteven + assumefps 24000/1001
or tempgaussmc with nnedi2 + mflowfps, but the first few tests I made were terribly slow (tempgaussmc nnedi2)...
I guess I will have to revert to a faster bobber (yadif). The extra bonus I get is that steps 4 and 5 can easily be performed on my primary computer which runs linux.

MrVideo
4th January 2010, 08:30
My main objective is to learn.

With avisynth and its plugins/filters, there is a lot to learn. I've only scratched the surface.

In addition, I plan on buying an HD camcorder. Its specs say that it will output 1080i (I live in Europe so I assume 1080i50).

Since you are learning, and I used to get this wrong as well, it will be 1080i25. The value after the i, or p, will always be the frame rate, never the field rate.

A suggestion, since I'll be doing the same thing. Try and find an HD camcorder that supports progressive mode. In your case, something that will allow you to record in 1080p25. It will more than likely have 1080i25 as well. Watch out for one that captures in 1080p24. That will give you a hard time, except if you go to Blu-ray (as noted below), as that is supported natively.

Me, I have to look for 1080p29.97(or 30). A friend's camcorder supports progressive mode and that is what I used during my two week road trip in Europe.

If you can avoid all the problems with deinterlacing, do so. Let the camcorder to the work for you.

[quote]4/ converting 1920x1080X50i to 1920x1080X23.976p[quote]

If the source is video, i.e., from a camcorder or TV program, DON'T do it. IMHO, you'll create nothing but headaches and have shitty motion as a result. Keep the video at its native source rate. At most, convert 1080i25 to 1080p25. Even then, I'm not sure I'd want to deinterlace video material, as that removes 1/2 of the spatial motion. Today's monitors and projectors handle interlaced material just fine.

But, if the source is film, then you probably have the 4.16666% speedup. I'd suggest converting to 1080p25 and then doing a conversion slowdown to 1080p24. That will get the audio pitch back to there it belongs as well. But, be careful, the audio pitch might be corrected for the speedup, in which you won't have to touch it. You don't need to go to 1080p23.976. Film is shot at 24 fps and gets slowed down to fit our old/outdated NTSC frame rate. We can't do HD at a true 30 fps, because we are still upconverting old NTSC material that is at 29.97. Our FCC screwed up 60 years ago when they forced that math model.

In the link in the posting above, there is a posting by Wilbert that has a link to his filter manual. Get that manual. It has examples regarding the 4% film speedup issue. As well as covering all of the other external filters.

Keep in mind, all of the above is IMHO.

wonkey_monkey
4th January 2010, 12:40
You don't need to go to 1080p23.976.

...unless you ever plan on making an NTSC DVD out of this.

How do media players handle 24fps compared to 23.976fps? Are any US broadcasts or Blu-rays at 24fps?

David

MadMonkey57
4th January 2010, 13:04
...The value after the i, or p, will always be the frame rate, never the field rate...
Funny. I also used to use the frame rate but the web appeared to make use of the field rate more often...

...A suggestion, since I'll be doing the same thing. Try and find an HD camcorder that supports progressive mode...
I've been searching but so far I can't find one that I like... But I am probably biased since I kinda fell in love with the Sony XR500/XR520...:o
Once you come across a nice HD cam that records progressive frames, I'd love to hear from you !
Maybe a camcorder that does progressive segmented frame (http://en.wikipedia.org/wiki/HDV#HDV_1080i) could help...

...I'd suggest converting to 1080p25 and then doing a conversion slowdown to 1080p24. That will get the audio pitch back to there it belongs as well. But, be careful, the audio pitch might be corrected for the speedup, in which you won't have to touch it...
I've been doing similar conversions with sources from my DV camcorder: 720x576x25i -> Cropping 720x432x25i -> Deinterlacing 720x432x25p -> Upscaling 1280x720x25p -> Slowing down 1280x720x23.976p -> Blu Ray ...and it was really good.
And btw I also did (http://forum.doom9.org/showthread.php?t=143915&page=2) 720x576x25i -> Cropping 720x432x25i -> Bobbing 720x432x50p -> Upscaling 1280x720x50p -> Blu Ray ... and it was really great.
In such cases I had to correct audio of course.

...You don't need to go to 1080p23.976...
...How do media players handle 24fps compared to 23.976fps?...
Well I think I have to go 1080p23.976 as per the Blu Ray specs (http://www.emedialive.com/articles/readarticle.aspx?articleid=11397#iif). I experienced "jumpiness" every few minutes on my SAP (Panasonic DMP-BD35) with 1080p24 (using BD5).

In the link in the posting above, there is a posting by Wilbert that has a link to his filter manual. Get that manual. It has examples regarding the 4% film speedup issue. As well as covering all of the other external filters.
I'll check this out. Thanks for the tip.

MrVideo
4th January 2010, 23:37
...unless you ever plan on making an NTSC DVD out of this.

Then 29.97 fps is the better choice. See the next posting.

How do media players handle 24fps compared to 23.976fps? Are any US broadcasts or Blu-rays at 24fps?

Both 23.976 and 24 fps are in the spec. But, for some stupid reason, to which I haven't found the answer yet, 1080p25 is not supported in the Blu-ray spec, so BBC HD programs like Doctor Who and Torchwood are released in 1080i25. Only one fps difference and it isn't in the spec. Stupid, really stupid.

The U.S. cannot broadcast at 23.976p or 24p. The problem is with old NTSC material at 480i29.97. The stations are fixed at either 1080i29.97 or 720p29.97. It would be a technical nightmare to bounce the frame rate around.

wonkey_monkey
5th January 2010, 00:22
so BBC HD programs like Doctor Who and Torchwood are released in 1080i25. Only one fps difference and it isn't in the spec. Stupid, really stupid.

It doesn't really make much difference in the end though, does it? If there was such a thing as ~48fps interlaced video, in addition to ~24fps progressive video, there might well be only 1080i~24 in the spec. Doesn't interlaced HD have the same kind of "this bit is progressive" flagging as interlaced MPEG2?

As soon I get my TARDIS working I'm going back in time to stop them inventing interlacing. I bet it seemed like a great idea at the time. Oh, and I'll speak to the FCC about 24/1001fps too.

*VWORP* *VWORP*

David

MrVideo
5th January 2010, 01:48
Funny. I also used to use the frame rate but the web appeared to make use of the field rate more often...

Unfortuntely it is wrong. I've been corrected by engineers and the Blu-ray Disc Demystified book even points out that error.

I've been searching but so far I can't find one that I like... But I am probably biased since I kinda fell in love with the Sony XR500/XR520...:o
Once you come across a nice HD cam that records progressive frames, I'd love to hear from you !
Maybe a camcorder that does progressive segmented frame (http://en.wikipedia.org/wiki/HDV#HDV_1080i) could help...

I haven't found one yet. Gotta restart my search.

PSF might be a way to go, but whatever is used to edit it needs to understand it. I use VideoReDo and my main editor and had no problem with the video taken with my friend's camera.

I've been doing similar conversions with sources from my DV camcorder: 720x576x25i -> Cropping 720x432x25i -> Deinterlacing 720x432x25p -> Upscaling 1280x720x25p -> Slowing down 1280x720x23.976p -> Blu Ray ...and it was really good.
And btw I also did (http://forum.doom9.org/showthread.php?t=143915&page=2) 720x576x25i -> Cropping 720x432x25i -> Bobbing 720x432x50p -> Upscaling 1280x720x50p -> Blu Ray ... and it was really great.
In such cases I had to correct audio of course.

Why are you throwing away vertical resolution?

I'm currently testing converting PAL DVD content to NTSC. I don't do any of the above and do not have to play with the audio. I do not know how to get AVIsynth to deal with the DV video, so I'll leave that part to you. But this was I use after the source file is dealt with:

bob(height=480)
lanczos4resize(720x480)
convertfps(59.94)
separatefields.selectevery(4,0,3)
weave

I don't know why convertfps wants the field rate instead of the frame rate. I'm also finding out what the best values are for the selectevery. So, I'm still tweaking the values. What I have there creates great looking NTSC video. From that you can make MPEG-2 video for burning onto DVD-video. No need to upscale, as Blu-ray players will do an excellent job of doing the conversion for you when playing the disc back. My Sony does a great job upconverting to 1080p. BTW, my player gets is wrong and says that it is putting out 1080p60. Oops!

Well I think I have to go 1080p23.976 as per the Blu Ray specs (http://www.emedialive.com/articles/readarticle.aspx?articleid=11397#iif). I experienced "jumpiness" every few minutes on my SAP (Panasonic DMP-BD35) with 1080p24 (using BD5).

The web page is wrong. According to the Blu-ray Disc Demystified book, both 1080p23.976 and 1080p24 are supported. That said, I definately would not convert 576i25 pure video to 23.976. At a minimum, you want to go to 480i29.97. And, it can be done without having to change the audio. As mentioned, if the 576i25 contains film based material, then you can change that to 480i23.976. BTW, I've taken 1080i29.97 HD video, film based, and converted it to 480i23.976 and the Blu-ray player had no problems displaying it either as 1080 or 480i over HDMI. It was an experiment that worked.

Again, the above is IMHO. YMMV :D

MrVideo
5th January 2010, 02:04
It doesn't really make much difference in the end though, does it? If there was such a thing as ~48fps interlaced video, in addition to ~24fps progressive video, there might well be only 1080i~24 in the spec. Doesn't interlaced HD have the same kind of "this bit is progressive" flagging as interlaced MPEG2?

I don't have the math models to say one way or the other. But, one would think that doing H.264 encoding with progressive material would be better than encoding interlaced material. H.264 also has PAFF, so that probably helps the situation. As for the flagging, I do not know.

As soon I get my TARDIS working I'm going back in time to stop them inventing interlacing. I bet it seemed like a great idea at the time. Oh, and I'll speak to the FCC about 24/1001fps too.

Actually is is 24/1.001 (or 24000/1001).

I believe, at the time, interlacing was pretty much a must, considering the technology of the day. We were even stuck with setup, a result of masking retrace. Plus 30p would have been too much of a flickering annoyance. Even 25i (50 fields/sec) can be annoying to some. It really didn't bother me when I lived in Scotland for a couple of years, but at times it could be seen. So, broadcasting 30p would not have visually worked and doing 60p would not have fit within the 6MHz channel width. But, with hindsight, having a wider channel to handle 60p would have given us more bandwidth for digital. We are starved at 6 MHz and MPEG-2.

wonkey_monkey
5th January 2010, 02:43
bob(height=480)
lanczos4resize(720x480)
convertfps(59.94)
separatefields.selectevery(4,0,3)
weave

I don't know why convertfps wants the field rate instead of the frame rate.

That's because you're changing the frame rate of your bobbed fields, which are running at 50fps after the bob. Separatefields doubles the framerate again, the selectevery halves it (by discarding one half of each now-separated bobbed frame), and weave halves it again by re-integrating separated fields to frames.

So, I'm still tweaking the values. What I have there creates great looking NTSC video.

I thought so too, when I first started playing with standards conversion, until I discovered the wonders of motion compensation. Granted, it doesn't always work perfectly, but it can be a massive improvement over convertfps, though it isn't always obvious until you compare them side-by-side.

Actually is is 24/1.001 (or 24000/1001).

I knew that :stupid:

MrVideo
5th January 2010, 03:26
Thanks for the lesson on what is going on. Makes sense now.

I thought so too, when I first started playing with standards conversion, until I discovered the wonders of motion compensation.

Can you point at something that uses motion compensation for doing PAL to NTSC? Right now I'm experimenting and haven't settled on any particular method.

MadMonkey57
5th January 2010, 10:32
...Why are you throwing away vertical resolution?...
I'm not sure what this means...
If you refer to "losing information" in the 25i -> 25p process, well my reasons are:

- Sometimes, I go 720@23.976p instead of 720@50p because I author BD5s and I need to keep the video bitrate not too high
- I usually try to avoid "magic" functions like convertfps or mflowfps (though I have never compared 25i -> Bobbing 50p -> FPS Converting 23.976p with 25i -> Deinterlacing 25p -> Slowing down 23.976p)
- I'm not confortable with encoding interlaced h264 videos and obtaining Blu Ray compliant streams. In that case I would go 720x576x25i for my DV sources.
- As for encoding 1080i, I face a double issue: high bitrate required and encoding interlaced. (EDIT: I could choose to go 720p50)

Does the "Blu-ray Disc Demystified" book mention anything about encoding compliant streams (vbv stuff, interlaced streams, max bitrates, AVCHD, ...) ? If the answer is YES, I will definately acquire the book.

Thanks for your help

wonkey_monkey
5th January 2010, 14:54
Can you point at something that uses motion compensation for doing PAL to NTSC? Right now I'm experimenting and haven't settled on any particular method.

I used mvflowfps2 from mvtools v1. Large objects and fast motion could cause blocking but most of my inputs were slow and sedate. I just spliced in convertfps'd stuff for when it went wrong.

David

MrVideo
6th January 2010, 02:08
I'm not sure what this means...
If you refer to "losing information" in the 25i -> 25p process, well my reasons are:

Vertical resolution loss as a result of your reducing the number of "scan" lines from 576 to 432. Then you up it back to 720. Never go below your ultimate result. In this case, you are ending up at 720. It is best to upscale 576 to 720, than it is to throw way vertical resolution, only to to blow it back up.

I do not know why you were going to 432 in the first place.

- Sometimes, I go 720@23.976p instead of 720@50p because I author BD5s and I need to keep the video bitrate not too high

Then deinterlace and convert the 576i25 to 576p25. You'll have better spatial conversion converting the interlacing to 25p, than to 23.976p. I'm not sure you'll really save that much in file size going to 23.976p than doing it at 25p.

Unfortunately, Blu-ray was real short-sighted (IMHO) when it comes to supports frame rates. For 720 is it only 23.976, 24, 50, 59.94 (all progressive). Why they couldn't include 25p is beyond me. I guess they didn't about what home users would want to do.

I still no not personally like going to 23.976p from 50i (video source).

- I usually try to avoid "magic" functions like convertfps or mflowfps (though I have never compared 25i -> Bobbing 50p -> FPS Converting 23.976p with 25i -> Deinterlacing 25p -> Slowing down 23.976p)

Why would you want to slow down video? That is like taking a 24fps film and slowing it to 18fps. You like watching poeple move slower?

- I'm not confortable with encoding interlaced h264 videos and obtaining Blu Ray compliant streams. In that case I would go 720x576x25i for my DV sources.
- As for encoding 1080i, I face a double issue: high bitrate required and encoding interlaced. (EDIT: I could choose to go 720p50)

x264 encoder.

Does the "Blu-ray Disc Demystified" book mention anything about encoding compliant streams (vbv stuff, interlaced streams, max bitrates, AVCHD, ...) ? If the answer is YES, I will definately acquire the book.

No. The book is about the Blu-ray standard, in layman's terms. It is not about how to create the H.264, or whatever, MPEG content that goes on the disc.

MrVideo
6th January 2010, 02:41
I used mvflowfps2 from mvtools v1. Large objects and fast motion could cause blocking but most of my inputs were slow and sedate. I just spliced in convertfps'd stuff for when it went wrong.

If you get blocking, I will avoid. The convertfps test that I have done does seem to fit the need, whihc not to end up with "perfect" conversions.

Blue_MiSfit
6th January 2010, 03:23
Why toss out half your temporal information and encode at 24p?!

Why don't you just encode at 720i50 (or 720i25, if you're going to be dick about it ;) I personally prefer the field rate following "i", but that's just me)?

Bob-deinterlace your source to 576p50 using a really good bobber (TGMC etc), crop / resize as necessary to reach 1:1 PAR without losing anything in a 720p frame, and then re-interlace to 720i50.

I'm not 100% sure BluRay supports 720i50, but I'm almost totally sure it does support 1080i50. In case this is the case, then you can easily upscale to 1080p50 instead of 720p50 before re-interlacing.

For that matter, you could also encode at 720p50, which I am more confident in BluRay supporting! Plus, x264 is a bit more efficient in progressive mode.

Don't slow things down or do standards conversion / mocomp unless you really must! And, never ever throw away half your temporal resolution unless your content really doesn't need it.

~MiSfit

MrVideo
6th January 2010, 03:34
Why don't you just encode at 720i50 (or 720i25, if you're going to be dick about it ;) I personally prefer the field rate following "i", but that's just me)?

Because the standard is: vertical size | i/p | FRAME rate

That way there is no confusion as to if the person doing the writing is indicating frames or fields. By using ONE nomenclature, we all understand.

I'm not 100% sure BluRay supports 720i50, but I'm almost totally sure it does support 1080i50. In case this is the case, then you can easily upscale to 1080p50 instead of 720p50 before re-interlacing.

No. 720 is progressive only.

MadMonkey57
6th January 2010, 12:57
...I do not know why you were going to 432 in the first place...
My 720x576 (4:3) DV sources have top/bottom black bars that I can crop (by a mod 4 value). The actual picture fits in 720x432 (4:3) which i choose to resize to 16:9 once it is properly (smart)bobbed or deinterlaced. The final resolution is 1280x720 if I encode progressive frames and 720x576 (16:9) if I encode interlaced frames

All the details are in this thread (http://forum.doom9.org/showthread.php?t=143915&page=2).

...Why would you want to slow down video?...
Assuming I will encode progressive frames, I have to make a choice:

- alter the video stream to reach an appropriate framerate for Blu Ray (i.e 23.976p)
--> (+) video bitrate kept reasonably low
--> (+) audio untouched
--> (-) video altered (changefps, mflowfps, ...)

- keep the frames intact but slow down video and audio
--> (+) video bitrate kept reasonably low
--> (-) audio and video slowed down (4,27%)
--> (+) video frames untouched

- choose 50p
--> (-) higher video bitrate
--> (+) audio untouched
--> (+++) ideal for video frames

For my DV sources, I usually choose the third scenario as I tend to give quality a higher priority.
For 1080i sources, I could also choose the third scenario, but I have to size the picture down to 1280x720 in order to be Blu Ray compliant. That's the reason why I am now considering scenarii 1 and 2...

...x264 encoder...
Oh yeah I use x264 everyday to encode progressive streams as a basis for my BD5s, but encoding AVCHD/BD compliant interlaced streams targeted at BD5s is a different story (I haven't looked much into this though...).

...The book is about the Blu-ray standard, in layman's terms. It is not about how to create the H.264, or whatever, MPEG content that goes on the disc.
OK. I might buy it anyway.

MadMonkey57
6th January 2010, 13:27
...Why don't you just encode at 720i50...1080i50...
Well as I wrote earlier in the thread, I am not comfortable with encoding interlaced frames AND achieving 100% Blu Ray compliance AND playability as BD5s.

...you could also encode at 720p50...
That's what I actually do with my DV sources. But with 1080i25 sources, I would have to scale the picture down. I have to make a choice :

-> 1920x1080x25i -> Smart Bobbing 1920x1080x50p -> Downsizing 1280x720x50p
-> 1920x1080x25i -> Smart Bobbing 1920x1080x50p -> ChangingFPS 1920x1080x23.976p
-> 1920x1080x25i -> Smart Deinterlacing 1920x1080x25p -> Slowing down 1920x1080x23.976p

...Pros and cons similar to my previous post (http://forum.doom9.org/showthread.php?p=1360549#post1360549])... and in addition, if I consider processing time, sources specifics (fast moving parts, ...)...I can't make the decision... Maybe I'd better look how to achieve a proper interlaced encoding...

Blue_MiSfit
7th January 2010, 01:15
Sorry for my vacuous replies earlier. I'm now seeing your situation more clearly.

I know x264 can do 100% BluRay / AVCHD compliant 1080p23.976 encoding, provided you have the correct build with the nal-hrd patch, and use the correct encoding settings, including VBV.

I haven't personally tested x264's interlaced output too much, but plenty of folks use it every day. I'm sure it's not totally broken, but who knows if it can make a stream that a BluRay verifier app will like?

Any particular reason you're worried about 100% compliance? I bet you're distributing your content, huh?

I'd suggest resurrecting the BluRay compliance thread, and asking the folks about interlaced encoding. It's a pretty important question, if you ask me! Some folks in that thread have the BluRay verification software and had run elementary streams through it.

For "fun" you could also try just encoding some interlaced conent and seeing how it plays on BD5 media. My guess is most players would be more than happy with it. Of course, knowing for sure is hard to do without those "certified" verification bits.

-Misfit

MrVideo
7th January 2010, 06:57
I've been searching but so far I can't find one that I like... But I am probably biased since I kinda fell in love with the Sony XR500/XR520...:o
Once you come across a nice HD cam that records progressive frames, I'd love to hear from you !

My friend is currently in New Zealand and picked up a new HD camcorder on the way there from the U.K.

Check out the Sanyo Xacti HD2000. The U.S. model does 1080p60, 1080p30 and 1080i30. It even does 720p. I'm guessing that it will do 1080p50 and 1080p25. SD/SDHC storage (32GB max).

MadMonkey57
7th January 2010, 11:59
...I'd suggest resurrecting the BluRay compliance thread, and asking the folks about interlaced encoding. It's a pretty important question, if you ask me! Some folks in that thread have the BluRay verification software and had run elementary streams through it...

It can't hurt indeed ! Started a new thread. (http://forum.doom9.org/showthread.php?t=151885)

MadMonkey57
7th January 2010, 12:06
My friend is currently in New Zealand and picked up a new HD camcorder on the way there from the U.K.

Check out the Sanyo Xacti HD2000. The U.S. model does 1080p60, 1080p30 and 1080i30. It even does 720p. I'm guessing that it will do 1080p50 and 1080p25. SD/SDHC storage (32GB max).

Looks like Canon is being nice (http://www.canon.co.uk/For_Home/Product_Finder/Camcorders/High_Definition_HD/index.asp) with us...