【发布时间】:2017-08-07 19:44:26
【问题描述】:
我正在使用 ffmpeg 读取 rtsp 相机。我收到一个错误:ffmpeg rtsp 错误:C++ 中的服务器回复中的传输不匹配”和“处理输入时发现无效数据”。相机设置了“RTP ES”。这是代码。
source_name = "rtsp://192.168.1.108/WESCAM";
// Open the initial context variables that are needed
format_ctx = avformat_alloc_context();
codec_ctx = NULL;
// Register everything
av_register_all();
avformat_network_init();
//open RTSP camera or h264 file
if (avformat_open_input(&format_ctx, source_name, NULL, NULL) != 0)
{
return EXIT_FAILURE;
}
【问题讨论】:
-
我可以使用上面显示的rtsp地址播放这个VLC。我正在使用 RedHat 6.9。
-
也许this 可以帮助你