• 大小: 18.21M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-31
  • 语言: C#
  • 标签: c#  

资源简介

 

完整的C#代码,VS2008工程。ffmpeg录屏并通过UDP发送出去,接收端的可以直接播放或者保存:
1)播放:ffplay -f h264 udp://本机IP:6666
2)保存:ffmpeg -i udp://本机IP:6666 -c copy dump.flv

由于是采用UDP方式发送出去的,接收端是否在线不影响该软件的录屏和发送,接收端可以任意时间启动


资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.Diagnostics;
using System.Management;

namespace ScreanCaptureAndUdpSend
{
    public partial class Form1 : Form
    {
        private Process process;
        public Form1()
        {
            InitializeComponent();
        }

        private void btnStart_Click(object sender EventArgs e)
        {
            if (process != null)
            {
                MessageBox.Show(“请先停止录屏“);
                return;
            }
            string server = textServer.Text;
            string path = AppDomain.CurrentDomain.baseDirectory;

   

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        959  2019-03-05 13:54  ScreanCaptureAndUdpSend.sln

    ..A..H.      8704  2019-03-05 13:54  ScreanCaptureAndUdpSend.suo

     文件   66799104  2019-02-18 04:15  ScreanCaptureAndUdpSend\bin\Debug\ffmpeg.exe

     文件      11776  2019-03-05 14:32  ScreanCaptureAndUdpSend\bin\Debug\ScreanCaptureAndUdpSend.exe

     文件      26112  2019-03-05 14:32  ScreanCaptureAndUdpSend\bin\Debug\ScreanCaptureAndUdpSend.pdb

     文件      14328  2019-03-05 14:56  ScreanCaptureAndUdpSend\bin\Debug\ScreanCaptureAndUdpSend.vshost.exe

     文件        490  2009-06-11 05:14  ScreanCaptureAndUdpSend\bin\Debug\ScreanCaptureAndUdpSend.vshost.exe.manifest

     文件       3893  2019-03-05 14:32  ScreanCaptureAndUdpSend\Form1.cs

     文件       6527  2019-03-05 14:31  ScreanCaptureAndUdpSend\Form1.Designer.cs

     文件       5814  2019-03-05 14:31  ScreanCaptureAndUdpSend\Form1.resx

     文件        844  2019-03-05 14:56  ScreanCaptureAndUdpSend\obj\Debug\ScreanCaptureAndUdpSend.csproj.FileListAbsolute.txt

     文件        847  2019-03-05 14:31  ScreanCaptureAndUdpSend\obj\Debug\ScreanCaptureAndUdpSend.csproj.GenerateResource.Cache

     文件      11776  2019-03-05 14:32  ScreanCaptureAndUdpSend\obj\Debug\ScreanCaptureAndUdpSend.exe

     文件        180  2019-03-05 14:31  ScreanCaptureAndUdpSend\obj\Debug\ScreanCaptureAndUdpSend.Form1.resources

     文件      26112  2019-03-05 14:32  ScreanCaptureAndUdpSend\obj\Debug\ScreanCaptureAndUdpSend.pdb

     文件        180  2019-03-05 14:03  ScreanCaptureAndUdpSend\obj\Debug\ScreanCaptureAndUdpSend.Properties.Resources.resources

     文件        504  2019-03-05 13:54  ScreanCaptureAndUdpSend\Program.cs

     文件       1396  2019-03-05 13:54  ScreanCaptureAndUdpSend\Properties\AssemblyInfo.cs

     文件       2896  2019-03-05 13:54  ScreanCaptureAndUdpSend\Properties\Resources.Designer.cs

     文件       5612  2019-03-05 13:54  ScreanCaptureAndUdpSend\Properties\Resources.resx

     文件       1108  2019-03-05 13:54  ScreanCaptureAndUdpSend\Properties\Settings.Designer.cs

     文件        249  2019-03-05 13:54  ScreanCaptureAndUdpSend\Properties\Settings.settings

     文件       3792  2019-03-05 14:03  ScreanCaptureAndUdpSend\ScreanCaptureAndUdpSend.csproj

     目录          0  2019-03-05 14:00  ScreanCaptureAndUdpSend\obj\Debug\Refactor

     目录          0  2019-03-05 13:54  ScreanCaptureAndUdpSend\obj\Debug\TempPE

     目录          0  2019-03-05 14:25  ScreanCaptureAndUdpSend\bin\Debug

     目录          0  2019-03-05 14:32  ScreanCaptureAndUdpSend\obj\Debug

     目录          0  2019-03-05 13:54  ScreanCaptureAndUdpSend\bin

     目录          0  2019-03-05 13:54  ScreanCaptureAndUdpSend\obj

     目录          0  2019-03-05 13:54  ScreanCaptureAndUdpSend\Properties

............此处省略4个文件信息

评论

共有 条评论