En el programa Splitter [1] que separa el sonido del audio y los vuelve a juntar supongo que debo haber tenido algun problema similar porque uso
Exec en lugar de
Shell, por ejemplo uso estas sentencias.
[1]
https://gambas-es.org/showthread.php?tid...t=splitter
Código:
Public Sub NSplit(sFile As String)
Dim sDir As String
Dim sCmd As String
Dim sKill As Variant
aFiles.clear
If Exist(sFile) Then
If Lower(File.Ext(Dialog.Path)) = "mp4" Then
Inc Application.Busy
sDir = File.Dir(sFile)
sAudio = sDir &/ "audio.mp3"
sMute = sDir &/ "mute.mp4"
sOutput = sDir &/ "denoise.mp4"
For Each sKill In [sAudio, sMute, sOutput]
If Exist(sKill) Then
Shell "rm -f '" & sKill & "'" Wait
Endif
Next
Exec ["ffmpeg", "-i", sFile, "-c", "copy", "-an", sMute] Wait For Read As "Job"
aFiles.Add(sMute)
Exec ["ffmpeg", "-i", sFile, "-map", "0:a", sAudio] Wait For Read As "Job"
aFiles.Add(sAudio)
Dec Application.Busy
If Message.Question(("Audio track was extracted") & gb.NewLine & ("Do you want to open it?"), ("Yes"), ("Cancel")) = 1 Then
Shell "audacity " & sAudio
Endif
Endif
Endif
End
Y para unir:
Código:
Private Function NJoin() As String
If Exist(aFiles[0]) And Exist(aFiles[1]) Then
Exec ["ffmpeg", "-i", aFiles[0], "-i", aFiles[1], "-c:v", "copy", "-c:a", "mp3", sOutput] Wait For Read As "Job"
Endif
End