You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 25, 2024. It is now read-only.
using DotImaging;
using System;
using System.Windows.Forms;
namespace youtube_new_c
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
var sourceName = String.Empty;
var pipeName = new Uri("https://www.youtube.com/watch?v=Vpg9yizPP_g").NamedPipeFromYoutubeUri(); //Youtube
sourceName = String.Format(@"\\.\pipe\{0}", pipeName);
ImageStreamReader reader = new FileCapture(sourceName);
reader.Open();
//seek if you can
if (reader.CanSeek)
reader.Seek((int)(reader.Length * 0.25), System.IO.SeekOrigin.Begin);
//read video frames
Bgr<byte>[,] frame = null;
do
{
reader.ReadTo(ref frame);
if (frame == null)
break;
frame.Show(scaleForm: true);
((double)reader.Position / reader.Length).Progress();
}
while (!(Console.KeyAvailable && Console.ReadKey(true).Key == ConsoleKey.Escape));
}
}
}
and when run i got a black window, one empty form and another form with a progressbar but nothing happens. Any idea of what i need to do?
Thanks
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi
I have this code writen:
and when run i got a black window, one empty form and another form with a progressbar but nothing happens. Any idea of what i need to do?
Thanks
The text was updated successfully, but these errors were encountered: