Returning A class Pair?

Here’s a condensed version of my code:

Var outputFile As FolderItem = soundsFolder.Child(“g” + uniqueID + “.mp3”)

Var outputFilePath As String = outputFile.NativePath

Var ffmpegCmd As String
ffmpegCmd = “/opt/homebrew/bin/ffmpeg -y -f avfoundation -i ":3" -t 5 -ac 1 -b:a 192k "” + outputFilePath + “"”

My app fails to build with the error message:

Type mismatch error. Expected String, but got class Pair
ffmpegCmd = “/opt/homebrew/bin/ffmpeg -y -f avfoundation -i ":3" -t 5 -ac 1 -b:a 192k "” + outputFilePath + “"”

Would anyone have an idea as to why that fourth line is returning a class Pair rather than a String?

Thanks!

add a \ before the two quotes after the -i
only one quote after 192k or you must \ before

the error message comes from the :3 the : means to declare a pair.

2 Likes

Thanks for the input, guys! It was much appreciated. I finally got it to work with this:

ffmpegCmd = “/opt/homebrew/bin/ffmpeg -y -f avfoundation -i “”:3"” -t 5 -ac 1 -b:a 192k “”" + outputFilePath + “”“”

1 Like

Please use the Preformatted text </> button when pasting code. :slightly_smiling_face:

1 Like

Sorry, didn’t mean to cause a ruckus. I’ll do better next time.