[FFmpeg-user] Missing "fiel" Video Sample Description extension in .mov's

Tim Nicholson nichot20 at yahoo.com
Mon Oct 8 12:34:50 CEST 2012


On 05/10/12 11:09, Tim Nicholson wrote:
> On 05/10/12 01:02, Carl Eugen Hoyos wrote:
>> Tim Nicholson <nichot20 <at> yahoo.com> writes:
>>
>>> From a perusal of the code in mov.c this is extracted to
>>> st->codec->field_order with an AV_LOG_ERROR for unknown values
>>> (AV_FIELD_UNKNOWN).
>>>
>>> Since I am not seeing that error I presume it is being successfully
>>> retrieved.
>>>
>>> However in movenc.c the "fiel" extension is written provided that:-
>>>
>>> track->enc->field_order != AV_FIELD_UNKNOWN
>>>
>>> and since it is not being written I must assume that the above test is true.
>>>
>>> It would therefore seem that track->enc->field_order is not being set
>>> from st->codec->field_order except in the case of a stream copy.
>>
>> Could you use some printf's (don't forget to #undef printf) 
>> to find out if your conclusion is actually correct?
>>
> 
> I have been doing that, and yes the value of track->enc->field_order is
> 0, I am now adding some more in suitable places to try and see what is
> going on and where the value gets lost.
> 
> As far as I can see the reason that it works for the stream copy case is
> that the information is carried over as part of a memcpy of extradata.
> 

Or maybe not. On the basis of a liberal application of printf's

mov.c happily decodes the fiel tag and shoves it into the AVStream
struct (st->codec->field_order).

If stream copying to a mov in movenc.c  the above is very much present
and correct, and thus the fiel atom is correctly written.

However for a recode to the same "codec" (-c:v rawvideo -pix_fmt
uyvy422),  st->codec->field_order is 0.

Since the AVStream struct does not seem to be used in libavcodec I
cannot work out how it is expected that this will be set for cases other
than a stream copy.

>> Carl Eugen
>>
>> [...]
> 
> 


-- 
Tim




More information about the ffmpeg-user mailing list