利用ffmpeg进行摄像头提取视频编码为h264通过RTP发送数据到指定的rtp地址
来源:互联网 发布:java this super 区别 编辑:程序博客网 时间:2024/06/03 21:29
话不多说命令如下:
ffmpeg -f dshow -i video="Logitech QuickCam Easy/Cool" -vcodec libx264 -preset:v ultrafast -tune:v zerolatency -f rtp rtp://127.0.0.1:6666>sd.sdp
用此命令可以产生264的rtp流, video="Logitech QuickCam Easy/Cool" 为摄像头的名字,-vcodec libx264表示采用264编码器,-preset:v ultrafast -tune:v zerolatency表示实时编码,>sd.sdp表示产生sdp,此sdp的作用是提供给接收rtp流的信息,接收rtp流的一方读取这个文件就可以接受流显示。
但是因为此命令产生的h264流是用yuv444编码的,所以接收方要想存储h264流的话,得在发送方的命令加一个参数:
-pixfmt YUV420P
至于有人问怎么知道摄像头的名字,用这个命令就好了:
ffmpeg -list_devices true -f dshow -i dummy
基本这样就大功告成了~
from: http://www.aichengxu.com/other/1438151.htm
Streaming a simple RTP audio stream from FFmpeg ¶
FFmpeg can stream a single stream using the RTP protocol. In order to avoid buffering problems on the other hand, the streaming should be done through the -re option, which means that the stream will be streamed in real-time (i.e. it slows it down to simulate a live streaming source.
For example the following command will generate a signal, and will stream it to the port 1234 on localhost:
ffmpeg -re -f lavfi -i aevalsrc="sin(400*2*PI*t)" -ar 8000 -f mulaw -f rtp rtp://127.0.0.1:1234
To play the stream with ffplay (which has some caveats, see above), run the command:
ffplay rtp://127.0.0.1:1234
Note that rtp by default uses UDP, which, for large streams, can cause packet loss. See the "point to point" section in this document for hints if this ever happens to you.
from:https://trac.ffmpeg.org/wiki/StreamingGuide
- 利用ffmpeg进行摄像头提取视频编码为h264通过RTP发送数据到指定的rtp地址
- 利用ffmpeg进行摄像头提取视频编码为h264通过RTP发送数据到指定的rtp地址
- ffmpeg摄像头采集h264编码RTP发送
- 【FFMPEG】基于RTP的H264视频数据打包解包类
- 基于H264-USB摄像头的RTP实时视频的传输
- ffmpeg 接收解码rtp h264视频流
- ffmpeg 接收解码rtp h264视频流
- rtp传输h264编码的视频判断是否为关键帧
- android实时录制视频h263编码通过rtp打包udp发送到服务器
- 利用FFmpeg+x264将iOS摄像头实时视频流编码为h264文件
- <六> 通过RTP协议传输H264视频
- FFMPEG 解码RTP+h264
- 基于RTP的H264视频数据打包解包类
- 基于RTP的H264视频数据打包解包类
- 基于RTP的H264视频数据打包解包类
- 基于RTP的H264视频数据打包解包类
- 基于RTP的H264视频数据打包解包类
- 基于RTP的H264视频数据打包解包类
- Win7 64位下Python安装PIL图像处理库
- 蓝桥杯《操作格子》
- MFC程序、dos程序修改图标
- ajaxFileUpload.js上传图片插件,全浏览器兼容,规避json错误,带文件格式大小拦截
- 1+2+...n的平方和
- 利用ffmpeg进行摄像头提取视频编码为h264通过RTP发送数据到指定的rtp地址
- CANOpen生命保护/心跳报文
- 呸
- 可用于加密时字段排序
- php 变量循环命名 赋值 变量名输出 <三>
- 在centos7下安装java8和mysql
- 最全Android面试题大集合(Android、Java、计算机基础、设计模式)持续更新
- GBIP-USB-HS线的驱动安装
- JSP页面中实现网页访问量的统计