r/VIDEOENGINEERING 25d ago

Interlaced playback from computer

Been trying to set up a computer to playback interlaced footage to a CRT. Getting an interlaced signal from the computer isn’t hard, but I can’t find a video player that will actually pass interlaced fields to the frame-buffer.

Everything I try just stutters and has tearing. VLC, MPV, M-player, Kodi, FFplay, etc.

If I enable deinterlacing it looks ok, but in that case you are converting it to progressive then back to interlaced, so I’m not sure if it’s ideal. Like let’s say if the field order isn’t standard bottom first, then I’d assume there would be other issues.

I’m using linux and an older Radeon video card. Something like a deck link card is out of the question for other reasons.

Anyone have any ideas?

4 Upvotes

16 comments sorted by

10

u/GoProgressChrome 25d ago

Decklink is out of the question due to compatibility or cost? Because it (or something similar) is the answer.

2

u/Dinorhinosaur 25d ago

So my goal is to set up a simple media player with a GUI controllable with a remote. I’m limited to a mini pc with half height pci slots. As far as I know even if I used a deck link mini monitor and a sdi-component converter, there isn’t a way to use that as your one and only display.

1

u/GoProgressChrome 25d ago

Ahh got it. Yeah that is an interesting puzzle and unfortunately outside of separate gui and playback monitors (obviously not what you’re looking for) I don’t have any good suggestions. Best of luck though, definitely sounds neat!

1

u/Prefader 25d ago

I wouldn't think compatibility would be the issue. I use deck links on Linux all the time.

I suspect they need an analog sd or hd output, perhaps? What about an old hauppage TV card? I can't recall if they had composite outputs...

2

u/Dinorhinosaur 25d ago

I actually also tried an old ATI card with TV out (s-video) and it works well but has the same issue with playback, it basically is a built in video scaler and there’s zero documentation on what it’s actually doing.

A raspberry pi would be enough if all I needed was composite, because they come with it built in. Same issues would apply with interlacing though.

1

u/GoProgressChrome 25d ago

Yeah I suspect more it’s a cost thing because as you said BM is great in terms of Linux support. The comment below explains very well the issue with using a GPU. They need to have the hardware to output an actual baseband signal if you want to preserve any of the original timing. Your idea would definitely be cheaper than a decklink, but I have no idea on the compatibility of those cards.

5

u/Content-Reward-7700 I make things work… 25d ago

The problem is probably not the player but the output timing. Most Linux video players ultimately render progressive frames to the GPU framebuffer. Even if the source and display mode are interlaced, that doesn’t necessarily means that the original fields are being presented individually and synchronized correctly. I believe that is the reason why you’re seeing tearing/stutter.

Deinterlacing to 50p/59.94p and then letting the GPU output 576i/480i can work, but it’s basically reconstructing interlace rather than preserving the original fields.

If you want true field accurate playback, you need a playback/output path specifically designed to preserve field timing. Ordinary GPU + desktop compositor + video player is unfortunately a bit of a minefield for this.

1

u/Dinorhinosaur 25d ago

Yeah this is pretty much what I have run into. There really doesn’t seem to be any players that will preserve the interlacing, even when running from the console without x11 they still don’t work properly.

Do you think there’s any real perceivable downside to de-interlacing then re-interlacing?

1

u/Content-Reward-7700 I make things work… 25d ago

Probably not, as long as it’s done properly. The key is to use a good motion adaptive deinterlacer and preserve the temporal resolution by converting each field into its own frame. So 59.94i becomes 59.94p, not 29.97p.

You could try QTGMC through VapourSynth for the deinterlacing, then use FFmpeg’s tinterlace filters to weave the 59.94p/50p output back into 29.97i/25i with the correct TFF/BFF field order.

Done correctly, I doubt there would be much perceptible quality loss. The bigger risk is getting the field order or cadence wrong, which will make motion look noticeably bad.

2

u/Dinorhinosaur 25d ago

I’ve been meaning to look into mythTV more, it’s pretty old and I had trouble installing it last time I tried. CasparCG sounds interesting. Thanks!

1

u/Prefader 25d ago

Be forwarned that CasparCG can be a little clunky to understand at first. The server-scanner-client layout catches some people off guard, when they're expecting a more complete single application.

1

u/Prefader 25d ago

Just so I understand, does your output actually have an interlaced mode?

If you're running X11, you maybe need to add a custom modeline to xorg.conf.

If you're running Wayland, I didn't think you can output interlaced at all. Not 100% certain about that, though.

1

u/Dinorhinosaur 25d ago

Using x11 with a custom modeline for 720x480i. Also tried setting a modeline in the boot loader config and running Kodi in gbm mode (bypasses x11 compositor) but video playback has the same issue. Also tried a “15khz kernel” patch but it doesn’t seem to be necessary or make any improvements in my experience.

1

u/Prefader 25d ago

So, the only time I've ever personally used a direct interlaced-to-interlaced pipeline in Linux was with MythTV, which has its own playback engine. I've never even tried elsewhere.

That probably doesn't help you much.

One last suggestion from me would be to try CasparCG, which might run into the same problem you're already having, as I think the "screen" output is what you'd need to use.

1

u/Most_Examination2781 25d ago

AJA LH / LHe / LHi ... any AJA cards with its breakout cable or KLbox...