TypesettingTools / Aegisub-Motion

Lua plugin for Aegisub auto4 that parses motion tracking data and applies it to selected subtitles.
Other
172 stars 23 forks source link

trim not recognizing crf option in ffmpeg #60

Closed isrealityreallyreal closed 2 years ago

isrealityreallyreal commented 2 years ago

[Disclaimer: I see that there are several open issues related to trim right now. At first glance my issue appears unrelated to any of those, though I may be mistaken.]

When I try to trim a line using ffmpeg it fails with the following output:

Encoding error:
ffmpeg version n5.0 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 11.2.0 (GCC)
  configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg --enable-nvdec --enable-nvenc --enable-shared --enable-version3
  libavutil      57. 17.100 / 57. 17.100
  libavcodec     59. 18.100 / 59. 18.100
  libavformat    59. 16.100 / 59. 16.100
  libavdevice    59.  4.100 / 59.  4.100
  libavfilter     8. 24.100 /  8. 24.100
  libswscale      6.  4.100 /  6.  4.100
  libswresample   4.  3.100 /  4.  3.100
  libpostproc    56.  3.100 / 56.  3.100
Unrecognized option '-crf'.
Error splitting the argument list: Option not found
If there is no log before this, your encoder is not a working executable or your encoding command is invalid.

I looked up the unrecognized option '-crf' part, which led me to this answer suggesting that the problem derives from ffmpeg not being compiled with the --enable-gpl and --enable-libx264 options, but as you can see in the above output, it does include those options, so I'm not sure what's going on here.

I am using the typesetting tools fork of Aegisub, commit 9266-master-f21d8a360 if the title bar is to be believed. I installed Aegisub-Motion through Dependency Control. Looks like it's at version 1.0.9.

Any help is appreciated.

isrealityreallyreal commented 2 years ago

It's also worth noting that when I use ffmpeg outside of Aegisub, the -crf option works fine.

isrealityreallyreal commented 2 years ago

So... the issue went away when I went to Trim Settings and changed the encoder from x264 to ffmpeg. I could have sworn I had already done that when first prompted but maybe it didn't save the setting properly.

Previously, Aegisub had crashed when I clicked the Encoder button (in Trim Settings), so I had already hard coded the path to the ffmpeg executable in aegisub-motion.json prior to attempting any trim. Considering that the Encoder was actually set to x264 but with the path to ffmpeg, I understand why something went wrong, but it still baffles me how this could produce the error message I got.

Since this is no longer affecting me, I'll go ahead and close the issue.