arthenica / ffmpeg-kit

FFmpeg Kit for applications. Supports Android, Flutter, iOS, Linux, macOS, React Native and tvOS. Supersedes MobileFFmpeg, flutter_ffmpeg and react-native-ffmpeg.
https://arthenica.github.io/ffmpeg-kit
GNU Lesser General Public License v3.0
4.55k stars 605 forks source link

No such filter: 'transpose=2' #981

Closed equationl closed 6 months ago

equationl commented 6 months ago

Description Run filter cmd get a error: No such filter: 'transpose=2'

Expected behavior I just want use transpose filter to rotation video.

Current behavior It can't run transpose filter

To Reproduce

My command:

-y -ss 0ms -t 4667ms -i test.mp4 -vf 'transpose=2' test.gif

When I run it by :

var cmd = ["-y", "-ss", "0ms", "-t", "4667ms", "-i", "xxx/test.mp4", "-vf", "'transpose=2'", "xxx/test.gif"];
FFmpegKit.executeWithArgumentsAsync(cmd);

I got a error:

No such filter: 'transpose=2

I aready try this cmd by another ffmpeg excuteable on windows, it work well;

 ffmpeg.exe -y -ss 0ms -t 4667ms -i C:\Users\DELL\Desktop\1.mp4 -vf 'transpose=2,transpose=2' C:\Users\DELL\Desktop\1.gif
ffmpeg version N-111773-g8f7850a22e-20230816 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 13.1.0 (crosstool-NG 1.25.0.196_227d99d)
  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 --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=20230816
  libavutil      58. 16.101 / 58. 16.101
  libavcodec     60. 23.100 / 60. 23.100
  libavformat    60. 10.100 / 60. 10.100
  libavdevice    60.  2.101 / 60.  2.101
  libavfilter     9. 11.100 /  9. 11.100
  libswscale      7.  3.100 /  7.  3.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 00000168b1533e00] All samples in data stream index:id [1:2] have zero duration, stream set to be discarded by default. Override using AVStream->discard or -discard for ffmpeg command.
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\DELL\Desktop\1.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    creation_time   : 2024-05-14T02:20:54.000000Z
    com.android.version: 11
  Duration: 00:00:04.79, start: 0.000000, bitrate: 11206 kb/s
  Stream #0:0[0x1](eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 720x1280, 11190 kb/s, SAR 1:1 DAR 9:16, 57.39 fps, 132 tbr, 90k tbn (default)
    Metadata:
      creation_time   : 2024-05-14T02:20:54.000000Z
      handler_name    : VideoHandle
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](eng): Data: none (mett / 0x7474656D) (default)
    Metadata:
      creation_time   : 2024-05-14T02:20:54.000000Z
      handler_name    : MetadHandle
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> gif (native))
Press [q] to stop, [?] for help
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e38d40] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e48180] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e57600] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e66a40] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e75ec0] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e85300] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e94780] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6ea3bc0] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6eb3040] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6ec2480] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6ed1900] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6ee0d40] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6ef01c0] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6eff600] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6f0ea80] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6f1dec0] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e38d40] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e45d00] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e52d00] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e62140] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e715c0] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e80a00] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e8fe80] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e9f2c0] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6eae740] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6ebdb80] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6ecd000] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6edc440] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6eeb8c0] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6efad00] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6f0a180] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6f195c0] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e38d40] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e45d00] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e52d00] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e62140] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e715c0] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e80a00] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e8fe80] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e9f2c0] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6eae740] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6ebdb80] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6ecd000] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6edc440] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6eeb8c0] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6efad00] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6f0a180] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6f195c0] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e38d40] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e45d00] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e52d00] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e62140] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e715c0] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e80a00] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e8fe80] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6e9f2c0] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6eae740] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6ebdb80] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6ecd000] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6edc440] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6eeb8c0] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6efad00] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6f0a180] No accelerated colorspace conversion found from yuv420p to bgr8.
[swscaler @ 00000168b6e1ea40] [swscaler @ 00000168b6f195c0] No accelerated colorspace conversion found from yuv420p to bgr8.
Output #0, gif, to 'C:\Users\DELL\Desktop\1.gif':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: isommp42
    com.android.version: 11
    encoder         : Lavf60.10.100
  Stream #0:0(eng): Video: gif, bgr8(pc, gbr/bt709/bt709, progressive), 720x1280 [SAR 1:1 DAR 9:16], q=2-31, 200 kb/s, 66 fps, 100 tbn (default)
    Metadata:
      creation_time   : 2024-05-14T02:20:54.000000Z
      handler_name    : VideoHandle
      vendor_id       : [0][0][0][0]
      encoder         : Lavc60.23.100 gif
[out#0/gif @ 00000168b15140c0] video:6986kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000280%
frame=  267 fps=228 q=-0.0 Lsize=    6986kB time=00:00:04.65 bitrate=12303.2kbits/s speed=3.97x

Logs

Press [q] to stop, [?] for help
[AVFilterGraph @ 0xb400007171db6460] No such filter: 'transpose=2'
Error reinitializing filters!
Failed to inject frame into filter network: Filter not found
Error while processing the decoded data for stream #0:0
Conversion failed!

Environment

equationl commented 6 months ago

After try again, I found that using FFmpegKit.executeWithArgumentsAsync(cmdList) with cmd which is list will get No such filter: 'transpose=2' error.

But same cmd, I just replace to FFmpegKit.executeAsync(cmdString) it will work well.

equationl commented 6 months ago

Finally, I knows what happen about it.

If using FFmpegKit.executeWithArgumentsAsync(cmdList), any quote in list is unnecessary.

So, just edit from:

    var cmd = [
      "-y", 
      "-ss", 
      "0ms", 
      "-t",
      "4667ms", 
      "-i", 
      "xxx/test.mp4", 
      "-vf", 
-      "'transpose=2'", 
      "xxx/test.gif",
    ];
    FFmpegKit.executeWithArgumentsAsync(cmd);

To:

    var cmd = [
      "-y", 
      "-ss", 
      "0ms", 
      "-t",
      "4667ms", 
      "-i", 
      "xxx/test.mp4", 
      "-vf", 
+      "transpose=2", 
      "xxx/test.gif",
    ];
    FFmpegKit.executeWithArgumentsAsync(cmd);

It will work.

farid-itpath commented 6 months ago

Try to add to add full-gpl package. It worked for me when I was trying to use eq filter

Go through the documentation, you will find the steps.

equationl commented 6 months ago

@farid-itpath Check my code, I using package ffmpeg_kit_flutter_full_gpl: 6.0.3, this issue not cause package.