public NodeFrameFromMP4(String path, OptionsStruct opt, IPipe Output, NodeToken token) : base(null, Output) { this.opt = opt; this.token = token; InitFrameSize(); ffmpeg = new DFffmpeg(GenerateArgs(path, opt)); }
public NodeFrameFromYoutube(String url, OptionsStruct opt, IPipe Output, NodeToken token) : base(null, Output) { this.opt = opt; this.token = token; InitFrameSize(); ffmpeg = new DFffmpeg(GenerateArgsFFmpeg(opt)); youtube = new DFYoutube(GenerateArgsYoutube(url)); }
public int GetWidthFromPath(String path) { DFffmpeg ffmpeg = new DFffmpeg(GenerateArgs(path)); ffmpeg.StarByte(); String s = ""; String temp; while (true) { ffmpeg.Wait(100); temp = ffmpeg.ErrorString(); if (temp != "") { s += temp; continue; } else if ((s.Length > 0) & (!ffmpeg.IsRunning)) { break; } } ffmpeg.Terminate(); int l = s.IndexOf("Stream #"); l = s.IndexOf("yuv", l); l = s.IndexOf("x", l) + 1; int r = s.IndexOf(",", l); s = s.Substring(l, r - l); r = s.IndexOf(" "); if (r > 0) { s = s.Substring(0, r); } return(int.Parse(s)); }
public NodeFrameToMP4(String path, OptionsStruct opt, IPipe Input) : base(Input, null) { this.opt = opt; ffmpeg = new DFffmpeg(GenerateArgs(path, opt)); InitFrameSize(); }
public NodeFrameFromYoutube(String path, OptionsStruct opt, IPipe Output) : base(null, Output) { this.opt = opt; InitFrameSize(); ffmpeg = new DFffmpeg(GenerateArgsFFmpeg(path, opt)); }