RTSP储存到一个文件中的位置 [英] Storing RTSP to a file location

查看:567
本文介绍了RTSP储存到一个文件中的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够通过C#WinForm应用程序流在Windows 7 64位机的RTSP。这是我使用的库 - VLCDotNet 这里是代码示例播放RTSP流:

I am able to stream an rtsp on windows 7 64 bit machine through C# Winform application. This is the library i used - VLCDotNet and here is the code sample to play the RTSP stream:

LocationMedia media = new LocationMedia(@"rtsp://192.168.137.73:554/live.sdp");
vlcControl1.Media = media;
vlcControl1.Play();



我想流到一个文件存储在我的电脑上点击一个按钮,并停止同与另一按钮。我如何做到这一点。

I would like to store the streams to a file in my PC on a button click and stop the same with another button. How do i achieve this?

推荐答案

下面是代码:

Vlc.DotNet.Core.Medias.MediaBase media1
= new Vlc.DotNet.Core.Medias.PathMedia("rtsp://192.168.137.73:554/live.sdp");

media.AddOption(":sout=#transcode{vcodec=theo,vb=800,
scale=1,acodec=flac,ab=128,channels=2,samplerate=44100}:std{access=file,mux=ogg,
dst=D:\\123.mp4}");

VlcControl control = new VlcControl();
control.Media = media;
control.Play();

这篇关于RTSP储存到一个文件中的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆