ffmpeg和硬编码字幕

时间:2015-04-08 13:09:04

标签: ffmpeg

我有一个像这样的命令

ffmpeg -i "F:\Filebotted\Rail Wars\Season 1\Rail Wars.S01E07(7).You Look Good in That. 1080p.mkv" -map 0:0 -map 0:1 -b:v 750k -b:a 128k -c:v libx264 -c:a mp3 -ac 2 -filter_complex "subtitles=F:\Filebotted\Rail Wars\Season 1\Rail Wars.S01E07(7).You Look Good in That. 1080p.mkv,scale=-1:360" "C:\Users\Adin\Desktop\Testy mc test\Rail Wars.S01E07(7).You Look Good in That. 1080p.mkv"

是的,这很长但不幸的是ffmpeg chucks hissy fits吐出以下

[subtitles @ 00000000050ce7c0] Unable to parse option value "FilebottedRail Wars
Season 1Rail Wars.S01E07(7).You Look Good in That. 1080p.mkv" as image size
    Last message repeated 1 times
[subtitles @ 00000000050ce7c0] Error setting option original_size to value Fileb
ottedRail WarsSeason 1Rail Wars.S01E07(7).You Look Good in That. 1080p.mkv.
[Parsed_subtitles_0 @ 0000000002c714c0] Error applying options to the filter.
[AVFilterGraph @ 0000000002c5c540] Error initializing filter 'subtitles' with ar
gs 'F:FilebottedRail WarsSeason 1Rail Wars.S01E07(7).You Look Good in That. 1080
p.mkv'
Error configuring filters.

当文件与ffmpeg在同一个文件夹中时,它工作正常(我发现它不喜欢'或 - 在文件名中,但我只花了一个小时试图找出问题但没有用。

任何帮助将不胜感激:)

1 个答案:

答案 0 :(得分:4)

'\:是FFmpeg使用的特殊转义字符。

如果要将它们包含在值中,则需要引用/转义它们。

您可以尝试:

-filter_complex "subtitles='F\:/Filebotted/Rail Wars/Season 1/Rail Wars.S01E07(7).You Look Good in That. 1080p.mkv',scale=-1:360"