On date Saturday 2010-07-17 21:49:47 +1000, Mark Heath encoded:
>
> On 17/07/2010, at 8:22 AM, Ronald S. Bultje wrote:
>
>> On Thu, Jul 15, 2010 at 9:04 PM, Mark Heath <[email protected]>  
>> wrote:
>>> Is this the right forum for libavfilter related questions?
>>
>> Sure. Don't ask to ask, just ask. :-).
>
> Wasn't sure if it should be libav-user or libav-devel
>
>
> Is there a way to determine frame rate or interlace order from within a 
> custom avfilter?

As for the frame rate... the only information you have when processing
video frames is the PTS (and eventually the pos) of each frame, so you
can use that info for computing the average framerate in a given
interval.

*OR* you can pass that information to the filter itself during init,
*or* making it access that information indirectly through the opaque
*which you pass to the filter during initialization.

As for the interlacing, there are some fields in AVFilterPicRef
(interlaced and top_field_first) which contain that information. The
source of the picref needs to fill those fields (e.g. in the case of
ffmpeg.c is the input source).

> These are quite important details I'm needing for my video filter, I'm  
> currently parsing them in via command line.
> I'm also looking at porting some mjpegutil yuv filters and these details 
> are needed in the filters I'm porting.

lavfi is still work in progress and it's quite complex, so there are
still many details which need to be readjusted to make it work
smoothly, but ports and other contributions are always welcome.

> Also my filter introduces a (small) delay in the video, it is impossible 
> to avoid or correct, is there a way to inform ffmpeg of this so that is 
> correctly syncs the audio?
>
> I tried modifying the PTS on the output, but it seems to make no  
> difference.
>
> anyone know how to do this?

I suppose that your intuition should be correct, you should modify the
PTS in output, check for example the setpts filter.  Also when
debugging such issues don't forget to enable the DEBUG symbol at the
beginning of avfilter.c, that and grep should help to discover many
problems.

> Thanks
> Mark

Regards.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to