[FFmpeg-devel] [PATCH] avfilter: add rawdump filter

Eoff, Ullysses A ullysses.a.eoff at intel.com
Wed Jul 10 22:54:32 EEST 2019


> -----Original Message-----
> From: Eoff, Ullysses A
> Sent: Tuesday, July 09, 2019 6:45 PM
> To: ffmpeg-devel at ffmpeg.org
> Cc: Eoff, Ullysses A <ullysses.a.eoff at intel.com>
> Subject: [PATCH] avfilter: add rawdump filter
> 
> This filter enables raw frames to be dumped to a
> file before they are sent through the auto-inserted
> scaler filter and useful when you want unscaled
> raw frames in an output file.
> 

The primary goal that I'm trying to achieve here is
dump raw "unscaled" yuv to an output file while 
decoding a multi-resolution video.  Unfortunately,
the ffmpeg utility auto-inserts a scaler into the filter
graph, so -f rawvideo doesn't suffice here since the
decoded data passes through the scaler before it's
handed off to the rawvideo filter.

I experimented with the alternative methods suggested
in earlier feedback.  More specifically, "reinit_filter"
and "split" were suggested.

For "split" filter, I couldn't find a way that it could bypass
the auto-inserted scaler.

Although -reinit_filter 0 works in some cases, it is quite
verbose.  And I have found many other cases where it
doesn't work when we need to specify additional filters
(e.g. hwupload, hwdownload when doing qsv or vaapi
accelerated decoding with hw output formats).

So, afaict, this patch is the only reliable method I can
find to intercept the decoded data before it reaches
the scaler for various use-cases (although the patch still
needs a little bit of work as pointed out in previous
replies).

For added context, my organizations team and I contribute
to both msdk/qsv and vaapi plugins for ffmpeg and
gstreamer development.  The idea is we want a way to
validate that direct decoder output is an exact bitmatch
across every decoder solution that we contribute
to (to provide a better and more consistent end-user
experience regardless of end-user choice).  But since
ffmpeg auto-inserts this "scaler" and not all scaling
algo's are equal, it poses a challenge to verify.

Regards,
U. Artie



More information about the ffmpeg-devel mailing list