[Libav-user] Writing Interlaced Video

Nils Jessen jessen at irt.de
Thu Jun 12 12:24:47 CEST 2014


As it turned out, the commands seem to be right. If I use the mov 
container instead of avi the interlaced flags are written correctly. I 
am using the same commands and codec (V210):

picture->interlaced_frame = 1;
picture->top_field_first = 1;
c->field_order = AV_FIELD_TT;

MediaInfo shows scan type "interlaced"and scan order "tff". Watching the 
video does not look any different, but I am not sure if vlc even takes 
interlaced information into account... So, any chance it will work with 
avi like this? Avi seems to ignore these commands.


Am 12.06.2014 11:17, schrieb Nils Jessen:
> Thank you Carl!
>
> I will try to explain it a little bit better (my knowledge is quite 
> limited though).
>
> V210 should be able to store interlaced footage (per line, in one 
> "frame" see [2]). All odd lines in the "frame" representing one 
> interlaced frame and all the even another. The source footage is 
> already in this format, so I basicly need to tell the decoder the 
> footage is indeed interlaced and which "field" comes first.
>
> Using all the interlaced options mentioned the output looks exactly 
> the same as the progressive source from the header perspective. 
> Watching the avi in vlc looks heavily interlaced, meaning both 
> interlaced frame are shown at the same time and the frame rate is not 
> doubled (or progressive in other words). If I turn the 
> "anti-interlacing" on, the artifacts disappear.
>
> So how can I add the header information?
> Since the avi container can not store this information, I think the 
> flag needs to be embedded in the codec header inside the avi... right?
>
> [1] 
> https://developer.apple.com/library/mac/technotes/tn2162/_index.html#//apple_ref/doc/uid/DTS40013070-CH1-TNTAG8-V210__4_2_2_COMPRESSION_TYPE
> [2] http://www.digitalpreservation.gov/formats/fdd/fdd000353.shtml
> [3] 
> http://ffmpeg-users.933282.n4.nabble.com/Forcing-interlaced-handling-td4347858.html
>
> Am 11.06.2014 22:06, schrieb Carl Eugen Hoyos:
>> Nils Jessen <jessen at ...> writes:
>>
>>> Everything works perfectly fine using AV_CODEC_ID_V210
>>> and AV_PIX_FMT_YUV422P10LE writing progressive material,
>>> but I am not able to set the output format to interlaced.
>> Are you sure that v210 supports interlacing?
>>
>> Or in other words: Are you worried because
>> your frames *look* progressive or because
>> you want to signal to your decoder that
>> they are interlaced?
>>
>> In case this is your question: I don't think you can
>> store fields in v210 (the way it is possible in
>> h264 and mpeg2 video).
>>
>> Carl Eugen
>>
>> _______________________________________________
>> Libav-user mailing list
>> Libav-user at ffmpeg.org
>> http://ffmpeg.org/mailman/listinfo/libav-user
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user

-- 
Nils Jessen

Institut fuer Rundfunktechnik GmbH
Research and Development Institute of ARD, ZDF, DRadio, ORF and SRG/SSR
Floriansmuehlstrasse 60, 80939 Muenchen, Germany
Phone: +49 89 / 323 99 - 207
Email: jessen at irt.de
Web: www.irt.de

Registration court: Munich Commercial, Register No. B 5191 Managing
director: Dr. Klaus Illgner-Fehns



More information about the Libav-user mailing list