Example #1
0
        private Boolean checkAvs()
        {
            try
            {
                AviSynthScriptEnvironment environment = new AviSynthScriptEnvironment();

                AviSynthClip temp = environment.OpenScriptFile(EncOpts["avsfile"]);
                temp = null;
                return true;

            }
            catch (AviSynthException er)
            {
                LogBookController.Instance.addLogLine("Error checking AVS file: " + er.Message, LogMessageCategories.Error);
                MessageBox.Show("Error in AVS File: " + er.Message);
                return false;
            }
        }
Example #2
0
        public Boolean demux(SortedList<String, String[]> fileDetails, SortedList<String, Track[]> tracks)
        {
            LogBookController.Instance.addLogLine("Analysing AVS file", LogMessageCategories.Video);

            AviSynthScriptEnvironment environment = new AviSynthScriptEnvironment();
            AviSynthClip clip = environment.OpenScriptFile(fileDetails["fileName"][0]);
            fileDetails.Add("width", clip.VideoWidth.ToString().Split(Convert.ToChar("~")));
            fileDetails.Add("height", clip.VideoHeight.ToString().Split(Convert.ToChar(" ")));
            fileDetails.Add("avsfile", fileDetails["fileName"][0].Split(Char.Parse("\n")));
            fileDetails["fileName"][0] = getAvsSource(fileDetails["fileName"][0]);

            LogBookController.Instance.addLogLine("Retrieved source: " + fileDetails["fileName"][0], LogMessageCategories.Video);

            clip = null;
            environment = null;

            return true;
        }