Recording interlaced video how to change scan type

byu

New Member
I have a setup where I'm capturing 1080i59.94 SDI feed using a decklink mini recorder 4k and saving the feed as an mkv file. I've followed the discussion in this thread: https://obsproject.com/forum/thread...d-encoding-in-ffmpeg-recording-option.134911/
and I'm using the Custom Output (FFmpeg) option, libx264 encoder, and I have "field_order=tt" under the video encoder settings. I'm able to record the video using this setup. However, when I use "mediainfo video.mkv" I get the following as my scan mode:

Scan type : Interlaced
Original scan type : Progressive
Scan type, store method : Separated fields (2 fields per block)
Scan order : Top Field First

I actually want the field "Scan type, store method" to be "interleaved fields" instead of "separate fields". Does anyone know how I could specify the scan type in OBS? I tried adding several different options to the video encoder settings, such as:

-vf tinterlace=interleave_top
tinterlace=interleave_top
interlace=1
-flags +ilme+ildct

and none of these changed anything.

Thanks in advance!
 

AaronD

Active Member
As stated in your linked thread, OBS is not a conversion tool. It's a live processing and broadcast tool. Any other use is technically off-spec, even if it's still useful.

Thus, I would not be surprised if OBS, just as a matter of course, guarantees a full frame buffer for every frame. Every pixel in every line in every frame is defined, not just every other line like interlaced is. THEN it goes through the processing, and then the encoder. Thus, the encoder always receives progressive, period.

If you want an interlaced recording, you'll need to use something else. FFMPEG will do it, and you might give it a custom command in OBS to create an interlaced file, but OBS will never give it an interlaced stream to make that file from. If the source is interlaced, OBS de-interlaces it to progressive, processes that (could be a dumb passthrough, but still already progressive at that point), and then the encoder with a custom option might RE-interlace it. OBS does not pass interlaced video unchanged.

So, also as stated in your linked thread, you'll need to use FFMPEG *outside of OBS*. Call it directly, not with OBS's wrapper around it. Or use a different wrapper, not OBS.

Both "as-stated" points are in the second post of that thread, by the way.

---

There's also the question of whether the capture device keeps it interlaced. Some don't, but de-interlace to progressive *in the hardware*, and then present that progressive stream to the OS. There may or may not be an option to turn that off.
 

Suslik V

Active Member
...OBS de-interlaces it to progressive
Not by itself, you need to apply Deinterlacing filter (right-click menu over the Video Capture Device source and select algorithm Yadif, Linear etc), otherwise - there will be mess of lines that will be treated as progressive.

Just for info. The mentioned MediaInfo output, means:
Scan type : Interlaced -> media container, header of the file, says that the video interlaced​
Original scan type : Progressive -> video stream, encoded data itself, are progressive​
 

koala

Active Member
Does anyone know how I could specify the scan type in OBS? I tried adding several different options to the video encoder settings, such as:
OBS uses ffmpeg as decoder and encoder, but it doesn't contain the filtering and image processing features of ffmpeg. So in the encoder settings, you can set only real encoder settings. There is no way to add all the ffmpeg conversion and filtering options, because this is part of the ffmpeg image processing library that's not included.

I propose you just record with OBS without any special settings. Just defaults. Simple output mode. Choose "indistinguishable quality". Then use the commandline ffmpeg.exe to do any filtering/postprocessing according to your requirements. This way you can work out the processing options with an existing video file, so you don't need to actually record something - much faster to work out the options.
 

byu

New Member
thanks all for the answers. I will be recording as progressive, then double the frame rate and apply the tinterlace=interleave_top filter after the video is recorded.
 
Top