[FFmpeg-devel] [PATCH 7/7] lavfi/vf_stack: move to activate design.
John Warburton
john at johnwarburton.net
Sun Aug 6 18:19:28 EEST 2017
On Mon, Jul 17, 2017 at 3:19 PM, Nicolas George <george at nsup.org> wrote:
>
> Signed-off-by: Nicolas George <george at nsup.org>
> ---
> libavfilter/Makefile | 4 ++--
> libavfilter/vf_stack.c | 32 +++++++++++++-------------------
> 2 files changed, 15 insertions(+), 21 deletions(-)
>
>
> Works as expected. Including shortest.
> And no longer subject to bufferqueue overflows.
Gentlemen, I am sorry to report that this particular patch to
lavfi/vf_stack.c breaks FFmpeg on-screen output when a vertical stack
(vstack) follows a horizontal stack (hstack). Below, please find a
chain to -filter_complex, cut down from a much more complex chain,
that reproduces the problem.
FFmpeg here is compiled for Windows using mingw-w64 tool chain on Bash
for Windows. I usually make this up nearly every day without incident.
At commit 4e0e9ce2dc67a94c98d40a46e91fe5aa53ad0376 ("lavfi/framesync2:
implement "activate" design"), the following script downloads an audio
stream, and successfully produces three visual representations using
FFmpeg filters, output to the 'SDL' device. 'opengl' also works.
In this script, the avectorscope and showfreqs filters are
horizontally stacked; then this combination is stacked vertically with
an output from the ebur128 filter.
ffmpeg -v debug -i 'http://s3.yesstreaming.net:7001/;stream/'
-filter_complex "[a0]asplit=3[a][b][c];
[a]avectorscope=size=512x512[z]; [b]showfreqs[y]; [z][y]hstack[n];
[c]ebur128=video=1[d][e]; [d]scale=1536:512[g]; [n][g]vstack;
[e]anullsink" -f SDL Test
But once the patch to lavfi_vf_stack is applied, at commit
0dd8320e16bcdbe6b928e99489cf47abd16d3255, the same script results in a
blank, white display window using the SDL device, and a blank black
window using opengl. The text output from the ebur128 filter stops
after one line. Merely applying a single hstack or vstack works: but
the two together fail after this point:
https://git.ffmpeg.org/gitweb/ffmpeg.git/commit/0dd8320e16bcdbe6b928e99489cf47abd16d3255
("lavfi/vf_stack: move to "activate" design")
Furthermore, compiling from today's git master but reversing ONLY the
above patch to vf_stack.c also results in a working FFmpeg when given
the above test case.
Both debug outputs from the parser are identical:
[Parsed_asplit_0 @ 0000022917a3eb60] Setting 'outputs' to value '3'
[Parsed_avectorscope_1 @ 0000022917a3e9c0] Setting 'size' to value '512x512'
[Parsed_ebur128_4 @ 0000022917a3ec20] Setting 'video' to value '1'
[Parsed_ebur128_4 @ 0000022917a3ec20] EBU +9 scale
[Parsed_scale_5 @ 0000022917a3e820] Setting 'w' to value '1536'
[Parsed_scale_5 @ 0000022917a3e820] Setting 'h' to value '512'
[Parsed_scale_5 @ 0000022917a3e820] w:1536 h:512 flags:'bilinear' interl:0
[graph_0_in_0_0 @ 0000022917a3f2a0] Setting 'time_base' to value '1/44100'
[graph_0_in_0_0 @ 0000022917a3f2a0] Setting 'sample_rate' to value '44100'
[graph_0_in_0_0 @ 0000022917a3f2a0] Setting 'sample_fmt' to value 's16p'
[graph_0_in_0_0 @ 0000022917a3f2a0] Setting 'channel_layout' to value '0x3'
[graph_0_in_0_0 @ 0000022917a3f2a0] tb:1/44100 samplefmt:s16p
samplerate:44100 chlayout:0x3
[Parsed_avectorscope_1 @ 0000022917a3e9c0] auto-inserting filter
'auto_resampler_0' between the filter 'Parsed_asplit_0' and the filter
'Parsed_avectorscope_1'
[Parsed_showfreqs_2 @ 0000022917a3e740] auto-inserting filter
'auto_resampler_1' between the filter 'Parsed_asplit_0' and the filter
'Parsed_showfreqs_2'
[Parsed_ebur128_4 @ 0000022917a3ec20] auto-inserting filter
'auto_resampler_2' between the filter 'Parsed_asplit_0' and the filter
'Parsed_ebur128_4'
[AVFilterGraph @ 0000022917a3d540] query_formats: 10 queried, 12
merged, 9 already done, 0 delayed
[auto_resampler_0 @ 0000022917a3e8e0] picking s16 out of 2 ref:s16p
[auto_resampler_2 @ 0000022917a3f440] [SWR @ 0000022917f34f80] Using
fltp internally between filters
[auto_resampler_2 @ 0000022917a3f440] ch:2 chl:stereo fmt:s16p
r:44100Hz -> ch:2 chl:stereo fmt:dbl r:48000Hz
[auto_resampler_0 @ 0000022917a3e8e0] [SWR @ 0000022917a894c0] Using
s16p internally between filters
[auto_resampler_0 @ 0000022917a3e8e0] ch:2 chl:stereo fmt:s16p
r:44100Hz -> ch:2 chl:stereo fmt:s16 r:44100Hz
[auto_resampler_1 @ 0000022917a3ea80] [SWR @ 0000022917f1ffc0] Using
s16p internally between filters
[auto_resampler_1 @ 0000022917a3ea80] ch:2 chl:stereo fmt:s16p
r:44100Hz -> ch:2 chl:stereo fmt:fltp r:44100Hz
[Parsed_hstack_3 @ 0000022917a3f1e0] [framesync @ 0000022917a2e608]
Selected 1/44100 time base
[Parsed_hstack_3 @ 0000022917a3f1e0] [framesync @ 0000022917a2e608] Sync level 1
[swscaler @ 0000022918081100] Forcing full internal H chroma due to
input having non subsampled chroma
[Parsed_scale_5 @ 0000022917a3e820] w:640 h:480 fmt:rgb24 sar:1/1 ->
w:1536 h:512 fmt:rgba sar:4/9 flags:0x2
[Parsed_vstack_6 @ 0000022917a3ed00] [framesync @ 00000229177dd5c8]
Selected 1/1000000 time base
[Parsed_vstack_6 @ 0000022917a3ed00] [framesync @ 00000229177dd5c8] Sync level 1
[sdl,sdl2 @ 0000022917a4df40] w:1536 h:1024 fmt:rgba -> w:1536 h:1024
I hope this information might be helpful to you.
Kind regards,
JW
More information about the ffmpeg-devel
mailing list