使用ffmpeg推流:
ffmpeg -i dy.mp4 -vcodec libx264 -acodec aac -f flv rtmp://test.domain/live/test
出现如下报错:
Unknown encoder 'libx264'
ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-28)
configuration: --prefix=/usr/local/ffmpeg
libavutil 55. 78.100 / 55. 78.100
libavcodec 57.107.100 / 57.107.100
libavformat 57. 83.100 / 57. 83.100
libavdevice 57. 10.100 / 57. 10.100
libavfilter 6.107.100 / 6.107.100
libswscale 4. 8.100 / 4. 8.100
libswresample 2. 9.100 / 2. 9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'dy.mp4':
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42avc1
creation_time : 2018-10-08T12:59:18.000000Z
Duration: 00:43:13.80, start: 0.000000, bitrate: 1090 kb/s
Stream #0:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv), 1280x720 [SAR 1:1 DAR 16:9], 1025 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc (default)
Metadata:
creation_time : 2018-10-08T12:59:18.000000Z
handler_name : VideoHandler
Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 61 kb/s (default)
Metadata:
creation_time : 2018-10-08T12:59:18.000000Z
handler_name : SoundHandler
Unknown encoder 'libx264'