Я использую один и тот же ffmpeg cmd в Windows и centOS для добавления временного кода для входного видео, выходное видео в centOS имеет низкую четкость и мозаику.
версия ffmpeg:
ffmpeg on Windows: 4.1.3 built with gcc 8.3.1 (gcc) 20190414
ffmpeg on centOS: 4.1.0 built with gcc 5.8.5(gcc) 20150623 (Red Hat 4.8.5-16)
ffmpeg cmd:
ffmpeg -i \input.mp4 -vf drawtext="timecode='00\:00\:00\:00':rate=30:x=10:y=10:text=qwer:fontsize=50:fontcolor=yellow:boxcolor=black" \output.mp4
Скриншот видео:
вывод видео на Windows
вывод видео на CentOS
полный вход в CentOS:
[root@3b8e5c174983 installfile]# ls
ffmpeg-4.1.3 ffmpeg-4.1.3.tar.gz input.mp4 yasm-1.3.0 yasm-1.3.0.tar.gz
[root@3b8e5c174983 installfile]# ffmpeg -i /installfile/input.mp4 -vf drawtext="fontfile=/usr/share/fonts/lyx/simhei.ttf:timecode='00\:00\:00\:00':rate=30:x=10:y=10:text=qwer:fontsize=50:fontcolor=black" /installfile/output.mp4
ffmpeg version 4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-16)
configuration: --enable-libfreetype
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/installfile/input.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf57.25.100
Duration: 00:00:25.68, start: 0.000000, bitrate: 3620 kb/s
Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, smpte170m/bt709/bt709), 1920x1080, 3490 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
Metadata:
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
Metadata:
handler_name : SoundHandler
Stream mapping:
Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
Stream #0:1 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
Output #0, mp4, to '/installfile/output.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf58.20.100
Stream #0:0(und): Video: mpeg4 (mp4v / 0x7634706D), yuv420p, 1920x1080, q=2-31, 200 kb/s, 30 fps, 15360 tbn, 30 tbc (default)
Metadata:
handler_name : VideoHandler
encoder : Lavc58.35.100 mpeg4
Side data:
cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata:
handler_name : SoundHandler
encoder : Lavc58.35.100 aac
frame= 769 fps=108 q=31.0 Lsize= 10290kB time=00:00:25.70 bitrate=3279.4kbits/s speed=3.62x
video:9870kB audio:397kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.222400%
[aac @ 0x37dbec0] Qavg: 2346.057
[root@3b8e5c174983 installfile]#
это о версии ffmpeg?