• FFmpeg 在Windows的命令


    • 打印DirectShow支持的设备列表
    ffmpeg -list_devices true -f dshow -i dummy
    • 打开摄像头,录像保存在out.mp4
     ffmpeg -f dshow -i video="Lenovo EasyCamera" out.mp4
    • 打开麦克风,录音保存在out.mp3
    ffmpeg -f dshow -i audio="@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}wave_{7DB78E33-271D-431B-9E43-F4A54BD675BD}" out.mp4
    • 1
    • 打开摄像头,打开麦克风,录音录像保存在out.mp4
    ffmpeg -f dshow -i video="Lenovo EasyCamera":audio="@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}wave_{7DB78E33-271D-431B-9E43-F4A54BD675BD}" out.mp4
    • 打开摄像头,打开麦克风,录音录像10s,保存在out.mp4
    ffmpeg -t 10 -f dshow -i video="Lenovo EasyCamera":audio="@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}wave_{7DB78E33-271D-431B-9E43-F4A54BD675BD}" out.mp4
    • 打开摄像头,帧率25,h264视频编码,推送视频流到远程rtp地址
    ffmpeg -r 25 -f dshow -i video="Lenovo EasyCamera" -vcodec libx264 -preset:v ultrafast -tune:v zerolatency -f h264 rtp://192.168.1.10:6666 
    • 打开麦克风,推送音频流到远程rtp地址
    ffmpeg -f dshow -i audio="@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}wave_{7DB78E33-271D-431B-9E43-F4A54BD675BD}" -f mp2 udp://192.168.1.103:6666
    • Watch a stream over UDP, with a max reordering delay of 0.5 seconds:
    ffplay -max_delay 500000 -rtsp_transport udp rtsp://server/video.mp4
    • Watch a stream tunneled over HTTP:
    ffplay -rtsp_transport http rtsp://server/video.mp4
    • Send a stream in realtime to a RTSP server, for others to watch:
    ffmpeg -re -i input -f rtsp -muxdelay 0.1 rtsp://server/live.sdp
    • Receive a stream in realtime:
    ffmpeg -rtsp_flags listen -i rtsp://ownaddress/live.sdp output
    • Use ffmpeg to stream over UDP to a remote endpoint:
    ffmpeg -i input -f format udp://hostname:port
    • Use ffmpeg to stream in mpegts format over UDP using 188 sized UDP packets, using a large input buffer:
    ffmpeg -i input -f mpegts udp://hostname:port?pkt_size=188&buffer_size=65535
    • Use ffmpeg to receive over UDP from a remote endpoint:
    ffmpeg -i udp://[multicast-address]:port ...
    • ffmpeg转发
    ffmpeg -i "e:	t.sdp" -vcodec flv -acodec aac -ab 8000 -f flv rtmp://192.168.0.201:1935/live/stream3 
    • ffmpeg转发
    ffmpeg -i "vlc.sdp" -vcodec flv -acodec aac -ab 8000 -f flv rtp://192.168.1.103:5004 
    • 推流的时候要将音频和视频分开推,才能够用vlc.sdp播放
    ffmpeg -fflags +genpts -re -i 4.ts -an -vcodec copy -f rtp rtp://192.168.1.103:5004 -vn -acodec copy -f rtp rtp://192.168.1.103:5005 > vlc.sdp
    
    ffplay rtp://192.168.1.101:5004/test.sdp
    • 下面命令实现了发送H.264裸流“chunwan.h264”至地址rtp://233.233.233.223:6666
    ffmpeg -re -i 4.ts -vcodec copy -f rtp rtp://192.168.1.103:6666 > test0207.sdp 
  • 相关阅读:
    无法import的原因(ImportError: No module named *****)
    Mac 安装终端软件
    MyEclipse中拷贝J2EE项目,发布到tomcat中名字一样的解决办法
    微PE工具箱 v2.1 正式版,最好用的PE工具箱
    Windows 10 v2004 (OS Build 19041.329)
    Microsoft Visual C++ 2019 14.27.28914.0[2020.06.03]
    Visual C++ 运行库合集包完整版 v20200603
    VMware-workstation-full-15.5.6-16341506官方版及密钥
    [转载]使用PRIMO组件,让你的硬盘快几倍!
    [转载]goldendict下优质词典简介及安装
  • 原文地址:https://www.cnblogs.com/TuWenHao/p/8600865.html
Copyright © 2020-2023  润新知