[FFmpeg-devel] [PATCH 0/9] Merge lazy filter initialization in ffmpeg CLI

wm4 nfxjfg at googlemail.com
Fri Feb 10 15:06:17 EET 2017

On Fri, 10 Feb 2017 13:55:39 +0100
Timo Rothenpieler <timo at rothenpieler.org> wrote:

> Am 10.02.2017 um 13:35 schrieb wm4:
> > These patches merge the previously skipped Libav commits, which made
> > avconv lazily initialize libavfilter graphs. This means the filters
> > are initialized with the actual output format, instead of whatever
> > libavformat reports.
> > 
> > It's a prerequisite to making hardware decoding support saner, as
> > hardware decoders will output a different pixfmt than the software
> > format reported by libavformat. This can be seen on ffmpeg_qsv.c,
> > which doesn't lose any functionality, even though half of the code
> > is removed.
> > 
> > There are some differences in how ffmpeg.c and avconv.c filter-flow
> > works. Also, avconv.c doesn't have sub2video. Relatively intrusive
> > changes were required.
> > 
> > The status of cuvid is unknown, but work in progress.  
> cuvid itself works. A chain with h264_cuvid -> hwdownload,format=nv12 ->
> libx264/nvenc works fine.
> Nvenc by itself also still works as usual.
> It's just that for some unknown reason direct hw transcoding from
> h264_cuvid to nvenc results in nvenc reporting an out of memory error
> when encoding the first frame.
> I went through all variables I could think of by now, and everything
> seems to be in order. So current idea is that nvenc doesn't like being
> initialized after cuvid, which doesn't really make sense, but I'll keep
> investigating.

I want to add that the same with qsv works just fine, which makes this
even more strange.

I'd argue for fixing this "later" after the merge.

More information about the ffmpeg-devel mailing list