ffmpeg works as advertised. First attempt failed without any indication as to what the error might be, I had attempted to create "C:\Beethoven.mp3". I had to run the same command string from the Windows "Run app" to discover the permission error, as ffmpeg could not create a file in the root of "C:".
Windows "flashes" the screen when ffmpeg runs, so I need to somehow suppress that? Any suggestions? (It's been awhile since my DOS days
)
Code:
Option Compare Database
Option Explicit
Dim strShell As String
Dim shellret As Variant
Private Sub PlayWav()
'*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
'
'*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
strShell = "c:\TMS\ffmpeg\ffplay.exe " & "C:\TMS\ffmpeg\Beethoven.mp3"
shellret = Shell(strShell, 4)
End Sub
Private Sub WavToMP3()
'*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
'
'*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
strShell = "c:\TMS\ffmpeg\ffmpeg.exe " & " -i C:\Beethoven.wav -ar 44100 -ac 2 -b:a 192k C:\TMS\ffmpeg\Beethoven.mp3"
shellret = Shell(strShell, 4)
End Sub
(PS) Beethoven.wav is just the first few bars of his 5th symphony. I've uploaded that snip to my iPhone and associated that ringtone with my mistress. Needless to say, that if I forget to set my phone to vibrate when I attend a meeting and she calls, everyone in the room knows who the idiot is
.