c# - VAPIX将音频发送到Axis IP摄像机

标签 c# audio sdk speaker vapix

我有带扬声器输出的轴凸轮。我已经在笔记本上安装了Vapix库,现在可以接收MEPEG-4格式的视频了。

现在,我想将笔记本中捕获的音频发送到具有相同库的相机。

最后,我搜索了此文档,但不知道如何在C#中使用它。

Vapix Audio SDK

最佳答案

问题的解决方案:

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;

namespace VapixForToroRosso
{
public partial class Form1 : Form
{
    private string USER = "root";
    private string PASS = "Blescia";
    private string IP = "192.168.1.2";
    public Form1()
    {
        InitializeComponent();
    }

    private void Form1_Load(object sender, EventArgs e)
    {
        axAxisMediaControl1.Volume = 100; //Set the volume of speaker
        /*
         *Use this if the camera required the login
         */
        axAxisMediaControl1.MediaUsername = USER; //Set the username
        axAxisMediaControl1.MediaPassword = PASS; //Set the password
        axAxisMediaControl1.Mute = false; //Disable Mute    
        axAxisMediaControl1.EnableReconnect = true; //Reconnect to the camera automatically

        axAxisMediaControl1.MediaURL = "rtsp://192.168.1.2/mpeg4/media.amp"; //For Retrieve the video streaming
        axAxisMediaControl1.AudioConfigURL = "http://" + IP + "/axis-cgi/view/param.cgi?camera=1&action=list&group=Audio,AudioSource.A0"; //Pre-Configuration of Camera
        axAxisMediaControl1.AudioTransmitURL = "http://" + IP + "/axis-cgi/audio/transmit.cgi"; //Url to send the streaming AUDIO          

        axAxisMediaControl1.Play();
    }

    private void btnStartStreaming_Click(object sender, EventArgs e)
    {
        axAxisMediaControl1.AudioTransmitStart(); //Start the streaming to camera
    }

    private void btnStopStreaming_Click(object sender, EventArgs e)
    {
        axAxisMediaControl1.AudioTransmitStop(); //Stop the streaming the camera
    }
   }
}

关于c# - VAPIX将音频发送到Axis IP摄像机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11176333/

相关文章:

c# - 如何使用sql计算日期差异

Android:在新 Activity 上暂停和重新启动音频,但在屏幕旋转时暂停和恢复

Android SDK Ubuntu 默认路径

c# - 缓存在特定时间过期

c# - 查找包含进程特定文本的窗口

ios - 从 iOS 使用 afconvert

c++ - 对于相对较新的计算机,有什么替代OL'C++ Beep()的好方法?

ios - VK iOS sdk授权

visual-studio-2015 - 链接 : fatal error LNK1104: cannot open file 'ucrt.lib'

c# - 以编程方式创建无线自组织网络