FFMPEG:解析过滤链字幕时出错

FFMPEG:解析过滤链字幕时出错

我已经从源代码构建了 ffmpeg 以允许在 Google Colab 上使用 GPU,代码如下:

!apt install nvidia-driver-525
!apt install nvidia-cuda-toolkit
!mkdir ~/nvidia/
%cd ~/nvidia/
!git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
%cd nv-codec-headers
!make install
%cd ~/nvidia/
!git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg/
!apt install build-essential yasm cmake libtool libc6 libc6-dev unzip wget libnuma1 libnuma-dev
%cd ~/nvidia/ffmpeg/

!./configure --enable-libharfbuzz --enable-libfreetype --enable-nonfree --enable-cuda-nvcc --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64  --enable-libfreetype
!make -j $(nproc)

!ls -l ffmpeg
!./ffmpeg
!sudo make install

!ls -l /usr/local/bin/ffmpeg
!type -a ffmpeg
!echo "$PATH"
!export PATH=$PATH:/usr/local/bin
!echo "$PATH"
%cd /content

但是我的脚本在执行这个命令时失败了:

!ffmpeg -y -i input.mp4 -vf "subtitles=subtitles.srt" output.mp4

错误:

[AVFilterGraph @ 0x56b3d2653600] No option name near 'subtitles.srt'
[AVFilterGraph @ 0x56b3d2653600] Error parsing a filter description around: 
[AVFilterGraph @ 0x56b3d2653600] Error parsing filterchain 'subtitles=subtitles.srt' around: 
[vost#0:0/mpeg4 @ 0x56b3d26f71c0] Error initializing a simple filtergraph
Error opening output file output.mp4.
Error opening output files: Invalid argument

知道为什么吗?

相关内容