[FFmpeg-devel] Initialize DirectShow source filters with IFileSourceFilter::Load

Roger Pack rogerdpack2 at gmail.com
Sat Oct 27 14:58:14 EEST 2018


On Fri, Sep 21, 2018 at 3:19 PM Maxim Ershtein <mershtein at gmail.com> wrote:
>
> Hello,
>
> ffmpeg allows capturing a/v from custom DirectShow source filters, and
> provides some methods to pass parameters to these filters, but these
> methods seem insufficient.
>
> So ffmpeg offers to launch a filter configuration dialog via
> -show_video_device_dialog
> , however, it doesn't work on some filters, but most importantly, it is not
> a programmatic way; you need to have a user configuring the filter.
>
> I wrote an issue report yesterday to ffmpeg-users:
> http://www.ffmpeg-archive.org/Cannot-receive-audio-video-from-Unreal-WebRTC-DirectShow-Source-filter-td4685353.html
>
> The principal problem is with network capture filters that must be
> initialized with URL or some network address, in order for them to get the
> stream and construct a media type on the output pins.
> They don't have any output media type once instantiated - they must be
> initialized in order to have a media type. Depending on network address
> where they pull a stream from, this media type can be very different.
>
> So a feature suggestion is to use a common COM interface used in DirectShow
> for this purpose:
> IFileSourceFilter. Notice how GraphEdit pops up an open file dialog
> prompting you to load a configuration file, when you try to add source
> filter that supports this interface.
>
> So, ffmpeg can have a command-line parameter, like
> *-IFileSourceFilter_Init_String.*
> If this parameter is passed, AND source filter supports  IFileSourceFilter,
> then ffmpeg calls IFileSourceFilter::Load with that parameter.
>
> Any other idea of how to programmatically pass *custom* parameters to
> source filters,
> is welcomed.

Yeah I attempted to research it once and didn't get very far

https://stackoverflow.com/questions/14050074/how-to-change-directshow-filter-properties-c/27931102#27931102

If IFileSourceFilter is common then that's a legit option...


More information about the ffmpeg-devel mailing list