FFmpeg Video Acquisition in Windows

Source: Internet
Author: User

The FFMPEG video acquisition function is very powerful. It can not only collect video capture card or USB camera images, but also screen recording. It also supports transmitting videos to RTSP-enabled streaming media servers in RTP mode, supports live applications.

    • FFmpeg Video Acquisition in Linux

On Linux, FFMPEG provides excellent support for v4l2 video devices, such:

. /FFMPEG-T 10-F video4linux2-s 176*144-R 8-I/dev/video0-vcodec h263-F RTP: // 192.168.1.105: 5060>/tmp/FFMPEG. SDP

The preceding command indicates that the video is collected for 10 seconds, and the video4linux2 video device is collected. The qcif (176*144) video is collected at 8 frames per second, and the video device is/dev/video0, the video encoding is h263 and the output format is RTP. The IP address and port are defined later, and the SDP file corresponding to the code stream is redirected to/tmp/FFMPEG. in SDP, you can upload the SDP file to the Streaming Media Server for live broadcasting.

. /FFMPEG-T 10-F video4linux2-s 176*144-R 10-vpre libx264-hq.ffpreset-I/dev/video0-vcodec libx264-F RTP: // 192.168.1.105: 6060>/tmp/x264.sdp

This command is similar to the preceding one, but the video is encoded as h264. Because FFMPEG uses the external library x264 to support h264 encoding, more parameters are required for h264 video collection. You must specify-Vpre libx264-hq.ffpreset.

    • FFmpeg Video Acquisition in Windows

There is very little information about FFMPEG video collection in windows, but FFMPEG supports video collection in windows. FFmpeg supports video collection on Windows video for Windows (VFW) devices. However, VFW devices are outdated and are being replaced by WDM video devices, but FFMPEG has no plans to support WDM, however, it seems that there are tools for converting WDM into VFW, so FFMPEG can still be used for video collection in windows. The command is as follows:

./FFMPEG-T 10-F vfwcap-I 0-R 8-F MP4 cap.mp4

The specific description is as follows: we collect for 10 seconds. The collection device is a vfwcap type device and 0th vfwcap collection devices (if the system has multiple VFW video collection devices, you can use-I num to select), 8 frames per second, the output mode is file, and the format is MP4.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.