【发布时间】:2021-03-10 13:39:56
【问题描述】:
如果你的字幕文件名为“Hi, y'all.srt”,你如何为 FFmpeg 正确转义?逗号用反斜杠转义,但无论我尝试什么技巧,我都无法让引号起作用!
$ ffmpeg -vf subtitles="Hi\, y\\\'all.srt" -t 1 -f null -
ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 8.1.0 (clang-802.0.42)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.3.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-ffplay --enable-libass --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma --enable-vda
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
[Parsed_subtitles_0 @ 0x7fba7af36080] Shaper: FriBidi 0.19.7 (SIMPLE) HarfBuzz-ng 1.4.8 (COMPLEX)
[Parsed_subtitles_0 @ 0x7fba7af36080] Unable to open Hi, yall.srt
[AVFilterGraph @ 0x7fba7ad05d60] Error initializing filter 'subtitles' with args 'Hi, y\all.srt'
Error reinitializing filters!
Failed to inject frame into filter network: No such file or directory
Error while processing the decoded data for stream #0:0
Conversion failed!
【问题讨论】: