转换字幕

从srt转换出ass字幕文件

  1. ffmpeg -i subtitle.srt subtitle.ass

举例:

  1. ffmpeg_edit_subtitle ffmpeg -i subtitle.srt subtitle.ass
  2. ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
  3. built with Apple LLVM version 9.0.0 (clang-900.0.39.2)
  4. configuration: --prefix=/usr/local/Cellar/ffmpeg/3.4.2 --enable-shared --enable-pthreads --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --disable-jack --enable-gpl --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --enable-videotoolbox --disable-lzma
  5. libavutil 55. 78.100 / 55. 78.100
  6. libavcodec 57.107.100 / 57.107.100
  7. libavformat 57. 83.100 / 57. 83.100
  8. libavdevice 57. 10.100 / 57. 10.100
  9. libavfilter 6.107.100 / 6.107.100
  10. libavresample 3. 7. 0 / 3. 7. 0
  11. libswscale 4. 8.100 / 4. 8.100
  12. libswresample 2. 9.100 / 2. 9.100
  13. libpostproc 54. 7.100 / 54. 7.100
  14. Input #0, srt, from 'subtitle.srt':
  15. Duration: N/A, bitrate: N/A
  16. Stream #0:0: Subtitle: subrip
  17. Output #0, ass, to 'subtitle.ass':
  18. Metadata:
  19. encoder : Lavf57.83.100
  20. Stream #0:0: Subtitle: ass (ssa)
  21. Metadata:
  22. encoder : Lavc57.107.100 ssa
  23. Stream mapping:
  24. Stream #0:0 -> #0:0 (subrip (srt) -> ass (ssa))
  25. Press [q] to stop, [?] for help
  26. size= 33kB time=00:26:17.56 bitrate= 0.2kbits/s speed=3.6e+05x
  27. video:0kB audio:0kB subtitle:23kB other streams:0kB global headers:1kB muxing overhead: 42.551056%