VideoAudioFix

From CyberOne Wiki
Jump to navigation Jump to search

How to improve the sound of a videofile

I have been watching the videos from the lectures with great interest, but the sound recording seems to be a bit problematic. The volume level varied a lot through the recordings, so I have made a quick fix for the first lecture, amplifying the quiet parts and normalizing the volume. You can find my edit at http://julipan.blip.tv/ but please note that I am not a good sound engineer and the result could be a lot better if I knew better what I was doing. Below is an explanation of how I went about in case anyone is interested in the editing other lectures.

The (suggestions for) instructions

Requirements:
  • Mplayer
  • ffmpeg
  • Audacity, levelator or other sound editing software
  • the codecs (if you can view the movie you probably have them)
  • a command line terminal, preferrably a GNU one...
  • the video files (can be downloaded from cyberone.blip.tv by pressing the export button below the streaming movie - choose the mp4 files, not the flv ones)


Step one; extract the audio from the videofile with mplayer:

mplayer -vc null -vo null -ao pcm CyberOne01.mp4

This will create a file containing sound only called audiofile.wav


Step two; edit the audiofile

Import it with a sound editing program like Audacity where you have a graphical view of the audio. Select all the areas with low volume and use the "amplify" filter on them. Select All (Ctrl-A) and use the "normalize"-filter. When you are finished with editing the audio, export it as another wav-file.



Alternative editing suggestion for step two:

Use Gigavox's levelator, a non-free but gratis one-step compressor, normalizer and limiter. Just drop the extracted .wav file from step one into the levelator window and use the output file in step three. A real time-saver ..and sounds great! (Note: only Windows & Macintosh, no Linux version yet) -- hr



Step three; mix together the video track and the new audio track with ffmpeg

ffmpeg -i CyberOne01.mp4 -i audiofile01_normalized.wav -map 0.0 -map 1.0 CyberNormal01.mp4

That's it.. upload the files and share alike ;-)

peace, Stian