DB query to mark content as interlaced

Is there any query I can run against Jellyfin db to manually set/mark specific items (movies, shows, recordings, music videos) as interlaced?
I have a bunch of content that I converted from dvd to mkv without transcoding so most of this content, as the dvd source, is interlaced.
The problem is that when I playback this content it doesn’t look good due to the interlacing. I looked in metadata manager for an option to do this without touching the db but I wasn’t able to find anything. So I’m wondering if there is any SQL query I can run against Jellyfin db to do the same.

Are you viewing the content in the web UI ? If it has to transcode it to play then it might be that process which is causing the degrade in quality. Having a look there is a field in the library.mediastreams table called “isInterlaced” you could try editing that but I’m not sure whether that’d have any effect. As always before messing with the DB you should take a backup first

Yes. In the web UI and the problem is not the quality itself but the small horizontal black bars through all the image especially in fast action scenes or camera movement. I think that if there is a way to tell Jellyfin that this content must be de-interlaced it should be much better. I will try the field you mentioned in the db and see if it helps. Thanks.

So I had a look at the library.mediastreams table but to my surprise filtering by the Path column most of my items in the Music Videos library are not listed in that table (only one of them is).
On the other hand, looking around I found that the TypedBaseItems contains several entries for the same item Path. Unfortunately this table doesn’t contain any reference to interlace status of an item.

Now I have a couple of questions:

  1. Is Jellyfin database schema and flows documented anywhere?
  2. Why mediastreams table only contains rows for some media items but not all?
  3. Which Jellyfin task or workflow is adding data to the mediastreams table?

Thanks.

So I spoke with some of the other devs and it seems like the ability to tell jellyfin your content is interlaced isn’t currently a part of the schema and they will add it to the list of things to add in the database rework

1 Like

Awesome, thanks for the update.