FFmpeg 在Windows的命令

2021-04-20 23:26

阅读:481

标签:enc   send   asm   form   com   tty   use   zed   devices   

  • 打印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:\tt.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 

FFmpeg 在Windows的命令

标签:enc   send   asm   form   com   tty   use   zed   devices   

原文地址:https://www.cnblogs.com/TuWenHao/p/8600865.html


评论


亲,登录后才可以留言!