Difference between revisions of "VideoAudioFix"

From CyberOne Wiki
Jump to navigation Jump to search
m (just a minute)
 
(The howto first version is complete)
Line 1: Line 1:
How to improve the sound of a videofile
+
== How to improve the sound of a videofile ==
I have been watching the videos from the lectures with great interest, but there seems to have been some trouble with the sound; the volume level varied a lot through the recordings.
 
  
Requirements:
+
I have been watching the videos from the lectures with great interest, but there seems to have been some trouble with the sound. 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.
- Mplayer
 
- ffmpeg
 
- the codecs (if you already can view the movie, then you only need vorbis)
 
- 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:
+
==== The (suggestions for) instructions ====
  
mplayer -vc null -vo null -ao pcm CyberOne01.mp4
+
=====Requirements:=====
 +
* [http://www.mplayerhq.hu Mplayer]
 +
* [http://ffmpeg.mplayerhq.hu ffmpeg]
 +
* [http://audacity.sourceforge.net Audacity] or other sound editing software
 +
* the codecs (if you can view the movie you probably have them)
 +
* a command line terminal, preferrably a [http://www.gnu.org GNU] one...
 +
* the video files (can be downloaded from [http://cyberone.blip.tv cyberone.blip.tv] by pressing the export button below the streaming movie - choose the mp4 files, not the flv ones)
  
This will create a file containing the sound only called audiofile.wav
 
  
 +
'''Step one;''' extract the audio from the videofile with mplayer:
  
Step two; edit the audiofile
+
<pre>mplayer -vc null -vo null -ao pcm CyberOne01.mp4</pre>
 +
 
 +
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.
 
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.
 
When you are finished with editing the audio, export it as another wav-file.
  
  
Step three; mix together the video track with the new audio track with ffmpeg
+
''''Step three;'''' mix together the video track with the new audio track with ffmpeg
 +
 
 +
<pre>ffmpeg -i CyberOne01.mp4 -i audiofile01_normalized.wav -map 0.0 -map 1.0 CyberNormal01.avi</pre>
 +
 
 +
That is it...
  
ffmpeg -i CyberOne02.mp4 -i audiofile01_normalized.wav -map 0.0 -map 1.0 CyberNormal02b.avi
+
peace,
 +
Stian

Revision as of 01:28, 22 September 2006

How to improve the sound of a videofile

I have been watching the videos from the lectures with great interest, but there seems to have been some trouble with the sound. 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 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.


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

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

That is it...

peace, Stian