ffmpeg -list_devices true -f dshow -i dummy
ffmpeg -f dshow -i video="Lenovo EasyCamera" out.mp4
ffmpeg -f dshow -i audio="@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{7DB78E33-271D-431B-9E43-F4A54BD675BD}" out.mp4
- 打开摄像头,打开麦克风,录音录像保存在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:
ffmpeg -f dshow -i audio="@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{7DB78E33-271D-431B-9E43-F4A54BD675BD}" -f mp2 udp:
- Watch a stream over UDP, with a max reordering delay of 0.5 seconds:
ffplay -max_delay 500000 -rtsp_transport udp rtsp:
- Watch a stream tunneled over HTTP:
ffplay -rtsp_transport http rtsp:
- Send a stream in realtime to a RTSP server, for others to watch:
ffmpeg -re -i input -f rtsp -muxdelay 0.1 rtsp:
- Receive a stream in realtime:
ffmpeg -rtsp_flags listen -i rtsp:
- Use ffmpeg to stream over UDP to a remote endpoint:
ffmpeg -i input -f format udp:
- 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:
- Use ffmpeg to receive over UDP from a remote endpoint:
ffmpeg -i udp://[multicast-address]:port ...
ffmpeg -i "e:\tt.sdp" -vcodec flv -acodec aac -ab 8000 -f flv rtmp:
ffmpeg -i "vlc.sdp" -vcodec flv -acodec aac -ab 8000 -f flv rtp:
- 推流的时候要将音频和视频分开推,才能够用vlc.sdp播放
ffmpeg -fflags +genpts -re -i 4.ts -an -vcodec copy -f rtp rtp:
- 下面命令实现了发送H.264裸流“chunwan.h264”至地址rtp://233.233.233.223:6666
ffmpeg -re -i 4.ts -vcodec copy -f rtp rtp: