我正在将 udp 输入转码为 mpegts udp 输出。几个小时后,ffmpeg 用完了所有 RAM 内存。我不知道问题出在哪里。
命令:
ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -i "udp://239.100.1.5:1234?fifo_size=1000000&overrun_nonfatal=1" -map i:0x100 -map i:0x101 -vf 'scale_vaapi=w=720:h=576,hwdownload,format=nv12,fps=25' -c:v mpeg2video -b:v 5000k -minrate 5000k -maxrate 5000k -muxrate 7000k -pcr_period 40 -flags:v +ildct+ilme -top 0 -aspect 16:9 -c:a mp2 -b:a 192k -c:s copy -mpegts_service_id 1 -metadata service_name="Transcoded" -metadata service_provider="HD to SD" -f mpegts "udp://239.120.1.2:7006?pkt_size=1316&bitrate=12000000"
日志:
Stream #0:0: Video: mpeg2video (Main), yuv420p(tv, bt709, bottom first), 720x576 [SAR 64:45 DAR 16:9], q=2-31, 5000 kb/s, 25 fps, 90k tbn2022-08-23 13:27:04,291
元数据:
encoder : Lavc59.39.100 mpeg2video
侧面数据:
cpb: bitrate max/min/avg: 5000000/5000000/5000000 buffer size: 1835008 vbv_delay: N/A
Stream #0:1(und): Audio: mp2, 44100 Hz, stereo, s16, 192 kb/s
元数据:
encoder : Lavc59.39.100 mp2
2022-08-24 04:08:47,884 av_interleaved_write_frame(): Cannot allocate memory41:02.67 bitrate=7000.0kbits/s speed=0.999x
2022-08-24 04:08:47,893 Last message repeated 1 times
2022-08-24 04:08:47,897 Error writing trailer of udp://239.120.1.2:7006?pkt_size=1316&bitrate=12000000: Cannot allocate memory
2022-08-24 04:08:47,898 frame=1321595 fps= 25 q=2.0 Lsize=45171938kB time=14:41:04.20 bitrate=7000.0kbits/s speed=0.999x
video:32265447kB audio:1239612kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 34.821243%
2022-08-24 04:08:51,469 Error closing file udp://239.120.1.2:7006?pkt_size=1316&bitrate=12000000: Cannot allocate memory
2022-08-24 04:08:51,750 Conversion failed!
有任何想法吗?