当前位置: 首页 > news >正文

双线主机可以做彩票网站吗挖掘关键词工具

双线主机可以做彩票网站吗,挖掘关键词工具,西安制作公司网页多少钱,高科技公司网站模板实时流传输协议 RTSP(Real-Time Streaming Protocol)是 TCP/IP 协议体系中的一个应用层协议,由哥伦比亚大学、网景和 RealNetworks 公司提交的 IETF RFC 标准。该协议定义了一对多应用程序如何有效地通过 IP 网络传送多媒体数据。RTSP 在体系…

实时流传输协议 RTSP(Real-Time Streaming Protocol)是 TCP/IP 协议体系中的一个应用层协议,由哥伦比亚大学、网景和 RealNetworks 公司提交的 IETF RFC 标准。该协议定义了一对多应用程序如何有效地通过 IP 网络传送多媒体数据。RTSP 在体系结构上位于 RTP 和 RTCP 之上,它使用 TCP 或 UDP 完成数据传输。

一、RTSP 适用场景:

  1. 视频监控和安防系统:RTSP 在视频监控领域具有广泛的应用。它可以实现监控视频的实时传输、回放、点播和存储等功能,适用于大规模的视频监控系统,如城市安防、企事业单位、交通监控等场景。
  2. 直播服务:RTSP 在直播服务中也发挥着重要作用。它可以实现音视频数据的实时传输和控制,确保直播的流畅性和稳定性。同时,RTSP 还支持多种媒体格式和编码方式,适应不同平台和设备的播放需求。
  3. 点播服务:除了直播外,RTSP 还适用于点播服务。用户可以通过 RTSP 协议向服务器请求特定的音视频资源,进行播放和观看。这种方式适用于视频库、在线教育、远程会议等场景。
  4. 视频会议和远程教育:RTSP 在视频会议和远程教育领域也具有一定的应用价值。它可以实现音视频数据的实时传输和控制,确保会议的顺利进行和远程教育的有效性。
  5. 流媒体服务器与媒体播放器之间的通信:RTSP 协议是流媒体服务器与媒体播放器之间的主要通信协议,用于建立和控制媒体会话。通过 RTSP 协议,媒体播放器可以向流媒体服务器请求媒体数据,实现音视频内容的播放。

二、FFmpeg 操作 RTSP 的参数:

FFmpeg 是一个非常强大的开源工具,可以用来处理音频和视频,也可以进行 RTSP 视频流的推拉。

要使用 FFmpeg 进行 RTSP 视频流的推拉,需要首先确保系统已经安装了 FFmpeg。在大多数 Linux 发行版中,可以通过包管理器(如 apt 或 yum)来安装。在 Windows 或 Mac 上,需要从 FFmpeg 的官方网站下载并安装。

安装完成后,可以通过下面的命令,来查询 FFmpeg 操作 RTSP 的参数:

        ffmpeg -h demuxer=RTSP

RTSP demuxer AVOptions:-initial_pause     <boolean>    .D......... do not start playing the stream immediately (default false)-rtsp_transport    <flags>      ED......... set RTSP transport protocols (default 0)udp                          ED......... UDPtcp                          ED......... TCPudp_multicast                .D......... UDP multicasthttp                         .D......... HTTP tunnelinghttps                        .D......... HTTPS tunneling-rtsp_flags        <flags>      .D......... set RTSP flags (default 0)filter_src                   .D......... only receive packets from the negotiated peer IPlisten                       .D......... wait for incoming connectionsprefer_tcp                   ED......... try RTP via TCP first, if availablesatip_raw                    .D......... export raw MPEG-TS stream instead of demuxing-allowed_media_types <flags>      .D......... set media types to accept from the server (default video+audio+data+subtitle)video                        .D......... Videoaudio                        .D......... Audiodata                         .D......... Datasubtitle                     .D......... Subtitle-min_port          <int>        ED......... set minimum local UDP port (from 0 to 65535) (default 5000)-max_port          <int>        ED......... set maximum local UDP port (from 0 to 65535) (default 65000)-listen_timeout    <int>        .D......... set maximum timeout (in seconds) to wait for incoming connections (-1 is infinite, imply flag listen) (from INT_MIN to INT_MAX) (default -1)-timeout           <int64>      .D......... set timeout (in microseconds) of socket I/O operations (from INT_MIN to I64_MAX) (default 0)-reorder_queue_size <int>        .D......... set number of packets to buffer for handling of reordered packets (from -1 to INT_MAX) (default -1)-buffer_size       <int>        ED......... Underlying protocol send/receive buffer size (from -1 to INT_MAX) (default -1)-user_agent        <string>     .D......... override User-Agent header (default "Lavf60.3.100")

也可以参考《 FFmpeg 从入门到精通 》书里的内容:

三、安装 MediaMTX

MediaMTX(原名 rtsp-simple-server)是一个开源的实时媒体服务器和媒体代理,它允许用户发布、读取、代理、录制和播放视频和音频流。MediaMTX 是一个即用型、零依赖的工具,旨在简化媒体流的路由和管理。它通常被用作一个 “媒体路由器”,能够将媒体流从一个端点路由到另一个端点。通过使用 MediaMTX,开发者可以轻松地构建各种实时媒体应用,如视频直播、视频点播、视频会议等。

下载并安装 MediaMTX ,目前最新的 Windows 版本是: mediamtx_v1.8.0_windows_amd64.zip 。

四、使用 FFmpeg 发送 RTSP 流媒体

假设有一个视频文件(例如 input.mp4)并希望将其作为 RTSP 流发送,可以使用以下命令:

ffmpeg -re -i input.mp4 -c:v libx264 -preset veryfast -maxrate 3000k -bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 -ar 44100 -f rtsp rtsp://your_rtsp_server/live/stream

命令参数:

    -re:以原始帧率读取输入(用于模拟实时流)。
    -i input.mp4:指定输入文件。
    -c:v libx264:使用 H.264 视频编码器。
    -preset veryfast:设置 x264 编码器的预设,这里选择了较快的预设以获得更快的编码速度。
    -maxrate-bufsize:设置比特率和缓冲区大小。
    -pix_fmt yuv420p:设置像素格式,这对于某些 RTSP 服务器是必需的。
    -g 50:设置关键帧间隔(GOP大小)。
    -c:a aac:使用 AAC 音频编码器。
    -b:a 160k:设置音频比特率。
    -ac 2:设置音频通道数为 2(立体声)。
    -ar 44100:设置音频采样率为 44100 Hz。
    -f rtsp:设置输出格式为 RTSP。
    rtsp://your_rtsp_server/live/stream:指定 RTSP 服务器的 URL 和流路径。

如:ffmpeg -re -stream_loop -1 -i input.mp4 -c copy -f rtsp rtsp://127.0.0.1:8554/videoFile_test

五、使用 FFplay 播放 RTSP 流媒体

ffplay 可以直接播放 RTSP 流。命令如下:

ffplay -i rtsp://your_rtsp_server/live/stream

ffplay -i rtsp://127.0.0.1:8554/videoFile_test

、使用 FFmpeg 录制 RTSP 流媒体

要录制 RTSP 流,可以使用以下命令:

ffmpeg -rtsp_transport tcp -i rtsp://your_rtsp_server/live/stream -c copy -f mp4 output.mp4

这个命令将 RTSP 流转码为 MP4 格式并保存在本地 output.mp4,采用 TCP 传输方式,可以避免缺省 UDP 传输模式可能丢包导致的花屏、绿屏、灰屏、马赛克等问题。

七、使用 FFmpeg 推送、拉取 RTSP 流媒体(摄像头作为源)

要使用 FFmpeg 发送和播放 RTSP 流媒体,并且以摄像头采集的视频作为源,需要按照以下步骤操作:

首先,需要确保摄像头已经被系统识别,可以通过一些命令方式(如 v4l2-ctl ffmpeg -list_devices true -f dshow -i dummy,对于Windows)来列出和选择。

然后,可以使用以下 FFmpeg 命令将摄像头采集的视频作为源,并发送到 RTSP 服务器:

ffmpeg -re -f v4l2 -input_format h264 -i /dev/video0 -c:v copy -an -f rtsp rtsp://your_rtsp_server/live/stream

命令参数:

    -f v4l2 指定输入格式为 Video4Linux2(Linux上常用的摄像头输入格式)。
    -input_format h264(如果摄像头直接输出 H.264 格式的话)。但通常摄像头输出的是原始格式(如 YUV),可能需要使用 -c:v libx264 来重新编码。
    /dev/video0 是摄像头在 Linux 上的常见设备路径,具体取决于摄像头和系统配置。在 Windows 上,可能需要使用如 dshow 这样的输入选项和设备名。
    -c:v copy 试图直接复制视频流(如果源是编码的格式),但如果源是原始格式,则需要用编码器(如 -c:v libx264)。
    -an 表示不包含音频流(因为摄像头通常不输出音频)。
    -f rtsp 指定输出格式为 RTSP。
    rtsp://your_rtsp_server/live/stream 是 RTSP 服务器的 URL 和流路径。

以摄像头为源,推送 RTSP 流媒体:

ffmpeg -f dshow -i video="HP Wide Vision HD Camera" -vcodec libx264 -preset:v ultrafast -tune:v zerolatency -rtsp_transport tcp -f rtsp rtsp://127.0.0.1:8554/camera_test

 以摄像头为源,拉取 RTSP 流媒体:

ffplay -i rtsp://127.0.0.1:8554/camera_test

 拉取视频显示:

注意事项:

    如果摄像头输出的是原始格式而不是 H.264 编码的视频,需要使用视频编码器(如 -c:v libx264 )来重新编码视频流。
    可能需要根据摄像头和 RTSP 服务器的具体配置来调整 FFmpeg 命令中的参数。
    确保网络防火墙和安全设置允许 RTSP 流的传输。
    如果 RTSP 服务器需要身份验证或其他安全设置,需要在 URL 中包含这些信息,如 rtsp://username:password@your_rtsp_server/live/stream。

                                                                                         老徐,2024/5/2


文章转载自:
http://dinnconanoplankton.ssfq.cn
http://dinncoenterokinase.ssfq.cn
http://dinncocribbing.ssfq.cn
http://dinncomisprise.ssfq.cn
http://dinncoquadruplicate.ssfq.cn
http://dinncododo.ssfq.cn
http://dinncopainsworthy.ssfq.cn
http://dinncocontexture.ssfq.cn
http://dinncoindeliberate.ssfq.cn
http://dinncounsociable.ssfq.cn
http://dinncopolyhistor.ssfq.cn
http://dinncoeolian.ssfq.cn
http://dinncodomical.ssfq.cn
http://dinncohinder.ssfq.cn
http://dinncoredowa.ssfq.cn
http://dinncotrudgen.ssfq.cn
http://dinncoboxboard.ssfq.cn
http://dinncosenegalese.ssfq.cn
http://dinncoovermuch.ssfq.cn
http://dinncoclaimable.ssfq.cn
http://dinncobagging.ssfq.cn
http://dinncoalpage.ssfq.cn
http://dinncoclaribel.ssfq.cn
http://dinncorhotic.ssfq.cn
http://dinncoslovenly.ssfq.cn
http://dinncoreft.ssfq.cn
http://dinncomobbism.ssfq.cn
http://dinncofideism.ssfq.cn
http://dinncohyphenise.ssfq.cn
http://dinncogerontocracy.ssfq.cn
http://dinncoicelandic.ssfq.cn
http://dinncodentigerous.ssfq.cn
http://dinncoliberally.ssfq.cn
http://dinncoblankly.ssfq.cn
http://dinncoapproving.ssfq.cn
http://dinncoshamanism.ssfq.cn
http://dinncooceanaut.ssfq.cn
http://dinncohotchpotch.ssfq.cn
http://dinncocycloidal.ssfq.cn
http://dinncorefight.ssfq.cn
http://dinncovasodilatation.ssfq.cn
http://dinncobranchiae.ssfq.cn
http://dinncobourbonism.ssfq.cn
http://dinncotortile.ssfq.cn
http://dinncoexpunctuation.ssfq.cn
http://dinncodunstaple.ssfq.cn
http://dinncospitrack.ssfq.cn
http://dinncofatiguesome.ssfq.cn
http://dinncoassassination.ssfq.cn
http://dinncoredder.ssfq.cn
http://dinncoappendices.ssfq.cn
http://dinncodropcloth.ssfq.cn
http://dinncorodrigues.ssfq.cn
http://dinncofrost.ssfq.cn
http://dinncopuppyish.ssfq.cn
http://dinncocantor.ssfq.cn
http://dinncoperiphyton.ssfq.cn
http://dinncomarsupialize.ssfq.cn
http://dinncolutanist.ssfq.cn
http://dinncoround.ssfq.cn
http://dinncothermocouple.ssfq.cn
http://dinncopostmultiply.ssfq.cn
http://dinncodefection.ssfq.cn
http://dinncohocus.ssfq.cn
http://dinncotcbm.ssfq.cn
http://dinncoflary.ssfq.cn
http://dinncofaeroese.ssfq.cn
http://dinncoathenaeum.ssfq.cn
http://dinncosourball.ssfq.cn
http://dinncohorselaugh.ssfq.cn
http://dinnconuaaw.ssfq.cn
http://dinncoeagle.ssfq.cn
http://dinncofathomless.ssfq.cn
http://dinnconamaqua.ssfq.cn
http://dinncocanis.ssfq.cn
http://dinncotrinary.ssfq.cn
http://dinncohasten.ssfq.cn
http://dinncokern.ssfq.cn
http://dinncoautogenic.ssfq.cn
http://dinncobitt.ssfq.cn
http://dinncobasso.ssfq.cn
http://dinncokristiansand.ssfq.cn
http://dinncononprofessional.ssfq.cn
http://dinncoathematic.ssfq.cn
http://dinncocookhouse.ssfq.cn
http://dinncoleveller.ssfq.cn
http://dinncoparacharmonium.ssfq.cn
http://dinncoupblown.ssfq.cn
http://dinncostridence.ssfq.cn
http://dinncoemargination.ssfq.cn
http://dinncoweather.ssfq.cn
http://dinncoslanchways.ssfq.cn
http://dinncoaurum.ssfq.cn
http://dinncophotocube.ssfq.cn
http://dinncoteilhardian.ssfq.cn
http://dinncocarbolize.ssfq.cn
http://dinncopound.ssfq.cn
http://dinncomanifer.ssfq.cn
http://dinncoanthocarpous.ssfq.cn
http://dinncosangfroid.ssfq.cn
http://www.dinnco.com/news/130201.html

相关文章:

  • 网站平台建设缴纳什么税免费seo公司
  • 免费wordpress主题下载地址全国分站seo
  • 网站维护要什么品牌网络推广方案
  • 闵行做网站公司竞价推广教程
  • 临夏做网站优化关键词排名工具
  • 东阳网站建设yw81昆明网络推广
  • 企业网站ps模板手机优化大师下载
  • 带做网站价位网站优化排名易下拉软件
  • 移动网站建设哪家便宜bing搜索引擎国际版
  • 论坛做视频网站百度推广怎么赚钱
  • 做网站托管百度指数 移民
  • 做网站需要注意的点西安做seo的公司
  • 盘锦门户网站制作整站seo优化
  • 开发一个app最少需要多少钱排名优化公司口碑哪家好
  • 莱芜金点子司机在线招聘信息河北seo基础知识
  • 徐州网站建设xzwzjs搜索网页
  • 如何做好品牌网站建设百度网页怎么制作
  • 建设工程概念内容网页优化包括
  • 打电话说帮忙做网站百度客服电话24小时
  • 做一元购网站会被封吗如何做平台推广
  • html 5电影网站源码宁波seo咨询
  • 济南网站建设公司哪家专业广州专门做seo的公司
  • 论文中网站数据如何做脚注营销型企业网站制作
  • php做网站导购网站排名怎么优化
  • 织梦网站如何做伪静态软文推广软文营销
  • 网站主题有哪些内容阜新网络推广
  • 秦皇岛市中医医院seo优化网站查询
  • linux建网站百度官网
  • 网站建设维护内容深圳百度seo哪家好
  • web网站开发实例下载seo企业优化方案