Имея следующее видео MediaInfo
General
Complete name : r.avi
Format : AVI
Format/Info : Audio Video Interleave
File size : 8.51 MiB
Duration : 1 min 0 s
Overall bit rate : 1 189 kb/s
Movie name : Ralph Breaks the Internet 4K
Writing application : Lavf57.71.100
Video
ID : 0
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.2
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : H264
Duration : 59 s 977 ms
Bit rate : 1 010 kb/s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Variable
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.020
Stream size : 7.22 MiB (85%)
Title : @NAHOM
Writing library : x264 core 148 r2795 aaa9aa8
Encoding settings : cabac=1 / ref=4 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=8 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=12 / lookahead_threads=2 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=3 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=50 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Audio
ID : 1
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : FF-2
Duration : 1 min 0 s
Bit rate : 160 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 1.18 MiB (14%)
Alignment : Split accross interleaves
Interleave, duration : 21 ms (0.51 video frame)
Interleave, preload duration : 750 ms
Я пытаюсь добавить softtsub с помощью команды ffmpeg
ffmpeg -y -i test1/r.avi -c:v libx264 -map v:0 -map a:0 -map 1 r.avi
Но я получаю следующую ошибку:
[avi @ 0x55d2e8c30d20] Subtitle streams other than DivX XSUB is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented.
Could not write header for output file #0 (incorrect codec parameters ?): Not yet implemented in FFmpeg, patches welcome
Error initializing output stream 0:0 --
[libmp3lame @ 0x55d2e8c394c0] 4 frames left in the queue on closing
[ 116] Любая идея, что я делаю не так
Та же ошибка (не реализованы потоки субтитров, отличные от DivX XSUB...) также возникает при попытке добавить субтитры SRT(subrip) в контейнер AVI.
1) Преобразование AVI в контейнер MKV без перекодирования:
ffmpeg -fflags +genpts -i input.avi -c:v copy -c:a copy output.mkv
2) Добавьте подзаголовок к контейнеру mkv («output.mkv» на предыдущем шаге). Например:
ffmpeg -i output.mkv -i input.srt -c copy -c:s srt "output-sub.eng.mkv"