Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a sample mp3 with fade

I need to know if it is possible to create a 30 second sample MP3 from a WAV file. The generated MP3 file must feature a fade at the start and end.

Currently using ffmpeg, but can not find any documentation that would support being able to do such a thing.

Could someone please provide me the name of software (CLI, *nix only) that could achieve this?

like image 947
tombazza Avatar asked Sep 15 '09 12:09

tombazza


People also ask

How can you apply fade-in effect to an audio track?

Open your audio file in Adobe Audition. In the workspace window locate the two boxes at the start and end of the audio. These are the Fade In and Fade Out. To fade the audio in, click and drag the Fade In box along the audio timeline.

How do I fade music in audacity?

Fade In/Fade Out After highlighting and selecting a piece of audio, choose Fade in or Fade out from the Effects menu and Audacity will taper off the sound for Fade Out or bring up the volume for Fade Out.


2 Answers

This will

  • trim out from Position 45 sec. the next 30 seconds (0:45.0 30) and
  • fade the first 5 seconds (0:5) and the last 5 seconds (0 0:5) and
  • convert from wav to mp3

    sox infile.wav outfile.mp3 trim 0:45.0 30 fade h 0:5 0 0:5
    
like image 194
Roy Licht Avatar answered Oct 01 '22 19:10

Roy Licht


Check out SoX - Sound eXchange

I have not used it myself but one of my friends speaks highly of it.

From web page (highlighted my me):

SoX is a cross-platform (Windows, Linux, MacOS X, etc.) command line utility that can convert various formats of computer audio files in to other formats. It can also apply various effects to these sound files, and, as an added bonus, SoX can play and record audio files on most platforms.

like image 23
Nifle Avatar answered Oct 01 '22 21:10

Nifle