ffmpeg charset
时间: 2023-11-14 21:19:45 浏览: 103
ffmpeg字体设置
3星 · 编辑精心推荐
FFmpeg is a command-line tool for handling multimedia files. It supports a wide range of codecs, formats, and protocols.
When it comes to character encoding, FFmpeg supports a variety of character sets, including ASCII, ISO-8859-1, UTF-8, UTF-16LE, UTF-16BE, and more. You can specify the character encoding using the `-charset` command-line option.
For example, to convert a video file with subtitles encoded in UTF-8 to a different format while preserving the subtitle encoding, you can use the following command:
```
ffmpeg -i input.mp4 -sub_charenc utf8 -i subtitles.srt -c:v copy -c:a copy -c:s mov_text -metadata:s:s:0 language=eng output.mov
```
In this command, the `-sub_charenc utf8` option specifies that the subtitle file is encoded in UTF-8. The `-c:s mov_text` option specifies that the subtitles should be converted to the QuickTime Text format, which supports UTF-8 encoding. The `-metadata:s:s:0 language=eng` option specifies the language of the subtitle track.
阅读全文