<p>Use the <a href="http://www.ffmpeg.org/ffmpeg-filters.html#setparams-1" rel="nofollow noreferrer">setparams</a> filter to mark the frames as interlaced.</p>
<pre><code>ffmpeg -i tf.avi -i bf.avi -filter_complex vstack,il=l=i:c=i,setparams=field_mode=tff -c:v ffv1 out_i.avi
</code></pre>

CC BY-SA 4.0
2021-02-23T05:06:19.047Z
Thank you very much Now, my NLE detects it as interlaced, at least when switching to a well supported codec, Prores. However, ffprobe shows 'top coded first (swapped)', instead of  'top first' and, tbn and tbc show 12800 (default), instead of 50. Not clear if this has any negative impact. I assume I have to create a new thread on this?
The Lightworker
CC BY-SA 4.0
2021-02-23T04:10:22.667Z
2021-02-23T04:10:22.667Z
Gyan
<p>I'm having trouble with the command found here: <a href="https://video.stackexchange.com/questions/27524/combining-two-video-fields-into-one-to-create-an-interlaced-video">Combining two video fields into one (to create an interlaced video)</a></p>
<p><code>ffmpeg -i tf.avi -i bf.avi -filter_complex vstack,il=l=i:c=i -c:v ffv1 out_i.avi</code></p>
<p>It seems to combine the fields correctly, the output, however, appears to be progressive. To test, I used
the video 'in_i.mxf' (XCDCAM HD 422, 1080i25) and separated the fields in tf.avi and bf.avi, using this:</p>
<p><code>ffmpeg -i in_i.mxf -vf field=top -c:v ffv1 -an tf.avi -vf field=bottom -c:v ffv1 -an bf.avi</code></p>
<p>That's the result of 'ffmpeg -i in_i.mxf -i tf.avi -i bf.avi -i out_i.avi':</p>
<pre><code>Input #0, mxf, from 'in_i.mxf':
  Metadata:
    operational_pattern_ul: 060e2b34.04010101.0d010201.01010900
    uid             : 25e9aa02-7405-4800-809e-0700022483ea
    generation_uid  : 25e9aa02-7405-4800-811e-0700022483ea
    company_name    : CANON
    product_name    : XF105
    product_version : 1.00
    product_uid     : 060e2b34-0401-010d-0e15-005658460100
    modification_date: 2016-01-15T14:48:13.000000Z
    material_package_umid: 0x060A2B340101010501010D43130000000A25E9AB0274058000008500022483EA
    timecode        : 13:13:46:14
  Duration: 00:00:10.08, start: 0.000000, bitrate: 51874 kb/s  
  Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 50000 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
  Metadata:
  file_package_umid: 0x060A2B340101010501010D43130000000A25E9AA0274058000008500022483EA
    Side data:          cpb: bitrate max/min/avg: 50000000/0/0 buffer size: 17825792 vbv_delay: N/A
Stream #0:1: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
Metadata:
  file_package_umid: 0x060A2B340101010501010D43130000000A25E9AA0274058000008500022483EA
Stream #0:2: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
Metadata:
  file_package_umid: 0x060A2B340101010501010D43130000000A25E9AA0274058000008500022483EA

Input #1, avi, from 'tf.avi':
  Metadata:
    software        : Lavf58.67.100
    timecode        : 13:13:46:14
  Duration: 00:00:10.08, start: 0.000000, bitrate: 98506 kb/s
  Stream #1:0: Video: ffv1 (FFV1 / 0x31564646), yuv422p, 1920x540, 98889 kb/s, SAR 1:1 DAR 32:9, 25 fps, 25 tbr, 25 tbn, 25 tbc

Input #2, avi, from 'bf.avi':
  Metadata:
    software        : Lavf58.67.100
    timecode        : 13:13:46:14
  Duration: 00:00:10.08, start: 0.000000, bitrate: 98381 kb/s
  Stream #2:0: Video: ffv1 (FFV1 / 0x31564646), yuv422p, 1920x540, 98763 kb/s, SAR 1:1 DAR 32:9, 25 fps, 25 tbr, 25 tbn, 25 tbc

Input #3, avi, from 'out_i.avi':
  Metadata:
    software        : Lavf58.67.100
    timecode        : 13:13:46:14
  Duration: 00:00:10.08, start: 0.000000, bitrate: 201187 kb/s
  Stream #3:0: Video: ffv1 (FFV1 / 0x31564646), yuv422p, 1920x1080, 201979 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 25 tbn, 25 tbc          
</code></pre>
<p>It might be just a metadata problem? Any ideas how to optimize?</p>

<ffmpeg>
Trouble When Combining two video fields into one (to create an interlaced video)
The Lightworker
# Trouble When Combining two video fields into one (to create an interlaced video)

(Asked by: username_0 on 2021-02-23)

I'm having trouble with the command found here: Combining two video fields into one (to create an interlaced video)
ffmpeg -i tf.avi -i bf.avi -filter_complex vstack,il=l=i:c=i -c:v ffv1 out_i.avi
It seems to combine the fields correctly, the output, however, appears to be progressive. To test, I used
the video 'in_i.mxf' (XCDCAM HD 422, 1080i25) and separated the fields in tf.avi and bf.avi, using this:
ffmpeg -i in_i.mxf -vf field=top -c:v ffv1 -an tf.avi -vf field=bottom -c:v ffv1 -an bf.avi
That's the result of 'ffmpeg -i in_i.mxf -i tf.avi -i bf.avi -i out_i.avi':
Input #0, mxf, from 'in_i.mxf':
  Metadata:
    operational_pattern_ul: 060e2b34.04010101.0d010201.01010900
    uid             : 25e9aa02-7405-4800-809e-0700022483ea
    generation_uid  : 25e9aa02-7405-4800-811e-0700022483ea
    company_name    : CANON
    product_name    : XF105
    product_version : 1.00
    product_uid     : 060e2b34-0401-010d-0e15-005658460100
    modification_date: 2016-01-15T14:48:13.000000Z
    material_package_umid: 0x060A2B340101010501010D43130000000A25E9AB0274058000008500022483EA
    timecode        : 13:13:46:14
  Duration: 00:00:10.08, start: 0.000000, bitrate: 51874 kb/s  
  Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 50000 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
  Metadata:
  file_package_umid: 0x060A2B340101010501010D43130000000A25E9AA0274058000008500022483EA
    Side data:          cpb: bitrate max/min/avg: 50000000/0/0 buffer size: 17825792 vbv_delay: N/A
Stream #0:1: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
Metadata:
  file_package_umid: 0x060A2B340101010501010D43130000000A25E9AA0274058000008500022483EA
Stream #0:2: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
Metadata:
  file_package_umid: 0x060A2B340101010501010D43130000000A25E9AA0274058000008500022483EA

Input #1, avi, from 'tf.avi':
  Metadata:
    software        : Lavf58.67.100
    timecode        : 13:13:46:14
  Duration: 00:00:10.08, start: 0.000000, bitrate: 98506 kb/s
  Stream #1:0: Video: ffv1 (FFV1 / 0x31564646), yuv422p, 1920x540, 98889 kb/s, SAR 1:1 DAR 32:9, 25 fps, 25 tbr, 25 tbn, 25 tbc

Input #2, avi, from 'bf.avi':
  Metadata:
    software        : Lavf58.67.100
    timecode        : 13:13:46:14
  Duration: 00:00:10.08, start: 0.000000, bitrate: 98381 kb/s
  Stream #2:0: Video: ffv1 (FFV1 / 0x31564646), yuv422p, 1920x540, 98763 kb/s, SAR 1:1 DAR 32:9, 25 fps, 25 tbr, 25 tbn, 25 tbc

Input #3, avi, from 'out_i.avi':
  Metadata:
    software        : Lavf58.67.100
    timecode        : 13:13:46:14
  Duration: 00:00:10.08, start: 0.000000, bitrate: 201187 kb/s
  Stream #3:0: Video: ffv1 (FFV1 / 0x31564646), yuv422p, 1920x1080, 201979 kb/s, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 25 tbn, 25 tbc          

It might be just a metadata problem? Any ideas how to optimize?

**Tags:** ffmpeg


---

## 1 answers

### Answer by username_1 on 2021-02-23. Score: 1

Use the setparams filter to mark the frames as interlaced.
ffmpeg -i tf.avi -i bf.avi -filter_complex vstack,il=l=i:c=i,setparams=field_mode=tff -c:v ffv1 out_i.avi

> **Comments:**
> **username_0**: Thank you very much Now, my NLE detects it as interlaced, at least when switching to a well supported codec, Prores. However, ffprobe shows 'top coded first (swapped)', instead of  'top first' and, tbn and tbc show 12800 (default), instead of 50. Not clear if this has any negative impact. I assume I have to create a new thread on this?  

---

