Monday, September 16, 2013

Use mplayer to listen to audio only of a video file

Have you ever wanted to listen to the audio of a video file and not waste CPU cycles on the video? Here's how to do it with mplayer:
mplayer -vo null video.mkv
According to, this also works.
mplayer -novideo video.mkv

Tuesday, August 6, 2013

Latex spacing commands (double spacing and others)

To specify double spacing in Latex, you first include the package:
then use the following
For one and a half spacing

Sunday, February 3, 2013

How to extract the audio from video files using ffmpeg

Here's how to extract the audio portion of a video using ffmpeg:
    ffmpeg -i yourvideofile.mp4 -vn -ac 2 -ar 44100 -ab 320k -f mp3 audioonly.mp3
If you didn't want to reencode it in mp3, it's even simpler:
    ffmpeg -i yourvideofile.mp4 -vn -acodec copy audioonly.origformat
I do this for a lot of the videos on online education sites like Coursera.