- Downloaded
- 62.3 GB
- Uploaded
- 11.3 TB
- Ratio
- 186.26
- Seedbonus
- 1,067
- Upload Count
- 89 (104)
Member for 4 years
Managing multimedia files
Have you ever found an audio track you liked that was part of a video file, and you just wanted the audio? We can extract the audio from a video file and save it separately using the
Similarly, ffmpeg can convert one video type into another. This example converts an .avi file into an .mp4 video file:
* * * * *
Sometimes I encounter audio files which are difficult to hear due to having a very low volume. We can boost the audio output using the
What is your favourite audio or video editing command line trick?
Have you ever found an audio track you liked that was part of a video file, and you just wanted the audio? We can extract the audio from a video file and save it separately using the
You must be registered for see links
command line tool. This can be accomplished by passing the ffmpeg program the -i flag and the name of the original video file, followed by the name of the file where we will save our audio:The -i flag just lets ffmpeg know which of the files we are specifying is the original input file, in this case it is video.mp4.ffmpeg -i video.mp4 just-audio.mp3
Similarly, ffmpeg can convert one video type into another. This example converts an .avi file into an .mp4 video file:
Also, on the subject of ffmpeg, this tool can take screenshots for us from a video file. The following example takes one screenshot 12 minutes and 44 seconds into a video called family-trip.mp4. The image will be saved under the name family-snapshot.png.ffmpeg -i original.avi new-and-improved.mp4
ffmpeg -ss 12:44 -i family-trip.mp4 -frames 1 -f image2 family-snapshot.png
* * * * *
Sometimes I encounter audio files which are difficult to hear due to having a very low volume. We can boost the audio output using the
You must be registered for see links
command. The sox command will adjust volume up or down using the -v flag followed by a multiplier. The following example doubles (x2) the audio volume of a file.We can do the reverse, making a loud file softer by using a multiplier smaller than 1.0:sox -v 2.0 original-music.ogg louder-music.ogg
The sox command has other uses, for example it can be used to trim audio files. The following example extracts the sixty seconds from 1:30 to 2:30 in an audio file and saves this to a separate file. The new, shortened file is called just-a-minute.mp3.sox -v 0.25 original-music.ogg quieter-music.ogg
The sox package features a second tool called play, which can be used to play an audio file from the command line. This is handy for times when we are making adjustments to audio files and want to immediately test our output.sox original-music.mp3 just-a-minute.mp3 trim 1:30 60
play my-music.ogg
What is your favourite audio or video editing command line trick?