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

知道為什麼嗎?

相關內容