How to merge sound and video in FFmpeg. This is very helpful sometimes.

To merge a Video file and an audio file, only FFmpeg is required. I needed the audio from one other video, I ripped it like this. ffmpeg -i Online-1.mp4 -vn -acodec copy output-audio.aacffmpeg -i Online-1.mp4 -vn -acodec copy output-audio.aac Then I could use this command to merge the aac audio with a silent video to … Read more

Create a nice spectrum display of an audio file. This is very easy to do.

Creating a very nice spectrum display of an audio file is very simple to do. The FFmpeg utility is the best way to generate such a useful audio waveform demonstration. This command will generate a 2560×1080 resolution waveform display of the file underground_01.ogg ffplay -f lavfi ‘amovie=undergrnd_01.ogg, asplit [a][out1]; [a] showspectrum=size=2560×1080:overlap=1:slide=scroll:scale=cbrt:legend=true,setdar=dar=21/9 [out0]’ffplay -f lavfi ‘amovie=undergrnd_01.ogg, … Read more

How to download a Youtube video as an MP3 with Linux.

Saving a Youtube video as audio and not video is very easy. This command below will save Youtube audio as an MP3 file. You need youtube-dl as well. Then select a Youtube video and use this one-liner to download it as an MP3 audio file. jason@jason-Lenovo-H50-55:~/Videos$ youtube-dl -f 140 https://www.youtube.com/watch?v=neEXAoYfcRo -o – | ffmpeg -hide_banner … Read more

Listen to music in the terminal and some other nice Linux tricks.

This nice command allows streaming some nice ambient drone music in the terminal with MPV. Very nice to listen to while doing other things. mpv http://ice.somafm.com/dronezone | sed -n "s/ icy-title: \(.*\)/\x1b[38;5;242m$(date +%T)\x1b[m | \1/p"mpv http://ice.somafm.com/dronezone | sed -n "s/ icy-title: \(.*\)/\x1b[38;5;242m$(date +%T)\x1b[m | \1/p" Play a Youtube video audio only, this is another way … Read more

Rip the audio from a video file the easy way with mplayer and convert it to an OGG file.

This post will show how to rip the audio from a video file to a wav and then convert that to an ogg file. This is very simple and easy to do. This long command will rip the audio from the file and save it in the out.wav file. localhost% mplayer -ao pcm:fast:file=out.wav -vo null … Read more

How to use mplayer to rip the sound from a video and create a wav file that you can encode with lame.

This is the command I just used to rip the audio from a movie and save it as a wav file. Then the lame command is used to encode the wav into an mp3 file. john@adeptus-mechanicus ~/Music $ mplayer -ao pcm:fast:file=out.wav -vo null -vc null video.mp4 && lame -h -b 320 out.wavjohn@adeptus-mechanicus ~/Music $ mplayer … Read more