This is considered a Dangerous Send.
You should be doing something like
input_filepath = “/Users/username/Downloads/init.mp3”
output_filepath = “/Users/username/Downloads/out.mp3”
system(“ffmpeg”, “-y”, “-i”, input_filepath, “-vn”, “-qscale:a”, “4”, output_filepath)
Using `system` will return true if it executed correctly, otherwise it will return false.
The example of this output is (i don’t have avconv on my computer so I changed it to ffmpeg for my case)
ffmpeg version 3.3.3 Copyright © 2000–2017 the FFmpeg developers
built with Apple LLVM version 8.1.0 (clang-802.0.42)
configuration: — prefix=/usr/local/Cellar/ffmpeg/3.3.3 — enable-shared — enable-pthreads — enable-gpl — enable-version3 — enable-hardcoded-tables — enable-avresample — cc=clang — host-cflags= — host-ldflags= — enable-libmp3lame — enable-libx264 — enable-libxvid — enable-opencl — disable-lzma — enable-vda
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
Input #0, mp3, from ‘/Users/username/Downloads/init.mp3’:
Metadata:
encoder : Lavf57.56.100
Duration: 00:03:36.66, start: 0.025057, bitrate: 246 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16p, 246 kb/s
Metadata:
encoder : Lavc57.64
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to ‘/Users/username/Downloads/out.mp3’:
Metadata:
TSSE : Lavf57.71.100
Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, stereo, s16p
Metadata:
encoder : Lavc57.89.100 libmp3lame
size= 3849kB time=00:03:36.63 bitrate= 145.6kbits/s speed=68.4x
video:0kB audio:3849kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.006419%
=> true