FeritKalkan Merhaba,
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Web;
using System.Net;
using System.IO;
namespace ipcamera
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
// private Bitmap loadedBitmap;
private void button1_Click(object sender, EventArgs e)
{
getFrame();
}
private void getFrame(){
string SourceURL = ("http://192.168.2.104:80/streaming/channels/1/picture/?auth=YWRtaW46YTEyMzQ1Njc=");
var request = System.Net.HttpWebRequest.Create(SourceURL);
request.Credentials = new NetworkCredential();
request.Proxy = null;
byte[] buffer = new byte[1280*270];
int read ,total = 0;
HttpWebRequest req = (HttpWebRequest) WebRequest.Create(SourceURL);
WebResponse resp = req.GetResponse();
Stream stream = resp.GetResponseStream();
while ((read = stream.Read(buffer ,total , 1000)) != 0)
{
total += read;
}
Bitmap bmp = (Bitmap) Bitmap.FromStream(new MemoryStream (buffer ,0 ,total));
pictureBox1.Image = bmp;
}
private void timer1_Tick(object sender, EventArgs e)
{
button1.PerformClick();
}
}
}
Burada bahsi geçen kodu deneyiniz.
Eğer denediyseniz burada kesin sonuca ulaşabilirsiniz.
Not: En son çare vlc plugin kullanınız.
İyi çalışmalar.