Beispiel #1
0
        public override void Initialize(object config, string outPath)
        {
            m_config = (fcAPI.fcMP4Config)config;
            m_config.audioSampleRate  = AudioSettings.outputSampleRate;
            m_config.audioNumChannels = fcAPI.fcGetNumAudioChannels();

            var path = outPath + ".mp4";

            m_ctx = fcAPI.fcMP4OSCreateContext(ref m_config, path);
        }
        public override void Initialize(object config, string outPath)
        {
            if (!fcAPI.fcMP4OSIsSupported())
            {
                Debug.LogError("MP4 encoder is not available on this platform.");
                return;
            }

            m_config = (fcAPI.fcMP4Config)config;
            m_config.audioSampleRate  = AudioSettings.outputSampleRate;
            m_config.audioNumChannels = fcAPI.fcGetNumAudioChannels();

            var path = outPath + ".mp4";

            m_ctx = fcAPI.fcMP4OSCreateContext(ref m_config, path);
        }
        public override void Initialize(MovieRecorder recorder)
        {
            m_config = recorder.mp4Config;
            fcAPI.fcMP4Config mp4conf = fcAPI.fcMP4Config.default_value;
            mp4conf                        = fcAPI.fcMP4Config.default_value;
            mp4conf.video                  = m_config.captureVideo;
            mp4conf.audio                  = m_config.captureAudio;
            mp4conf.video_width            = recorder.scratchBuffer.width;
            mp4conf.video_height           = recorder.scratchBuffer.height;
            mp4conf.video_target_framerate = 60;
            mp4conf.video_target_bitrate   = m_config.videoBitrate;
            mp4conf.audio_target_bitrate   = m_config.audioBitrate;
            mp4conf.audio_sample_rate      = AudioSettings.outputSampleRate;
            mp4conf.audio_num_channels     = fcAPI.fcGetNumAudioChannels();

            var path = recorder.outputDir.GetFullPath() + "/" + DateTime.Now.ToString("yyyyMMdd_HHmmss") + ".mp4";

            m_ctx = fcAPI.fcMP4OSCreateContext(ref mp4conf, path);
        }