[FFmpeg-user] Is it possible to use `ih` and `iw` constants in the `select` filter?
Alexey Rodionov
fluorescent.hallucinogen at gmail.com
Thu Jul 6 22:24:56 EEST 2023
Anyone know the answer?
> Is it possible to use `ih` and `iw` constants in the `select` filter?
> Something like that:
>
> ffmpeg -i input.mp4 -vf select='gt(ih\,1080)',scale=-2:1080 output.mp4
>
> If not, are there any plans to implement this?
>
> I get the following error:
>
> ffmpeg version 2023-06-15-git-41229ef705-full_build Copyright (c)
> 2000-2023 the FFmpeg developers
> built with gcc 12.2.0 (Rev10, Built by MSYS2 project)
> configuration: --enable-gpl --enable-version3 --enable-static
> --disable-w32threads --disable-autodetect --enable-fontconfig
> --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp
> --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib
> --enable-librist --enable-libsrt --enable-libssh --enable-libzmq
> --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2
> --enable-libaribb24 --enable-libaribcaption --enable-libdav1d
> --enable-libdavs2 --enable-libuavs3d --enable-libzvbi
> --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264
> --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom
> --enable-libjxl --enable-libopenjpeg --enable-libvpx
> --enable-mediafoundation --enable-libass --enable-frei0r
> --enable-libfreetype --enable-libfribidi --enable-liblensfun
> --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf
> --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec
> --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libvpl
> --enable-libshaderc --enable-vulkan --enable-libplacebo
> --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug
> --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame
> --enable-libshine --enable-libtheora --enable-libtwolame
> --enable-libvo-amrwbenc --enable-libcodec2 --enable-libilbc
> --enable-libgsm --enable-libopencore-amrnb --enable-libopus
> --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b
> --enable-libflite --enable-libmysofa --enable-librubberband
> --enable-libsoxr --enable-chromaprint
> libavutil 58. 13.100 / 58. 13.100
> libavcodec 60. 18.100 / 60. 18.100
> libavformat 60. 6.100 / 60. 6.100
> libavdevice 60. 2.100 / 60. 2.100
> libavfilter 9. 8.101 / 9. 8.101
> libswscale 7. 3.100 / 7. 3.100
> libswresample 4. 11.100 / 4. 11.100
> libpostproc 57. 2.100 / 57. 2.100
> Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4':
> Metadata:
> major_brand : dash
> minor_version : 0
> compatible_brands: iso6avc1mp41
> creation_time : 2023-01-30T09:32:47.000000Z
> Duration: 00:00:39.22, start: 0.000000, bitrate: 4931 kb/s
> Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661),
> yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 619
> kb/s, 59.94 fps, 59.94 tbr, 60k tbn (default)
> Metadata:
> creation_time : 2023-01-30T09:32:47.000000Z
> handler_name : ISO Media file produced by Google Inc.
> vendor_id : [0][0][0][0]
> [Parsed_select_0 @ 00000196cee7f500] [Eval @ 00000087f25fe3d0]
> Undefined constant or missing '(' in 'ih,1080)'
> [Parsed_select_0 @ 00000196cee7f500] Error while parsing expression
> 'gt(ih,1080)'
> [AVFilterGraph @ 00000196cee7f440] Error initializing filters
> Invalid argument
More information about the ffmpeg-user
mailing list