How to Convert mp4 file into mp3 file using ffmpeg in Windows 10

Posted on

This is an article where the content is about how to convert a file with mp4 extension into another file with mp3 extension. The main purpose is just to have an audio file with an mp3 format from a video file with an mp4 format. The conversion process exist in Windows 10 operating system using the ‘ffmpeg’ tool’. Just download the proram by searching it from google. In other way, just access the following link which is providing every format for ffmpeg installation. In Windows 10, just download the ffmpeg build suitable form Windows operating system. After that, make sure that, ffmpeg tool is available for further execution in the ‘bin’ folder of the ffmpeg build folder location. The following is the simple command pattern for conversing the mp4 file format to an mp3 file format :

ffmpeg.exe -i mp4_file_name_location_and_full_name.mp4 mp3_file_name_location_and_full_name.mp3

The following is the process of converting the mp4 file to an mp3 file :

C:\ffmpeg-20200412-f1894c2-win64-static\ffmpeg-20200412-f1894c2-win64-static\bin>ffmpeg.exe -i "C:\Users\temp\my-video.mp4" audio.mp3
ffmpeg version git-2020-04-12-f1894c2 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.1 (GCC) 20200328
  configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
  libavutil      56. 42.102 / 56. 42.102
  libavcodec     58. 78.102 / 58. 78.102
  libavformat    58. 42.100 / 58. 42.100
  libavdevice    58.  9.103 / 58.  9.103
  libavfilter     7. 77.101 /  7. 77.101
  libswscale      5.  6.101 /  5.  6.101
  libswresample   3.  6.100 /  3.  6.100
  libpostproc    55.  6.100 / 55.  6.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'C:\Users\temp\my-video.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp41isom
    creation_time   : 2020-05-14T13:43:29.000000Z
    artist          : xxxxxxxxxxxxxxxxxxxxxxx
    title           : xxxxxxxxxxx
  Duration: 00:29:39.07, start: 0.000000, bitrate: 9621 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1920x988 [SAR 1:1 DAR 480:247], 9494 kb/s, 30 fps, 60 tbr, 30k tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : 2020-05-14T13:43:29.000000Z
      handler_name    : VideoHandler
      encoder         : AVC Coding
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 115 kb/s (default)
    Metadata:
      creation_time   : 2020-05-14T13:43:29.000000Z
      handler_name    : SoundHandler
Stream mapping:
  Stream #0:1 -> #0:0 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
Output #0, mp3, to 'audio.mp3':2:22.77 bitrate=  -0.0kbits/s speed=N/A
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp41isom
    TIT2            : xxxxxxxxxxx
    TPE1            : xxxxxxxxxxxxxxxxxxxxxxx
    TSSE            : Lavf58.42.100
    Stream #0:0(und): Audio: mp3 (libmp3lame), 48000 Hz, stereo, fltp (default)
    Metadata:
      creation_time   : 2020-05-14T13:43:29.000000Z
      handler_name    : SoundHandler
      encoder         : Lavc58.78.102 libmp3lame
size=   27799kB time=00:29:39.07 bitrate= 128.0kbits/s speed=1.67x
video:0kB audio:27798kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.001349%
C:\ffmpeg-20200412-f1894c2-win64-static\ffmpeg-20200412-f1894c2-win64-static\bin>

Finally, according to the above command execution, the execution of the command in order to convert the mp4 file format into the mp3 file format is a success. Furthermore, according to the output of the command execution, the mp4 file bhas a bitrate of 128.0kbits/s.

Leave a Reply