Interlaced video output support?
#16
Stu-e Wrote:Yes interlaced output is not at all supported by XBMC or any other media playback software I can think of.

My experience is similar to yours in that it is better in many circumstances just to pass the video on to the TV as is and let the TV work out when to deinterlace or inverse-telecine and perform any other kind of video processing, just like most set-top boxes like DVD players for example.

Or of course none at all; but just passing the interlaced fields all the way to the screen and letting our persistence of vision sort it out, as originally designed. :-)

My experience at least finds that it's not 'many circumstances' but, so far at least, just this one: material telecined in such a way that they can't be easily or satisfactorily detelecined, which for me so far is just this BBC 25fps to 29.97fps which, thankfully, seems to be a practice they've since stopped on more recent releases at least for the European market. Eg: doctor who season 4 specials is telecined but season 5 is not. Everything else can be turned into nice progressive well. In fact even the above can be encoded down to 720p with handbrake with detelecine/decomb on, ie: for appletv2, and looks fine there, but the downscaling seems to be a necessary part of making it watchable.

Thanks for responding. Yes, my eventual solution was to use my (samsung) bluray player via dlna which, amazingly, I actually got to work and, yes, didn't show the problems experienced via USB drive. These files play perfectly there now from the same media vault I use to feed xbmc. So while neither it nor xbmc can play everything in my vault, between them, they do, with a lot of overlap. Not perfect but likely as good as I'm going to get in the near future.
Reply
#17
My experience is with broadcast TV in the UK at 25fps. Even VDPAU fails to perform as good as most mid-range flat panel TVs. My GT220 will deinterlace ok with advanced deinterlacers, at the expense of a lot of heat, but fails to detect progressive material with 2:2 pulldown. The result is the deinterlacer keeps turning on and off every second or so ruining the picture quality.

Stu-e
Reply
#18
Well I tried my little ffmpeg+OpenGL re-interlacing application on a 1080i 50Hz CRT monitor and it looked good. Field order was always displayed correctly. And that was without paying attention to the correct frame rate (it was 50i video played back at about 58 fields/second). I did however enable vsync to avoid tearing.

One particularly important thing I learned when dealing with video fields was that a frame of YUV420planar containing 2 interlaced fields must be separated into fields before converting to RGB. This explains why all interlaced material I see played back on XBMC with no deinterlacing, has tiny colour banding. Simply because the frames are dealt with as progressive.

Now I only wish I new where to begin to implement something like this in XBMC.

Can anybody suggest where I might start looking in the forest of XBMC code where I could implement something like this? Ideally one would be able to select a de-interlace algorithm something like "re-interlace" maybe? It would be similar to bob where the fields are separated, converted to RGB and the frame rate doubled, but instead would need to weave together every 2 neighbouring fields per frame. I think this would be best done in a GL shader after the colour conversion.

(edit) As a rough proof of concept actually a bob deinterlacer would be a very good area to modify. Instead of scaling a field over the whole frame, we draw alternate lines. You only need to deal with 1 field at a time and rely on persistent data in the frame buffer to retain the previous field on the other alternate lines.

Stu-e
Reply
#19
Rachel Wrote:I got XBMC to output to an interlaced mode; the TV reports switching to 1080i, and *initially* the media starts playing perfectly.

How did you do this?

My TV (Pansonic V20) has a built-in deinterlacer and supports (according to EDID) 1920*1080i. But I don't know how I can pursuade XBMC to output the interlaced HD material as interlaced. My TV always sees a 1080p signal.
Reply
#20
Hammi Wrote:How did you do this?

My TV (Pansonic V20) has a built-in deinterlacer and supports (according to EDID) 1920*1080i. But I don't know how I can pursuade XBMC to output the interlaced HD material as interlaced. My TV always sees a 1080p signal.

It probably matters that this is on Linux, where I was able to change the /etc/X11/xorg.conf file to specify that the 60Hz mode to use was the interlaced one, not the progressive one. This was OK for me because the problematic material is all 60Hz interlaced, and I have no 60Hz progressive material.

Following the instructions in this thread, (which appears to have become unstuck) I end up with a section at the bottom of the file listing the modes from EDID, for me this is:

Code:
#  --- Modes in ModePool for Panasonic-TV (DFP-1) ---
#  "nvidia-auto-select" : 1920 x 1080 @  50.0 Hz  
#  "1920x1080"          : 1920 x 1080 @  50.0 Hz  
#  "1920x1080_50"       : 1920 x 1080 @  50.0 Hz  
#  "1920x1080_60"       : 1920 x 1080 @  60.0 Hz  
#  "1920x1080_60_0"     : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 16)
#  "1920x1080_24"       : 1920 x 1080 @ 23.97/24 Hz (CEA-861B Format 32)
#  "1920x1080_60i"      : 1920 x 1080 @ 59.94/60 Hz (CEA-861B Format 5)
#  "1920x1080_50i"      : 1920 x 1080 @ 50 Hz Interlace (CEA-861B Format 20)
#  "1280x720"           : 1280 x  720 @  60.0 Hz  
#  "1280x720_60"        : 1280 x  720 @  60.0 Hz  
#  "1280x720_60_0"      : 1280 x  720 @ 59.94/60 Hz (CEA-861B Format 4)
#  "1280x720_50"        : 1280 x  720 @  50.0 Hz  
#  "720x576"            :  720 x  576 @  50.0 Hz  
#  "720x576_50"         :  720 x  576 @  50.0 Hz  
#  "720x576_50i"        : (1440)x 576 @ 50 Hz Interlace (CEA-861B Format 22)
#  "720x480"            :  720 x  480 @ 59.94/60 Hz (CEA-861B Format 3)
#  "720x480_60"         :  720 x  480 @ 59.94/60 Hz (CEA-861B Format 3)
#  "720x480_60i"        : (1440)x 480 @ 59.94/60 Hz Interlace (CEA-861B Format 7)
#  "640x480"            :  640 x  480 @ 59.94/60 Hz Interlace (CEA-861B Format 1)
#  "640x480_60"         :  640 x  480 @ 59.94/60 Hz Interlace (CEA-861B Format 1)
#  --- End of ModePool for Panasonic-TV (DFP-1): ---

By default, the mode "1920x1080_60_0" is used; ie: in the "Screen" section of xorg.conf:

Code:
Modes "1920x1080_50" "1920x1080_60_0" "1920x1080_24"

I replaced it with the "1920x1080_60i" mode, thus:


Code:
Modes "1920x1080_50" "1920x1080_60i" "1920x1080_24"

Thus, with XBMC set to switch refresh rate to match what it's playing, when it plays a 60Hz video, it has to choose that mode. TV reports 1080i and we're off - for a while, but after a short period of watching where it's perfect, it seems as if the timing drifts off and everything goes very jerky.
Reply
#21
Hammi Wrote:How did you do this?

My TV (Pansonic V20) has a built-in deinterlacer and supports (according to EDID) 1920*1080i. But I don't know how I can pursuade XBMC to output the interlaced HD material as interlaced. My TV always sees a 1080p signal.

Oh and to answer the rest of the question, the videos in question *are* interlaced, with XBMC not set to do any deinterlacing of its own. XBMC certainly shouldn't be *interlacing* progressive content. :-)

The original blurays are 1080i 60Hz interlaced using the VC1 codec, which XBMC (ie: ffmpeg) can't play. They're transcoded using RipBot264 on Windows with the --tff option given to x264 to retain the interlacing of the original as it turns it into h.264. I have one disc, the David Tennant Hamlet, which does the same thing, originally 25fps telecined to 30fps but still h.264 so I could feed this directly to xbmc (and so eliminate RipBot264's transcoding from my enquiries). All the same behaviour.

Of course I'd actually still prefer to have a detelecine that actually works properly on these discs but I seem to be out of luck: 25->30fps telecining seems to be done with a greater variety of techniques and patterns than the 24-30fps telecining Americans will be very used to, and it isn't actually done very often, it seems.
Reply
#22
Hammi
I have not achieved interlaced output using XBMC. I have been experimenting with a simple bit of code based on an FFMPEG tutorial to prove the concept of interlaced output and to obtain some basic ground rules which could be used by an XBMC coder to add deinterlaced output to XBMC (I hope).
Reply
#23
Hammi Wrote:My TV (Pansonic V20) has a built-in deinterlacer and supports (according to EDID) 1920*1080i. But I don't know how I can pursuade XBMC to output the interlaced HD material as interlaced. My TV always sees a 1080p signal.

What's your videocard? I'm pretty sure that the de-interlacing work that my nvidia GTS450 does (spatial/temporal for 1080i) is far better than my panasonic V10 built-in deinterlacer (if I understand well, V20 deinterlacer is similar to the V10 deinterlacer).
Reply
#24
joethefox Wrote:What's your videocard? I'm pretty sure that the de-interlacing work that my nvidia GTS450 does (spatial/temporal for 1080i) is far better than my panasonic V10 built-in deinterlacer (if I understand well, V20 deinterlacer is similar to the V10 deinterlacer).

I have an ION(1) chipset on my Zotac board (together with an Atom 330). I tried a few deinterlacers, which caused either stuttering or blocks in lines, making the picture look more like 576i (or even less) than like FullHD.
Reply
#25
@Hammi, Spatial/Temporal require GPU power (about 65% of GPU during 1080i deinterlacing with the GTS450), maybe ION isn't capable to do this. I saw that some build of XBMC have the option "ION optimized" as deinterlacing process.
Reply
#26
joethefox Wrote:@Hammi, Spatial/Temporal require GPU power (about 65% of GPU during 1080i deinterlacing with the GTS450), maybe ION isn't capable to do this. I saw that some build of XBMC have the option "ION optimized" as deinterlacing process.

I had been looking for this, as I think I read somewhere that the ION was capacble of internally handling certain deinterlace functions. But I don't think that the main XBMC build available through the repos offer this. (Or I'm too blind to find them.)
Reply
#27
@Hammi, with this build from Lars Op den Kamp PPA: XBMC Dharma with a backport of the PVR functionality, I found "ION optimized" deinterlace option.
Reply
#28
I would like to kindly bump this topic as I am also very interested, last time I checked trac (today) this ticket was still open? Is there any progress?
Reply
#29
Stu-e, do you still have the patch you wrote for ffmpeg which you describe in this thread, and is it still in working order? I'd be very interested in getting hold of it, since I could quite happily just use ffplay to do the actual playing on my owm media centre. I am having the problem you describe with playing 1080i material on a 1080i TV. I am able to fix it by deinterlacing with yadif mode 1 (field) which doubles the frame rate, but this takes so much power that the CPU fan gets noisy, and seems wasteful since the TV only uses half the resulting data.
I played around with TclTk graphics to simulate a moving block displayed with a 50Hz frame rate and the interlaced fields in 12 - 32 - 34 - 54 order (can we call this consecutive weave?) It looked just as good as the same image with full 50Hz progressive scan. So this filter should give me good video and take less processing power than algorithmic deinterlacing.
I know this is off topic for xbmc, but...pretty please?
Reply

Logout Mark Read Team Forum Stats Members Help
Interlaced video output support?1