Getting Started with Videos

OpenCV 3.0

    Learn to read video, display video and save video.
    Learn to capture from Camera and display it.
    You will learn these functions : cv2.VideoCapture(), cv2.VideoWriter()

DirectShow runtime is a core Windows component. It does not need a separate installation

FFmpeg
Capture & Display Camera
ex: ffmpeg -i “rtsp://root:camera@10.0.4.127/stream/profile1=u” -vcodec copy -acodec none test.mp4
https://github.com/adaptlearning/adapt_authoring/wiki/Installing-FFmpeg
rdp/screen-capture-recorder-to-video-windows-free
ffmpeg -f dshow -i audio=”virtual-audio-capturer”:video=”screen-capture-recorder” yo.mp4

list all ffmpeg
ffmpeg -list_devices true -f dshow -i dummy
Use the built-in GDI screengrabber (no install needed) like this :
ffmpeg -f gdigrab -framerate 10 -i desktop [output]
ffmpeg -f gdigrab -framerate 25 -i title=Calculator [output]
ffmpeg -f gdigrab -framerate 25 -i title=”Netflix – Google Chrome” [output]
ffmpeg -f gdigrab -framerate 25 -i title=”Netflix – Google Chrome” -f dshow -i audio=”virtual-audio-capturer” -c:v libx264 -b:v 200k test.mp4
ffmpeg -f dshow -framerate 25 -i video=”screen-capture-recorder” -f dshow -i audio=”virtual-audio-capturer” -c:v libx264 -b:v 200k test.mp4

ffmpeg wiki

x264 lossless
ffmpeg -i input -c:v libx264 -preset ultrafast -qp 0 output

Recording webcam
ffmpeg -f alsa -i default -f v4l2 -s 640×480 -i /dev/video0 output.mpg
ffmpeg -f alsa -i default -f v4l2 -s 640×480 -i /dev/video0 -acodec flac -vcodec libx264 output.mkv

VOB to any container
cat f0.VOB f1.VOB f2.VOB | ffmpeg -i – out.mp2

Two-pass MPEG-4 (very high quality)
ffmpeg -i video.mpg -an -vcodec mpeg4 -pass 1 -f rawvideo -y NUL
ffmpeg -i video.mpg -acodec libvorbis -aq 8 -ar 48000 -vcodec mpeg4 -pass 2 -b 8000k output.mp4

FFserver
he FFmpeg package includes FFserver, which can be used to stream media over a network.

H264 Capture
-i audio=”Sound Blaster Audigy Fx”
Motion, a software motion detector http://motion.sf.net

发表评论

电子邮件地址不会被公开。 必填项已用*标注