Пример #1
0
        private void DoDemux(EncodeInfo job)
        {
            Eac3To eac3Toenc = new Eac3To();
            FfMpeg ffmpeg    = new FfMpeg();

            switch (job.Input)
            {
            case InputType.InputBluRay:
            case InputType.InputAvchd:
            case InputType.InputHddvd:
                eac3Toenc.SetJob(job);
                _worker.DoWork += eac3Toenc.DoDemux;
                Log.Info("eac3toEncoder.DoDemux()");
                break;

            case InputType.InputDvd:
            case InputType.InputAvi:
            case InputType.InputFlash:
            case InputType.InputMp4:
            case InputType.InputWm:
            case InputType.InputMatroska:
            case InputType.InputMpegps:
            case InputType.InputTs:
            case InputType.InputOgg:
            case InputType.InputWebM:
                ffmpeg.SetJob(job);
                _worker.DoWork += ffmpeg.DoDemux;
                Log.Info("ffmpegEncoder.DoDemux()");
                break;
            }
        }
Пример #2
0
        private void GetCropRect(EncodeInfo job)
        {
            FfMpeg ffmpeg = new FfMpeg();

            ffmpeg.SetJob(job);
            _worker.DoWork += ffmpeg.GetCrop;
            Log.Info("ffmpegEncoder.GetCropRect()");
        }
Пример #3
0
        private void DoEncodeAudio(EncodeInfo job)
        {
            FfMpeg     ffmpeg = new FfMpeg();
            OggEnc     oggEnc = new OggEnc();
            Lame       lame   = new Lame();
            NeroAACEnc aacEnc = new NeroAACEnc();

            switch (job.AudioProfile.Type)
            {
            case ProfileType.AC3:
                ffmpeg.SetJob(job);
                _worker.DoWork += ffmpeg.DoEncodeAc3;
                Log.Info("ffmpeg.DoEncodeAC3()");
                break;

            case ProfileType.OGG:
                oggEnc.SetJob(job);
                _worker.DoWork += oggEnc.DoEncode;
                Log.Info("oggenc.DoEncode()");
                break;

            case ProfileType.AAC:
                aacEnc.SetJob(job);
                _worker.DoWork += aacEnc.DoEncode;
                Log.Info("NeroAacEnc.DoEncode()");
                break;

            case ProfileType.MP3:
                lame.SetJob(job);
                _worker.DoWork += lame.DoEncode;
                Log.Info("lame.DoEncode()");
                break;

            case ProfileType.Copy:
                if (job.EncodingProfile.OutFormat == OutputType.OutputDvd &&
                    !Processing.CheckAudioDvdCompatible(job.AudioStreams[job.StreamId]))
                {
                    ffmpeg.SetJob(job);
                    _worker.DoWork += ffmpeg.DoEncodeAc3;
                    Log.Info("ffmpeg.DoEncodeAC3()");
                }
                break;
            }
        }