After downloading the video, I ended up with a file named My_Chemical_Romance_-_Famous_Last_Words.flv.
Once you have downloaded the video, just for the sake of interest, lets find out the audio quality of this You Tube audio video.
The ffmpeg documentation does not tell us about a switch which would just output the audio parameters of the input file. After experimenting a little with the ffmpeg tool, it can be found that by just specifying ‘-i’ switch and the input video file, the ffmpeg will output input streams information and quit.
Here is an example of how it looks:
c:\> ffmpeg.exe -i My_Chemical_Romance_-_Famous_Last_Words.flv
Seems that stream 1 comes from film source: 1000.00 (1000/1) -> 24.00 (24/1)
Input #0, flv, from ‘My_Chemical_Romance_-_Famous_Last_Words.flv’:
Duration: 00:04:27.4, start: 0.000000, bitrate: 64 kb/s
Stream #0.0: Audio: mp3, 22050 Hz, mono, 64 kb/s
Stream #0.1: Video: flv, yuv420p, 320×240, 24.00 fps(r)
Must supply at least one output file
From this information (2nd line in bold) we can read that the audio bitrate of a YouTube video is 64kbit/s, sampling rate is 22050Hz, the encoding is mp3, and it’s a mono audio.
You will be surprised how easy it is to extract the audio part as it is in the video. By just typing:
c:\> ffmpeg.exe -i My_Chemical_Romance_-_Famous_Last_Words.flv famous_last_word.mp3
the ffmpeg tool will extract it to an mp3 audio file!
That’s it! After running this command you should have ‘famous_last_words.mp3‘ file in the same folder/directory where the downloaded video file was!
We can go a little further and look up various audio switches on the documentation of ffmpeg. For example, if we had some fancy alarm clock which can be stuffed an mp3, you might not need the whole 64kbit/s of bitrate. You might want to convert the audio to a lower bitrate, say 32kbit/s.
The Section 3.5 - Audio Options of the ffmpeg documentation says:
`-ab bitrate‘ - Set the audio bitrate in bit/s (default = 64k).
So, by specifying a command line switch ‘-ab 32k‘ the audio will be converted to a lower bitrate of 32kbit/s.
Here is the example of running this command:
c:\> ffmpeg.exe -i My_Chemical_Romance_-_Famous_Last_Words.flv -ab 32k famous_last_word.32kbit.mp3
[...]
Seems that stream 1 comes from film source: 1000.00 (1000/1) -> 24.00 (24/1)
Input #0, flv, from 'My_Chemical_Romance_-_Famous_Last_Words.flv':
Duration: 00:04:27.4, start: 0.000000, bitrate: 64 kb/s
Stream #0.0: Audio: mp3, 22050 Hz, mono, 64 kb/s
Stream #0.1: Video: flv, yuv420p, 320x240, 24.00 fps(r)
Output #0, mp3, to ‘famous_last_word.32kbit.mp3′:
Stream #0.0: Audio: mp3, 22050 Hz, mono, 32 kb/s
Stream mapping:
Stream #0.0 -> #0.0
size= 1045kB time=267.6 bitrate= 32.0kbits/s
video:0kB audio:1045kB global headers:0kB muxing overhead 0.000000%
The line in bold indicates that the output audio indeed was at a bitrate of 32kbit/s.
Some other things you can do are - changing the codec of the audio (-acodec option (find all codecs with -formats option)) or cut out a part of the audio (-t and -ss options) you are interested in.
This technique actually involved re-encoding the audio which was already in the movie file. If you read closely the audio option documentation, you will find that the -acodec option says:
`-acodec codec’ - Force audio codec to codec. Use the copy special value to specify that the raw codec data must be copied as is.
If the input video file was from YouTube or it already had mp3 audio stream, then using the following command line, the audio will be extracted much, much faster:
c:\> ffmpeg.exe -i My_Chemical_Romance_-_Famous_Last_Words.flv -acodec copy famous_last_words.mp3
source:http://www.catonmat.net/blog/how-to-extract-audio-tracks-from-youtube-videos/
STumbling In Linux Land, STupid and Unlucky Pablo? The tribulations and happy discoveries of a Linux former Newbie, now bit more experienced user
Saturday, January 31, 2009
Wednesday, January 21, 2009
Add Applications to the Startup Programs
Ubuntu:
By adding an application to the Startup Programs, that application will automatically run once Ubuntu has finished booting. This is quite useful for applications such as Gmail Notifier that have a small footprint but provide a useful function to the user.
1. Click System, mouseover Preferences and select Sessions.
2. Under the Startup Programs, click the Add button.
3. Input the Name and the Command that executes the desired application in the appropriate text boxes. If you aren’t sure of the command, click the Browse button and go to the executable. For example, the command you would input for the Gmail Notifier is gmail-notify.
4. Click OK.
5. Click the Close button to exit the Sessions window.
Another way to access iso files
An ISO file is an image of a CD or DVD. You can access the files contained within the ISO (without installing any software or having to burn the image to disc) by mounting the image and unmount the image when you are done with it. Here’s how:
1. Open a terminal window.
2. You will need to create a new directory for your ISO image. Execute the following command in your terminal window:sudo mkdir /media/iso
3. Now execute this command to mount the ISO image:sudo mount -o loop /home/shamanstears/Documents/test.iso
Make sure to change the path in the above command to the path of the desired ISO file.
4. Close the terminal window.
5. Go to the Ubuntu Main Menu.
6. Click Places and select iso.
7. The file browser will open, displaying the contents of the ISO image.
To unmount the file, use this command in a terminal window:sudo umount /media/iso/
source: http://www.tech-recipes.com/rx/2747/ubuntu_how_to_mount_unmount_iso_files/
1. Open a terminal window.
2. You will need to create a new directory for your ISO image. Execute the following command in your terminal window:sudo mkdir /media/iso
3. Now execute this command to mount the ISO image:sudo mount -o loop /home/shamanstears/Documents/test.iso
Make sure to change the path in the above command to the path of the desired ISO file.
4. Close the terminal window.
5. Go to the Ubuntu Main Menu.
6. Click Places and select iso.
7. The file browser will open, displaying the contents of the ISO image.
To unmount the file, use this command in a terminal window:sudo umount /media/iso/
source: http://www.tech-recipes.com/rx/2747/ubuntu_how_to_mount_unmount_iso_files/
Friday, January 16, 2009
Working with virtual cdroms
The most handy gui tool for mounting and handling iso's in Ubuntu is gmount-iso (install via Add/RemoveApplications). You can choose the mount too. Limitations to comparable MS software like Alcohol 120 % and UltraIso is the limitations to the kind of images that are recognized so not .nrg (Nero)or clone cd images. To install as a conversion tool in Wine UltraIso is better suited than Alcohol, according to Wine APPdb
Tuesday, January 13, 2009
AcetoneISO, virtual cdrom in Ubuntu
AcetoneISO, you can convert : .bin, .mdf, .nrg , .img , .daa , .cdi , .xbx , .b5i , .bwi , .pdi to .iso and then mount them easily. For more infos, you can check out : http://doc.ubuntu-fr.org/acetoneiso , I know, it's in french, but the commands are still the same. You just need to have before installing : kommander, kdebase-bin, kdelibs4c2a, konsole, konqueror, p7zip and fuseiso. For the ones like me who'd like to mount their isos.
Downloadlink for deb: linkhttp://downloads.sourceforge.net/acetoneiso2/acetoneiso2_2.0.2-20080602_i386.deb?use_mirror=osdn
Downloadlink for deb: linkhttp://downloads.sourceforge.net/acetoneiso2/acetoneiso2_2.0.2-20080602_i386.deb?use_mirror=osdn
Thursday, December 18, 2008
Sun PDF Import Adds PDF Editing to OpenOffice
Sun PDF Import Adds PDF Editing to OpenOffice
By Adam Pash, 1:00 PM on Wed Oct 22 2008, 7,264 views
OpenOffice.org only (Windows/Mac/Linux): The Sun PDF Import extension imports and edits PDFs with the free Microsoft Office alternative OO.org. Rather than import the PDFs into the Writer program, the extension works with OO.org's Draw application. Once imported, you can still edit text or other portions of the document. The extension isn't perfect, but it appears to be under active development and could come in really handy under the right circumstances. The Sun PDF Import extension is free, works wherever OpenOffice.org 3.0 does. If you're looking to add more great functionality to OpenOffice.org, check out previously mentioned extensions like OpenOffice.org2GoogleDocs, Writer's Tools, and LanguageTool. Want to learn more about whether OO.org can replace Office, check out our first look at the latest release.
http://lifehacker.com/5067125/sun-pdf-import-adds-pdf-editing-to-openofficeorg
By Adam Pash, 1:00 PM on Wed Oct 22 2008, 7,264 views
OpenOffice.org only (Windows/Mac/Linux): The Sun PDF Import extension imports and edits PDFs with the free Microsoft Office alternative OO.org. Rather than import the PDFs into the Writer program, the extension works with OO.org's Draw application. Once imported, you can still edit text or other portions of the document. The extension isn't perfect, but it appears to be under active development and could come in really handy under the right circumstances. The Sun PDF Import extension is free, works wherever OpenOffice.org 3.0 does. If you're looking to add more great functionality to OpenOffice.org, check out previously mentioned extensions like OpenOffice.org2GoogleDocs, Writer's Tools, and LanguageTool. Want to learn more about whether OO.org can replace Office, check out our first look at the latest release.
http://lifehacker.com/5067125/sun-pdf-import-adds-pdf-editing-to-openofficeorg
install open office 3 in Hardy
Howto: Openoffice 3 in Hardy Heron (8.04)
A note for this tutorial: if you are using a language other than English the exact commands that I post here won't work, but you can substitute for non-English file names.
This tutorial is written assuming you want to keep the 2.4 version on your box.
I choose to uninstall version 2.4 via Synaptic
Step 1 - Download
Go to http://download.openoffice.org/other.html and download the file in your language (english) under the "Linux DEB" column. Save in your home directory.
Step 2 - Install
Open a terminal in Applications - Accessories - Terminal and run:
Code:
tar xvfz OOo_3.0.0_LinuxIntel_install_en-US_deb.tar.gz
cd OOO300_m9_native_packed-1_en-US.9358/DEBS/
sudo dpkg -i *.deb
step 3:
Code:
cd OOO300_m9_native_packed-1_en-US.9358/DEBS/desktop-integration
sudo dpkg -i *.deb
source http://ubuntuforums.org/showthread.php?t=982652
A note for this tutorial: if you are using a language other than English the exact commands that I post here won't work, but you can substitute for non-English file names.
This tutorial is written assuming you want to keep the 2.4 version on your box.
I choose to uninstall version 2.4 via Synaptic
Step 1 - Download
Go to http://download.openoffice.org/other.html and download the file in your language (english) under the "Linux DEB" column. Save in your home directory.
Step 2 - Install
Open a terminal in Applications - Accessories - Terminal and run:
Code:
tar xvfz OOo_3.0.0_LinuxIntel_install_en-US_deb.tar.gz
cd OOO300_m9_native_packed-1_en-US.9358/DEBS/
sudo dpkg -i *.deb
step 3:
Code:
cd OOO300_m9_native_packed-1_en-US.9358/DEBS/desktop-integration
sudo dpkg -i *.deb
source http://ubuntuforums.org/showthread.php?t=982652
Subscribe to:
Posts (Atom)