A posição das legendas FFmpeg está errada

0

Estou tentando incluir legendas em meus codificadores ffmpeg x264. Eu estou tentando srt e sub estação alfa. As legendas são incluídas no mkv codificado, no entanto, sua posição está toda errada. Eles apenas se acumulam um sobre o outro até o topo da tela e, em seguida, começam novamente. Não é assim que eles são exibidos no arquivo .TS, que é a fonte de entrada. No arquivo .TS, eles exibem 1 por vez. Aqui está uma saída do console

root@server1:~# ffmpeg -i 'bbctwo.ts'
ffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.10) 20160609
configuration: --prefix=/home/ffmpeg/ --pkg-config-flags=--static --extra-cflags=-I/home/ffmpeg/include --extra-ldflags=-L/home/ffmpeg/lib --extra-libs='-lpthread -lm -lz' --extra-ldexeflags=-static --bindir=/home/ffmpeg/bin --enable-pic --enable-ffplay --enable-fontconfig --enable-frei0r --enable-gpl --enable-version3 --enable-libass --enable-libfribidi --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzimg --enable-libzvbi --enable-nonfree --enable-openssl
libavutil      56. 14.100 / 56. 14.100
libavcodec     58. 18.100 / 58. 18.100
libavformat    58. 12.100 / 58. 12.100
libavdevice    58.  3.100 / 58.  3.100
libavfilter     7. 16.100 /  7. 16.100
libswscale      5.  1.100 /  5.  1.100
libswresample   3.  1.100 /  3.  1.100
libpostproc    55.  1.100 / 55.  1.100
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] SPS unavailable in decode_picture_timing
[h264 @ 0x52c2340] non-existing PPS 0 referenced
[h264 @ 0x52c2340] decode_slice_header error
[h264 @ 0x52c2340] no frame!
[h264 @ 0x52c2340] mmco: unref short failure
[h264 @ 0x52c2340] Increasing reorder buffer to 3
[mpegts @ 0x52bd880] PES packet size mismatch
Last message repeated 1 times
Input #0, mpegts, from 'bbctwo.ts':
Duration: 00:36:20.66, start: 76575.399733, bitrate: 4282 kb/s
Program 6960 
Stream #0:0[0x157c]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
Stream #0:1[0x157d](eng): Audio: ac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 192 kb/s
Stream #0:2[0x157f](eng,eng): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
Stream #0:3[0x157e](NAR): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, fltp, 256 kb/s
At least one output file must be specified
root@server1:~# 

A julgar por isso, parece que o ffmpeg sabe que a posição das legendas na fonte é de 492x250.

Eu passei algumas horas pesquisando e tentando coisas diferentes para tentar fazer isso funcionar. Chegou a hora de fazer uma pergunta! Alguma idéia do que estou fazendo errado ou porque não está funcionando corretamente?

A linha de comando do ffmpeg que estou usando é:

ffmpeg -txt_format text -i '/bbctwo.ts' -c: v libx264 -vf yadif = 0 -preset lento -crf 23 -level 4.1 -c: uma cópia -map 0 -c: s srt / video2. mkv

    
por Alex 21.09.2018 / 02:03

0 respostas

Tags