Fixed audio compatibility check, improved lossless audio transfer

This commit is contained in:
N00MKRAD
2021-03-24 14:40:01 +01:00
parent b0e5cbdf1c
commit 115cff131e
3 changed files with 49 additions and 21 deletions

View File

@@ -197,6 +197,7 @@ namespace Flowframes
public static string GetAudioCodec(string path, int streamIndex = -1)
{
Logger.Log($"GetAudioCodec('{Path.GetFileName(path)}', {streamIndex})", true, false, "ffmpeg");
string stream = (streamIndex < 0) ? "a" : $"{streamIndex}";
string args = $"-v panic -show_streams -select_streams {stream} -show_entries stream=codec_name {path.Wrap()}";
string info = GetFfprobeOutput(args);
@@ -212,6 +213,7 @@ namespace Flowframes
public static List<string> GetAudioCodecs(string path, int streamIndex = -1)
{
Logger.Log($"GetAudioCodecs('{Path.GetFileName(path)}', {streamIndex})", true, false, "ffmpeg");
List<string> codecNames = new List<string>();
string args = $"-loglevel panic -select_streams a -show_entries stream=codec_name {path.Wrap()}";
string info = GetFfprobeOutput(args);