/// <summary> /// Create the final streaming command for ffmpeg /// </summary> /// <param name="type"></param> public void CreateCommand(StreamType type) { streamCommand = "-rtbufsize 1500M -f dshow "; if (type.Equals(StreamType.WebCamStream)) { streamCommand += " -video_size " + VideoSize + " -framerate " + FrameRate + " -vcodec mjpeg -i video="; streamCommand += "\"" + VideoDevice + "\""; streamCommand += ":audio="; streamCommand += "\"" + AudioDevice + "\""; streamCommand += " -ar 44100 -f flv -f flv " + serverURL + StreamName; //var video="\"" + VideoDevice + "\""; //var audio="\"" + AudioDevice + "\""; //streamCommand += "-i video=" + video + " -f dshow -i audio=" + audio + " -vf scale=1280:720 -vcodec libx264 -r 60.97 -acodec libvo_aacenc -ac 2 -ar 44100 -ab 128k -rtbufsize -pix_fmt yuv420p -tune zerolatency -preset ultrafast -f flv" + serverURL + StreamName; } else { streamCommand += " -i video="; streamCommand += "\"" + VideoDevice + "\""; streamCommand += ":audio="; streamCommand += "\"" + AudioDevice + "\""; streamCommand += " -ar 44100 -r 20 -q 5 -f flv " + serverURL + StreamName; //streamCommand += " -i video="; //streamCommand += "\"" + VideoDevice + "\""; //streamCommand += " -f dshow -i audio="; //streamCommand += "\"" + AudioDevice + "\""; //streamCommand += " -vf scale=1280:720 -vcodec libx264" + // " -r 60.97 -acodec libvo_aacenc -ac 2 -ar 44100 -ab 128 -pix_fmt yuv420p"+ // " -tune zerolatency -preset ultrafast -f flv " + serverURL + StreamName; } }
public short GetPrimairStreamIndexer(StreamType StreamType) { if (StreamType.Equals(StreamType.AchievedAchievement)) { return 2; } else if (StreamType.Equals(StreamType.EditedMotto)) { return 3; } else if (StreamType.Equals(StreamType.RatedRoom)) { return 1; } else if (StreamType.Equals(StreamType.MadeFriends)) { return 0; } return -1; }
// override object.Equals public override bool Equals(object obj) { // // See the full list of guidelines at // http://go.microsoft.com/fwlink/?LinkID=85237 // and also the guidance for operator== at // http://go.microsoft.com/fwlink/?LinkId=85238 // if (obj == null || GetType() != obj.GetType()) { return(false); } var other = obj as Stream; // TODO: write your implementation of Equals() here return(Category.EqualsTo(other.Category) && (StreamType == null || StreamType.Equals(other.StreamType)) && (Id == null || Id.Equals(other.Id))); }