Opened 18 months ago
Closed 18 months ago
#10073 closed defect (invalid)
xstack stretches inputs vertically in some situations
Reported by: | hans.baldzuhn | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | ffmpeg |
Version: | unspecified | Keywords: | xstack |
Cc: | hans.baldzuhn | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description (last modified by )
Summary of the bug:
I'm on windows, with the lastest build from https://github.com/BtbN/FFmpeg-Builds/releases
I want yo layout some images in a bigger image
If no image touches the bottom of the layout, the picture is stretched to touch it.
How to reproduce:
I'm assembling a simple checker in a 3x6 xtack layout
Command with 2 items on top line and 1 in midle line
ffmpeg -y -i C:\Users\hbaldzuhn\Pictures\checker.png -i "C:\Users\hbaldzuhn\Pictures\checker.png" -i "C:\Users\hbaldzuhn\Pictures\checker.png" -filter_complex "[0:v]scale=64:64[v0];[1:v]scale=64:64[v1];[2:v]scale=64:64[v2];[v0][v1][v2]xstack=inputs=3:fill=black:layout=64_64|64_0|320_0" -s 384x192 "C:\Users\hbaldzuhn\Pictures\checker.assembly1.png"
Command with all checker on top line
ffmpeg -y -i C:\Users\hbaldzuhn\Pictures\checker.png -i "C:\Users\hbaldzuhn\Pictures\checker.png" -filter_complex "[0:v]scale=64:64[v0];[1:v]scale=64:64[v1];[v0][v1]xstack=inputs=2:fill=black:layout=64_0|320_0" -s 384x192 "C:\Users\hbaldzuhn\Pictures\checker.assembly2.png"
Command with items on each lines
ffmpeg -y -i C:\Users\hbaldzuhn\Pictures\checker.png -i "C:\Users\hbaldzuhn\Pictures\checker.png" -i "C:\Users\hbaldzuhn\Pictures\checker.png" -i "C:\Users\hbaldzuhn\Pictures\checker.png" -filter_complex "[0:v]scale=64:64[v0];[1:v]scale=64:64[v1];[2:v]scale=64:64[v2];[3:v]scale=64:64[v3];[v0][v1][v2][v3]xstack=inputs=4:fill=black:layout=64_64|64_0|320_0|128_128" -s 384x192 "C:\Users\hbaldzuhn\Pictures\checker.assembly3.png"
Full command and log
ffmpeg.exe -y -i C:\Users\hbaldzuhn\Pictures\checker.png -i "C:\Users\hbaldzuhn\Pictures\checker.png" -i "C:\Users\hbaldzuhn\Pictures\checker.png" -filter_complex "[0:v]scale=64:64[v0];[1:v]scale=64:64[v1];[2:v]scale=64:64[v2];[v0][v1][v2]xstack=inputs=3:fill=black:layout=64_64|64_0|320_0" -s 384x192 "C:\Users\hbaldzuhn\Pictures\checker.assembly1.png" ffmpeg version N-109226-g2ad199ae31-20221125 Copyright (c) 2000-2022 the FFmpeg developers built with gcc 12.2.0 (crosstool-NG 1.25.0.90_cf9beb1) configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 --target-os=mingw32 --enable-gpl --enable-version3 --disable-debug --disable-w32threads --enable-pthreads --enable-iconv --enable-libxml2 --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-lzma --enable-fontconfig --enable-libvorbis --enable-opencl --disable-libpulse --enable-libvmaf --disable-libxcb --disable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --disable-libmfx --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --enable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --disable-libdrm --disable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-ldflags=-pthread --extra-ldexeflags= --extra-libs=-lgomp --extra-version=20221125 libavutil 57. 43.100 / 57. 43.100 libavcodec 59. 54.100 / 59. 54.100 libavformat 59. 34.102 / 59. 34.102 libavdevice 59. 8.101 / 59. 8.101 libavfilter 8. 50.101 / 8. 50.101 libswscale 6. 8.112 / 6. 8.112 libswresample 4. 9.100 / 4. 9.100 libpostproc 56. 7.100 / 56. 7.100 Input #0, png_pipe, from 'C:\Users\hbaldzuhn\Pictures\checker.png': Duration: N/A, bitrate: N/A Stream #0:0: Video: png, rgba(pc), 240x240 [SAR 3780:3780 DAR 1:1], 25 fps, 25 tbr, 25 tbn Input #1, png_pipe, from 'C:\Users\hbaldzuhn\Pictures\checker.png': Duration: N/A, bitrate: N/A Stream #1:0: Video: png, rgba(pc), 240x240 [SAR 3780:3780 DAR 1:1], 25 fps, 25 tbr, 25 tbn Input #2, png_pipe, from 'C:\Users\hbaldzuhn\Pictures\checker.png': Duration: N/A, bitrate: N/A Stream #2:0: Video: png, rgba(pc), 240x240 [SAR 3780:3780 DAR 1:1], 25 fps, 25 tbr, 25 tbn Stream mapping: Stream #0:0 (png) -> scale:default Stream #1:0 (png) -> scale:default Stream #2:0 (png) -> scale:default xstack:default -> Stream #0:0 (png) Press [q] to stop, [?] for help Output #0, image2, to 'C:\Users\hbaldzuhn\Pictures\checker.assembly1.png': Metadata: encoder : Lavf59.34.102 Stream #0:0: Video: png, rgba(pc, gbr/unknown/unknown, progressive), 384x192 [SAR 3:2 DAR 3:1], q=2-31, 200 kb/s, 25 fps, 25 tbn Metadata: encoder : Lavc59.54.100 png [image2 @ 0000026068f376c0] The specified filename 'C:\Users\hbaldzuhn\Pictures\checker.assembly1.png' does not contain an image sequence pattern or a pattern is invalid. [image2 @ 0000026068f376c0] Use a pattern such as %03d for an image sequence or use the -update option (with -frames:v 1 if needed) to write a single image. frame= 1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.00 bitrate=N/A speed= 0x video:3kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.
Attachments (4)
Change History (6)
by , 18 months ago
Attachment: | checker.png added |
---|
by , 18 months ago
Attachment: | checker.assembly1.png added |
---|
by , 18 months ago
Attachment: | checker.assembly2.png added |
---|
by , 18 months ago
Attachment: | checker.assembly3.png added |
---|
comment:1 by , 18 months ago
Description: | modified (diff) |
---|
comment:2 by , 18 months ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
This bug report is invalid.
xstack never stretches anything, it just does copy.
Your command that produces stretcher output is caused by additional scale filter. The xstack filter never does padding to imaginary size, so use pad filter for that instead of -s WidthxHeight at end.
Source checker