Sunday, November 4, 2012

How To Extract Audio From Video Using MPlayer Under Ubuntu/Linux Mint



In this tip, we will see how to use MPlayer in the terminal to extract audio from video files. You can save the extracted audio track in various sound formats such as MP3, OGG, WAV, etc.

Getting Started

Under Ubuntu/Linux Mint, open the terminal and run this command to install MPlayer:


sudo apt-get -y install mplayer

Via the terminal, use the cd command to access the folder containing your video file and run this command:

mplayer -vo null -dumpaudio -dumpfile audio.mp3 video.avi

or

mplayer -ao pcm:fast:file=audio.mp3 -vo null -vc null video.avi

audio.mp3 >>> replace it with any name of your choice followed by the desired audio format (wav, ogg, etc.)

video.avi >>> replace it with your own video file followed by the video extension

The audio file generated will be saved in the current folder location.

How To Record Videos Without Microphone or System Audio With RecordMyDesktop - Ubuntu/Linux Mint



In this tip, we will see how to configure RecordMyDesktop to not record audio coming from your microphone or system.

Gettinsg Strated

1. Open the terminal and install first the "pavucontrol" package with this command:


sudo apt-get install pavucontrol

2. Launch now RecordMyDesktop and start recording a video.

3. While RecordMyDesktop is recording, start pavucontrol with this command:

 pavucontrol

4. In the "Recording" tab, click the dropdown menu and select "Monitor of Built-in Audio Analog Stereo":



From now on, RecordMyDesktop will record videos without sound.

Note: this configuration doesn't affect other installed applications.

How To Clone And Backup Your Hard Disks/USB Drives/CDs & DVDs In Ubuntu 12.10/12.04/Linux Mint 13


In this tutorial, we will see how to clone hard disks, USB keys, CDs/DVDs, etc. in a system running Ubuntu/Linux Mint. There are many tools for copying data under Ubuntu, but in this article we will see only two.

1. Mondo Rescue

Mondo Rescue is a command line utility that allows users to backup/restore from/to hard disk partitions, usb flash drives, CD-R/RW disks, DVD disks, etc. To install Mondo Rescue in Ubuntu 12.10/12.04 or Linux Mint 13, open the terminal and run these commands:


wget ftp://ftp.mondorescue.org/ubuntu/`lsb_release -r|awk '{print $2}'`/mondorescue.sources.list
sudo sh -c "cat mondorescue.sources.list >> /etc/apt/sources.list" 
sudo apt-get update 
sudo apt-get install mondo

To start it, run this command:

sudo mondoarchive

Select now the media where you want to store your data:


Then follow backup instructions.

2. Clone Disks with the DD Command

You can also use the dd command line utility to backup your disks. Here are some examples:

- To clone a partition to another parition, use this command:

dd if=/dev/sda1 of=/dev/sda2 bs=4096 conv=noerror

- To copy a whole disk to another disk, use this command:

dd if=/dev/sda1 of=/dev/sda3 bs=1M conv=noerror

- If you want to copy your partition to an image file, use this command:

dd if=/dev/sda2 of=/path/to/backup-file.iso bs=4096 conv=noerror

- To copy a CD, run this command:

dd if=/dev/cdrom of=/path/to/backup-file.iso

- To copy a DVD, use this command:

dd if=/dev/dvd of=/path/to/backup-file.iso

Friday, November 2, 2012

Copy files on Linux shell that have been modified or added within the last X minutes



Here is a short script that helped me to copy files that have ben modified within the last 60 minutes to a new directory. The script uses a combination of the find and cp commands, it has to be run inside the directory that contains the new files.  In this example, I will copy all files that have been modified within the last 60 minutes from /var/www to the directory /var/newfiles, you can replace the timespan or target directory in the script to match your reqzĂșirements.
First, enter the /var/www directory which contains the files:
cd /var/www
Then execute this command to find the latest files and copy them to /var/newfiles:
find ./ -type f -mmin -60  -exec cp -pf {} /var/newfiles/ \;

Tiny Core Linux 4.7


Robert Shingledecker has released version 4.7 of Tiny Core Linux, a minimalist but extensible graphical Linux distribution for desktop computers. From the release announcement: "I am pleased to announce the release of Core 4.7. Change log: updated ondemand to support scm extensions and icons from both tcz and scm; updated wbar - to support scm ondemand icons; updated scmapps GUI for new ondemand maintenance and download option; updated scm-load - new option -wo ondemand download; updated tc-functions - added new support functions; updated scm to interface to updated scmaps GUI; new scm-run to support scriptable load and launch scm style extensions; updated filetool - new GUI access to filetool.lst, .xfiletool.lst, and backup options; updated filetool.sh to interface to updated filetool GUI; updated apps GUI - New Check Onboot Unneeded and changes required by ondemand scm support...." Download links: TinyCore-4.7.iso (12.0MB, MD5), CorePlus-4.7.iso (66.0MB, MD5).

Thunar Dropbox: Enable Dropbox Context Menu on Thunar File Manager



I have written about step-by-step post on how to get Dropbox "Copy Public Link" works on Thunar File Manager. I have found easier way to do that by installing Thunar Dropbox. Thunar Dropbox is a plugin for Thunar file manager which adds Dropbox context-menu.



Unfortunately, the plugin doesn't come with Dropbox itself and there is no PPA or any repository yet. So you have to download and compile it manually to get things done. So, please follow this guide to install Thunar Dropbox on your system. I assume that you have installed and configured Dropbox properly. Grab the ZIP archive of Thunar Dropbox here. Once downloaded, extract the file and open Terminal.

Installing dependencies
  • sudo apt-get install libthunarx-2-dev

Now, it's time to compile Thunar Dropbox:
  • ./waf configure --prefix=/usr
  • ./waf build
  • sudo ./waf install
Thunar Dropbox uses Python 2 as its interpreter. So, please make sure to use Python 2 when compiling.

Once installed, login and log out back in order to change to takes effect.

This plugin has been tested on Xubuntu 12.10 Quantal Quetzal and everything looks well :)