private async Task FF_ExternalAudioOpen(string audioSource)
        {
            try
            {
                string jsonOutput = await FFProbe.GetMediaInfo(audioSource);

                using JsonDocument jsonDocument = JsonDocument.Parse(jsonOutput);
                JsonElement streamsElement     = jsonDocument.RootElement.GetProperty("streams");
                JsonElement audioStreamElement = new JsonElement();

                // Find first audio stream
                for (int i = 0; i < streamsElement.GetArrayLength(); i++)
                {
                    if (streamsElement[i].GetProperty("codec_type").GetString() == "audio")
                    {
                        audioStreamElement = streamsElement[i];
                        break;
                    }
                }

                AudioTrack audioTrack = AudioTrack.FromJson(audioStreamElement);
                audioTracks        = new AudioTrack[] { audioTrack };
                ExternalAudioCodec = audioTrack.Codec;
                Size += audioTrack.Size;
            }
            catch (Exception)
            {
                // Since it's not possible to create a Window from this thread, every exception is rethrown; whoever called this method will have to show the user the error
                throw;
            }
        }
        private async Task <ColorInfo> GetColorInfo(string source)
        {
            string jsonOutput = await FFProbe.GetColorInfo(source).ConfigureAwait(false);

            JsonElement element = JsonDocument.Parse(jsonOutput).RootElement;

            element = element.GetProperty("frames")[0];
            return(ColorInfo.FromJson(element));
        }
        private async Task FF_Open(string source)
        {
            try
            {
                string jsonOutput = await FFProbe.GetMediaInfo(source);

                await Task.Run(() => ParseJson(jsonOutput)).ConfigureAwait(false);

                ColorInfo = await GetColorInfo(source);
            }
            catch (Exception)
            {
                // Since it's not possible to create a Window from this thread, every exception is rethrown; whoever called this method will have to show the user the error
                throw;
            }
        }