linux c++ ffmpeg rtsp推流报错 rtsp://localhost:8554/Live: Protocol not found

根据报错内容rtsp://localhost:8554/Live: Protocol not found

意思是没有找到对应协议,添加以下红色字体指令解决,

std::string rtsp_server_url = "rtsp://localhost:8554/live";

  std::stringstream command;

  command << "ffmpeg ";

  command << "-y "  // overwrite output files

          << "-an " // disable audio

          << "-f rawvideo " // force format to rawvideo

          << "-vcodec rawvideo "  // force video rawvideo ('copy' to copy stream)

          << "-pix_fmt bgr24 "  // set pixel format to bgr24

          << "-s 640x516 "  // set frame size (WxH or abbreviation)

          << "-r 25 "; // set frame rate (Hz value, fraction or abbreviation)

  command << "-i - "; //

  command << "-c:v libx264 "  // Hyper fast Audio and Video encoder

          << "-pix_fmt yuv420p "  // set pixel format to yuv420p

          << "-preset ultrafast " // set the libx264 encoding preset to ultrafast

          << "-f flv " // force format to flv

          << "-rtsp_transport tcp "

          << "-f rtsp "

          << rtsp_server_url;

相关推荐

  1. ios

    2024-01-07 18:02:04       44 阅读
  2. axios请求类型是文件怎么显示信息

    2024-01-07 18:02:04       14 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-01-07 18:02:04       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-01-07 18:02:04       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-01-07 18:02:04       19 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-01-07 18:02:04       20 阅读

热门阅读

  1. 数据库原理与应用期末复习大纲

    2024-01-07 18:02:04       35 阅读
  2. WiFi7: 使用Multi-Link Element告知ML信息之概述

    2024-01-07 18:02:04       41 阅读
  3. 【MySQL】关于日期转换的方法

    2024-01-07 18:02:04       41 阅读
  4. Github Copilot 快速入门

    2024-01-07 18:02:04       39 阅读
  5. Vue中的组件通信方式及应用场景

    2024-01-07 18:02:04       43 阅读