[FFmpeg-devel] [PATCH] avformat/avienc: fix fields-per-frame value for interlaced video streams
Tobias Rapp
t.rapp at noa-archive.com
Thu Nov 23 10:40:54 EET 2017
On 22.11.2017 23:52, Carl Eugen Hoyos wrote:
> 2017-11-22 16:41 GMT+01:00 Tobias Rapp <t.rapp at noa-archive.com>:
>> Writes one set of field framing information for progressive streams and
>> two sets for interlaced streams. Fixes ticket #6383.
>>
>> Unfortunately the OpenDML v1.02 document is not very specific what value
>> to use for start_line when frame data is not coming from a capturing
>> device, so this is just using 0/1 depending on the field order as a
>> best-effort guess.
>
> I believe your approach is sane but the only available examples
> may indicate that it should be set to something like height / 2 ;-(
Indeed my main problem is that I have not found some real-world example
file with two sets of field framing information. I scanned the files at
http://streams.videolan.org/samples/ but out of >900 AVI files only
about 40 files contain a vprp chunk but none contains two fields.
I have found two files that have FieldPerFrame=2 (indicating an
interlaced video stream) but they contain a truncated vprp chunk (no
field framing information):
http://streams.videolan.org/samples/V-codecs/MJPEGs/matrox-capture.avi
http://streams.videolan.org/samples/avi/TRA3106.avi
As this clearly doesn't match the specs I didn't want to follow these
two examples.
I can use height/2 for start_line offset instead of 1 if that sounds
better, to me it would look like an indication that the fields are
stored separated, but no strong opinion from my side.
Regards,
Tobias
More information about the ffmpeg-devel
mailing list