internal override QueryParameters ToQueryParameters(bool forPersistingTransientUpdates = false)
        {
            var queryParameters = base.ToQueryParameters();

            if (!string.IsNullOrEmpty(LoanTemplate))
            {
                queryParameters.Add("appendData", AppendData.ToString().ToLower());
            }
            if (Persistent.HasValue && !forPersistingTransientUpdates)
            {
                queryParameters.Add("persistent", Persistent.ToString().ToLower());
            }
            return(queryParameters);
        }
Beispiel #2
0
    //------------------------------

    public static void AppendFull(AppendData config)
    {
        //ffmpeg - i .../input1.mp4 - i .../input2.webm \
        //-filter_complex "[0:v:0] [0:a:0] [1:v:0] [1:a:0] concat=n=2:v=1:a=1 [v] [a]" \
        //-map "[v]" - map "[a]" < encoding options > .../output.mkv -y
        List <string> cmd    = new List <string>();
        StringBuilder filter = new StringBuilder();

#if UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN || UNITY_EDITOR
        filter.Append(DOUBLE_QUOTE);
#endif
        for (int i = 0; i < config.inputPaths.Count; ++i)
        {
            cmd.Add(INPUT_INSTRUCTION);
            cmd.Add(config.inputPaths[i]);

            filter.Append(string.Format(VIDEO_FORMAT, i)).Append(string.Format(AUDIO_FORMAT, i));
        }

        filter.
        Append(string.Format(CONCAT_FORMAT, CONCAT_INSTRUCTION, config.inputPaths.Count)).
        Append(SEPARATOR).
        Append(VIDEO_INSTRUCTION).
        Append(SEPARATOR).
        Append(AUDIO_INSTRUCTION);
#if UNITY_STANDALONE_OSX || UNITY_STANDALONE_WIN || UNITY_EDITOR
        filter.Append(DOUBLE_QUOTE);
#endif

        cmd.Add(FILTER_COMPLEX_INSTRUCTION);
        cmd.Add(filter.ToString());
        cmd.Add(MAP_INSTRUCTION);
        cmd.Add(VIDEO_INSTRUCTION);
        cmd.Add(MAP_INSTRUCTION);
        cmd.Add(AUDIO_INSTRUCTION);
        cmd.Add(PRESET_INSTRUCTION);
        cmd.Add(ULTRASAFE_INSTRUCTION);
        cmd.Add(config.outputPath);
        cmd.Add(REWRITE_INSTRUCTION);

        string[] command = cmd.ToArray();

        DebugCommand(command);

        Wrapper.Execute(command);
    }
Beispiel #3
0
    //------------------------------

    public static void AppendFast(AppendData config)
    {
        //-f concat -safe 0 -i .../mylist.txt -c copy .../output.mp4 -y
        string[] command =
        {
            FILE_FORMAT_INPUT_INSTRUCTION,
            CONCAT_INSTRUCTION,
            SAFE_INSTRUCTION,
            ZERO_INSTRUCTION,
            INPUT_INSTRUCTION,
            GetInputsFile(config.inputPaths),
            C_CODEC_INSTRUCTION,
            COPY_INSTRUCTION,
            config.outputPath,
            REWRITE_INSTRUCTION
        };

        DebugCommand(command);

        Wrapper.Execute(command);
    }