BooksFree - It's Netflix for Books! Even audio books!
Powered by MaxBlogPress 

Archive for the ‘ubuntu linux’

Windows Vista Downgrade to Ubuntu Linux and Windows XP11.07.08

I’ve had a Toshiba laptop with Windows Vista Home on it for the last two years. It’s my main work machine, the one I do all my blogging and web site work on. In that time I’ve had to reformat it back to it’s original “storebought” state twice (the last time about 10 days ago). That’s always a pain because first you have to backup all of your photos, music, and files to an external drive. Then, once you format and reinstall you have to spend a few hours removing all the crap installed from the factory, and installing all the software you need to work.

It’s a dual-core machine with 2GB of RAM, and sometimes it just gets too damn slow for the resources it should have available. I had a virus once, and it was a PITA to remove. A few weeks back the computer got some kind of a glitch, where it would keep trying to load DLL’s that didn’t exist. This was hanging the machine, and it would literally take 5-8 minutes just to open a file folder. I knew the machine HAD to be reformatted and wiped again, because the restore disk only has the option to install from scratch - there is no “repair over the top of existing Windows” like there is from a real original Windows (non-OEM) disk.

I’ve used Ubuntu on my 1.2Ghz 512MB of RAM 7 year old Gateway machine in the basement for the last 5+ years. It stays on 24/7, it has 3 100GB hard drives in it, and I reboot it maybe 5 times a year. I use it almost every night when I play guitar to listen to mp3’s and play along, and I also do web work on it, lookup lyrics, and write content from time to time. It does have WINE of it for Windows emulation, and I did install (and use) TaxCut on it once a few years back with no problems.

I thought about installing Ubuntu on the laptop when I first got it, but didn’t because I have to have a Windows box to login to work remotely using VPN. It requires Internet Explorer, ActiveX, and all that jazz. Since I knew that the laptop had to be reformatted anyway - I decided to try Ubuntu on it and see how it would work before reinstalling Windows. If I had problems, then in with the Vista restore disk and back to MS-land again. I sent to the Ubuntu Web Site and downloaded the 32-bit ISO to burn and install.

If you haven’t used Ubuntu Linux before - you should try it. The install is painless and as easy as Windows, and to most people that don’t know any different - it’s just a “PC”, and they have no problems using it at all. Case and point, we have relatives that were calling me every 3 months because their computer kept locking up and getting viruses. I was sick of it, so I formatted the disk and installed Ubuntu. I installed Java, Flash, Firefox Windows Media plugin and never looked back. I never told them it wasn’t Windows (they aren’t computer people or techie at all) - and they don’t know any different. They think it’s actually some new version of Windows other people don’t have. They’ve had it one year now, and have never called me to ask “how do I do…” anything, and they have not accidentally screwed it up or gotten a virus at all. In fact, both adults in the house were taking online courses at the college using that PC (and printing out papers) with no problems - AND they never called me to setup the printer! I think that’s really saying something about how far Linux has come the last few years.

When you boot from the Ubuntu CD the first option you have is to “boot live and try”, so I decided to try that first and make sure all the hardware worked. Once the desktop came up, I tried a web browser, and everything (including sound) worked great! All drives and hardware components showed up, even my card reader. I plugged in an external drive, no problems there, and the wireless was fine. There was an icon on the desktop “install” - so I took the plunge. In less than 15 minutes I had wiped the disk, installed Ubuntu 8.10 and was on my new desktop.

I set about installing the things I would need to work, Firefox and my required addons, windows and other (quicktime) media codecs, the latest version of Flash, an Acrobat reader, FTP, telnet, some graphics and movie editors, etc. Then I remembered that there were two things I STILL needed Windows for. The first was to login to work via VPN, and the second was to install and edit my Line 6 PodXT tones for my guitar rig. These were both two very specific things I wouldn’t be able to do in Linux at all.

I remembered at work that they were starting to convert the data center over to “virtual machines”. Instead of buying hundreds of rack mounted servers, they were starting to install virtual machines on the mainframe and really big super-computer servers. This had become really big in the IT business world, but had it translated over to mainstream linux yet?

It turns out it has, and Sun is leading the way (or so it appears). Sun has software called Virtual Box, and the personal license is FREE! I was skeptical at first, but downloaded and installed it on my now Ubuntu laptop. I installed the downloaded .deb package, but you can do it from the command line or with Synaptic no problem. USB support is disabled by default, but that’s easily fixed with a tutorial like “how to enable USB in Virtualbox.

Once I installed the software I created a new “Virtual Machine” and called it “WindowsXP”. I gave it 10GB of disk space and 256MB of Ram, 8MB shared video. It said to put in a CD to install, so I popped in an old WindowsXP disk and let it rip! I took about 10 minutes to install and reboot, and about 20 more minutes on Windows famous “first time configuration” runs, and then the “virtual” PC rebooted and presented me with a login screen. I promptly changed the settings to 1024×768 display (my laptop is widescreen 1680px). When I logged in everything was perfect! I fired up an IE browser and downloaded Firefox. I installed quicktime, flash, and acrobat reader. I logged into my desktop PC remotely - no problem! All from within “virtual Windows XP” window on my Ubuntu Linux desktop. When I went to close the Window I was prompted, do you want to “save the state of the virtual machine”, “power off”, or “reboot”.

Wow, I had to think about the power of what all this meant. Let’s say you had an ubuntu box with a 500GB hard drive. You could install Virtual box with WindowsXP, Windows 98, Windows ME, Windows 2000, or even other versions of Linux if you wanted. Personally I would stick with Windows XP, but you could install all your software on it you normally use (like Office), and then “save the state” of the machine. Let’s say you have 3 kids in the house that are notorious for screwing up your PC (or relatives or friends). Give ‘em each their own virtual machine. If they screw it up - make another!

Kids like to play Windows based games, need a Windows PC for work - all “virtual machine”. Guess what? VirtualBox has versions you can download and install for both Windows AND Mac (free!) too! So, you can download on Windows and install Linux virtual machines, or even other Windows virtual machines. Install on a Mac to install Windows or Linux virtual machines! The possibilities are endless, and it’s all FREE!!

I’m glad I downgraded my Windows Vista laptop to Ubuntu and Windows XP - it’s the best thing I ever did!

Posted in computers, linux, ubuntu linux, windowswith 1 Comment →

How to access Ubuntu PC on Windows Network10.07.08

I created this tutorial how to page because I had trouble accessing my Ubuntu PC from my Windows based Network (Windows Vista, Windows XP) in my home. I have 4 PC’s (wired and wireless) connected to a router - which is the how they get out the Internet. All the PC’s (including the Ubuntu one) have the same network “workgroup” name. In addition this tutorial assumes you alread have “Samba” installed, and if you don’t run this first in terminal:


sudo apt-get install samba

Next, stop samba while you make the required changes by running this in terminal:


sudo /etc/init.d/samba stop

Now you need to edit the samba config file, which is located here:


/etc/samba/smb.conf

You can open it in a text editor to make changes by running this in terminal:


sudo gedit /etc/samba/smb.conf

Copy and poast the following into smb.conf:


[global]
 ; General server settings
 netbios name = YOUR_HOSTNAME
 server string =
 workgroup = YOUR_WORKGROUP
 announce version = 5.0
 socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192

 passdb backend = tdbsam
 security = user
 null passwords = true
 username map = /etc/samba/smbusers
 name resolve order = hosts wins bcast

 wins support = yes

 printing = CUPS
 printcap name = CUPS

 syslog = 1
 syslog only = yes

; NOTE: If you need access to the user home directories uncomment the
; lines below and adjust the settings to your hearts content.
;[homes]
 ;valid users = %S
 ;create mode = 0600
 ;directory mode = 0755
 ;browseable = no
 ;read only = no
 ;veto files =  mail/bin/

; NOTE: Only needed if you run samba as a primary domain controller.
; Not needed as this config doesn't cover that matter.
;[netlogon]
 ;path = /var/lib/samba/netlogon
 ;admin users = Administrator
 ;valid users = %U
 ;read only = no

; NOTE: Again - only needed if you're running a primary domain controller.
;[Profiles]
 ;path = /var/lib/samba/profiles
 ;valid users = %U
 ;create mode = 0600
 ;directory mode = 0700
 ;writeable = yes
 ;browseable = no

; NOTE: Inside this place you may build a printer driver repository for
; Windows - I'll cover this topic in another HOWTO.
[print$]
 path = /var/lib/samba/printers
 browseable = yes
 guest ok = yes
 read only = yes
 write list = root
 create mask = 0664
 directory mask = 0775

[printers]
 path = /tmp
 printable = yes
 guest ok = yes
 browseable = no

; Uncomment if you need to share your CD-/DVD-ROM Drive
;[DVD-ROM Drive]
 ;path = /media/cdrom
 ;browseable = yes
 ;read only = yes
 ;guest ok = yes

[MyFiles]
 path = /media/samba/
 browseable = yes
 read only = no
 guest ok = no
 create mask = 0644
 directory mask = 0755
 force user = YOUR_USERNAME
 force group = YOUR_USERGROUP

Next, you’re going to want to edit the appropriate values:

netbios name = name_of_your_computer_will_be_on_the_network
workgroup = same_name_all_computers_in_house_use_as_workgroup
wins suypport = yes
force user = YOUR_USERNAME
force group = YOUR_USERGROUP

you can edit anything else you want, but in most cases at least those 5 things are required. Now, start samba back up:


sudo /etc/init.d/samba start

Next, you need to actually ADD THE USERS MANUALLY INTO SAMBA (this is why mine was failing - I never did this part). Run these commands in terminal:


sudo smbpasswd -L -a your_username
sudo smbpasswd -L -e your_username

You will be asked for a password after running the first one, BE SURE to use your LOGIN password and username for Ubuntu! That’s it! You should now be able to see and access the Ubuntu box on the Windows based network, and login from another PC using your main Ubuntu username and password. Any files or folders you right click and “share” on the Ubuntu box will appear on the PC’s now when you go to “Network” and the name of your Ubuntu box.

If you get stuck or need more info, view this page for reference.

Posted in tutorial, ubuntu linuxwith No Comments →

gOS, google command line, and google Linux06.04.08

Is there a google shell, a google command line, or a google operating system?

There is a version of Linux supposedly used within google called Goobuntu, or google on “Ubuntu” linux. Many have speculated for years that google intends to market this, but they have repeatedly denied it. I myself have installed “gOS” which stands for “green OS” - many mistakenly call “google OS” because it such an insanely web based version of linux. Their new catch phrase is “Linux meets MySpace”. I can attest it works well because I replaced relatives Windows XP with this install and they are fine with it. They still don’t understand that they don’t have Windows - and they don’t even know what Linux means. Despite this, they’ve had no problems using their computer for the last year, and I’ve not received one single phone call regarding a virus, trojan, or other crippling PC problems like they used to have.

Get a live preview of gOS here (I’m not sure which version it is):

I found something cool today that calls itself the “unofficial google shell“. Really it’s just an ajax app that allows you to do a cool “command line like” web search. Check it out - I think you’ll really dig it!

google shell

Posted in linux, myspace, ubuntu linux, webwith No Comments →

How to: Ubuntu Live CD DVD Backup of YOUR system!12.11.07

I just had to write about this one real quick too, this is one of the most needed and coolest Ubuntu Linux tools I’d seen in a long time. This articles shows how to create your own live cd with Remastersys. What does that mean? It means that you can create your very own Live CD or DVD backup based of your own system! Backup all of your system settings and essentials - AND making it a bootable LiveCD you can use on any computer anywhere? How can you beat that! Be sure to bookmark this one and pass it on to your friends!

Posted in diy, linux, ubuntu linuxwith No Comments →

Free Linux Games12.10.07

I was looking at what was on digg this morning, and came across this list of Top 10 Free Linux Games. I’ve been using Ubuntu on several PC’s for 3-4 years now, and for some reason I had no idea that there were this many free 3D games that were Free for Linux! I guess I spend too much time building web sites and not enough time playing games! I’m definitely going to have to download and install some of these to see how good they are! I want you to check out the list for yourself, but here were the things that surprised me:

America’s Army: Apparently this game is owned by the US Government and has been out since 2002? WTF! It’s a “recruiting tool” to get people to join the army? I guess it’s very popular with 4,500 people playing at any given time.

True Combat Elite: This is a Castle Wolfenstein: Enemy Territory mod? It supports widescreen and letterbox, and has anti-cheat software!

Open Racing Car Simulator: This one really surprised me, mostly because it’s a racing game. Well - a simulator. Nearly all of the games I was familiar with for Linux were First Person Shooters, basically all like Quake copies. This is awesome, a racing game for Linux!

Frets on Fire: Now here’s a game I actually knew about, and played on Windows, but I didn’t know there was a Linux version. Frets on Fire is basically the Open Source version of Guitar Hero, and is just as fun to play! And there are tons of songs for it because it’s open source! This one I’m going to have to put on my Ubuntu box for sure!

Track Mania: is another car game, but this one has crazy short tracks with acrobatics and tricks. Very cool, another driving game for Linux I didn’t know about!

Again, be sure to visit the full list for all 10 games! Read the comments too, because there were lots of games listed there I didn’t know about as well, like Digital Painball 2, Gillo, and Sauerbraten!

Posted in distractions, linux, online games, software, ubuntu linuxwith 1 Comment →

List of Top 25 Ubuntu Blogs08.31.07

Here’s a list of top 25 Ubuntu Blogs that just came out the other day. A lot of times you get a “top list”, and it’s just somebody’s favorites. This list is hundreds of thousands of people’s favorites because the criteria to get on the list were to be in the google top 200 for the terms “ubuntu blog”, and then they were scored by google pagerank, alexa ranking, technorati score, and number of bloglines subscribers. All in all what you get a REALLY GOOD quality list of blogs about Ubuntu Linux. If you use Ubuntu you’ll want to bookmark that page and visit it again and again.

Posted in computers, ubuntu linuxwith No Comments →

Converting video in linux using ffmpeg and mencoder06.29.07

**UPDATED**

Converting video in Ubuntu Linux 5.10 (Breezy) took me a little longer to figure out that I anticipated - but only because there are so many different solutions. If you use another flavor of Linux - I’m sure this guide can help you too. I download a lot of videos, and of course want to burn some to VCD or DVD. The formats are anything from wmv to avi, mpg to mov. I installed a lot of GUI tools, and to be honest not a single one worked for me. I found tools to burn SVCD, VCD and DVD’s, but to convert the video and prepare it for burning is another matter. Most of the tools that burn video don’t convert it to the proper format. If for some reason you got to this page and don’t know what an SVCD or VCD are - please look them up at Wikipedia.com before continuing.

If you’re a former Windows user converting to Linux (like me), here’s some background. If you’re a linux pro - move on to the next paragraph. Most of the video conversion programs and utilities in Windows do the whole job from finish to end. What I mean is, they’ll help you edit your video, then covert it to the proper format, then help create your menus, and finally burn your finished project to CD…i.e. - Rip, Encode, and Burn. In Linux, in every step in the process different tools can be used depending on your needs. Some tools only do one thing. Others do it all. Most are just a GUI interface front end built on a common command line tools already on your pc.

If you have video that you need to make linear timeline type edits in, then use the Linux GUI video editing tool Kino which you can find at http://www.kinodv.org/. If you use Ubuntu - you can install Kino using your Synaptic package manager. Kino is a nice video editor, but in only edits “digital video” with .dv or .dif extention (from a digital video camera), or quicktime format, or digital video in .avi format. This basically means, you can’t edit things in .mpg format, .asf or .wmv (of course - Windows formats), or divx or xvid. You need to “convert” the file to digitl video format before you can open it in Kino (read on for ways to convert video). If you just want to burn some video to a disc you can play in pretty much any DVD player - read on.

Getting Started

If this is your first time reading this page - or if you’re returning…strongly consider using the “subscribe post” link at the bottom of this article. I edit video all the time and constantly refine the content on this page to the latest tools and techniques I’ve found. If you subscribe, you’ll get an email whenever I edit this page. You won’t get email for any other reason.

I use K3B for almost all my VCD and DVD (iso) burning needs. K3B is a Linux burning program for CD’s and DVD’s - very similar to what Nero is like in Windows. But before I can burn a VCD or DVD I need to get my videos in the proper format by converting them. For the most part when converting them, I now exclusively use command line tools - which is a very quick and versatile way to do it once you know how. This may or may not be for you depending on your knowledge of UNIX and the command line. If you prefer a GUI interface, I will try to point out those options as well. If you can navigate directories in the terminal - you most certainly can use these commands to convert video there as well.

Converting and Encoding Video

I now have 3 options for converting video well for use in a dvd player in Ubuntu Linux (or any linux distro). If you want to convert video for play on your computer - jump to the end of the article. First I’ll go over the first two which are ffmpeg and mencoder. I used to almost exclusively use ffmpeg when making video to play in a dvd player. I’ve tried both, and gotten very poor quality video and results from mencoder. I know many swear by it, but maybe it needs more resources than my 1.2 Ghz 512MB ram machine will lend. ffmpeg works very well on my older hardware.

On the command line in terminal, you can of course just run the command “man ffmpeg” or “man mencoder” to read the manual (help) page for each to find out how to use them. If you don’t have either on your machine, just install using of course Synaptic Package Manager under System -> Administration. Using the manual pages, I wrote myself some examples that I thought I would most commonly use, and here they are:

FFMPEG on the command line:
===================

by selecting a format as one of the options (”vcd”, “svcd”, “dvd”, “dv”, “pal-vcd”, “ntsc-svcd”, all the format options (bitrate, codecs, buffer sizes) are then set automatically.

You can just type:
$ ffmpeg -i myfile.avi -target vcd /tmp/vcd.mpg

#same example but use high quality, ntsc vcd format
$ ffmpeg -i myfile.avi -hq -target ntsc-vcd /tmp/vcd.mpg

#same example but dvd quality
$ ffmpeg -i myfile.avi -target ntsc-dvd /tmp/dvd.mpg

#same example use same quality as source
$ ffmpeg -1 myfile.avi -sameq -target vcd /tmp/vcd.mpg

#converting a file for VCD format using a and b frames for MPEG 2
$ ffmpeg -i myfile.avi -target ntsc-vcd -bf 2 /home/user/Video/vcd.mpg

#same conversion, but start at 0 seconds and convert only first 45 minutes
#use -ss for start position and -t for duration
$ ffmpeg -i myfile.avi -target ntsc-vcd -bf 2 -ss 00:00:00 -t 00:45:00 /home/user/Video/vcd.mpg

#converting a file to mpeg using mencoder (poorer quality than ffmpeg I think, but that’s on my system - and it really depends on the file and the codec you’re using)
#see the tovid examples below for better better results with mencoder
$ mencoder -oac copy -ovc lavc -of mpeg -o output_file.mpg your_file.wmv

A new trick that I learned was that you can use ffmpeg to extract audio only from video files. Recently I made some .mpg files for a promo dvd I was making for my band. I wanted to also make a promo cd - but use the audio from the video files. Using ffmpeg, it’s possible to rip the audio from any video file (it can convert) directly to an mp3 file like this:
$ ffmpeg -i video.mpg -f mp3 audio_track.mp3

In that example, video.mp3 is your input file and audio_track.mp3 is your output mp3 file. It works great!

I keep a mencoder example around just in case I want or need to try it again and so I have a second option just in case ffmpeg doesn’t work well on a particular video. I sometimes use it to convert windows media files. One last tip - if you are going to be converting any windows media files - you must get the proper codecs installed on your system or ffmpeg won’t work. The easiest way to do this is by running the “Automatix” script explained in the ‘First Things to Do’ section of this guide. It installs the “essential-codecs” from the mplayer site automatically. If you have any problems with this, or don’t want or plan to use Automatix - just download and install them essential codecs from the mplayer web site yourself.

I love using ffmpeg - but some Windows media files it just won’t convert. It will convert a MB or two and then bomb out with a “segmentation fault”. If that happens - I used to try the mencoder option instead. Which brings me to my third and newest option - Tovid. I have found that using the Tovid option gives the best results, and every single Windows media format whether asf or wmv I’ve tried it has converted. Tovid is merely a frontend that uses ffmpeg, mencoder, transcode, and dvdauthor - but it does so very efficiently. I originally installed Tovid on Ubuntu using Synaptic package manager, which made an icon under the Sounds and Video system menu that brings up the 0.22 GUI interface. If you don’t have an icon in that menu, try running “tovidgui” from the command line to bring up the gui. This interface has never worked for me in Breezy (but does in Dapper flight 6). I downloaded the 0.25 Tovid from their web site and installed it from code using their instructions and the Tovid command line tools seem to be working for me so far. If you have any problems with python depencies when you install Tovid - be sure to run these 2 commands on your terminal, and then install Tovid again for it to work right:

$ sudo apt-get install python-wxgtk2.4
$ sudo apt-get install python-dev

Tovid is a suite of scripts that you can use for the various stages of the conversion and burn to disc process. They heavily use mencoder for conversion, and for some reason they do it much better than when I run mencoder myself. The first script of the Tovid suite that you’ll find handy is “idvid” (short for id video). Use it like this:
$ idvid file.avi

It will not only give you the video properties, you will get the width and height, aspect ratio, duration, bitrates, but the most important is the last bits of info you get. It will tell you whether the video and audio is compliant with VCD, SVCD, or DVD. Then you’ll know whether you need to convert it, or if you can burn it straight to disc.

After you run the idvid command on your video(s), you’ll probably need to convert them to the proper mpeg (mpg) format before burning. This is very easy using tovid on the command line. There are a multitude of options you can find in the man page, but these are the two most common I use:

$ tovid -dvd -ntsc file.mpg video
$ tovid -vcd -ntsc file.mpg video

after the tovid command the first option I use is to tell it whether or not to make the video format for a dvd or for a vcd. Then I use the ntsc option for my type of tv. Next I tell it what the input file is. Last, I tell it what to name the output file (prefix only with no extension)…i.e., if you make this video like I did, your output converted file will be video.mpg. If you accidentally name your output file video.mpg, not to worry - tovid will save it as video.mpg.mpg.

If you want to convert lots and lots of videos at once (like I sometimes do), and don’t want to run this command a ton of times, or write a script to convert them - tovid has a nice option. Just use tovid-batch instead like this:

$ tovid-batch -dvd -ntsc -infiles *.avi

You can also convert every single (video) file in a folder like this:
$ tovid-batch -vcd -ntsc -infiles *.*

If you’re not familiar with the command line or dos, the asterik means “do everything like this” (avi). So of course *.mpg would mean all mpg files, *.wmv, all windows media files, *.* means all files of all extensions, etc.

I don’t use it much anymore now that I know about the tovid-batch command, but you can install and using the ‘video-convert’ scripts from the ubuntu forums designed for nautilus. Nautilus is like the dekstop manager is Gnome, and if you right click the desktop - you’ll see a heading entitled “scripts”. Download the video-covert script from the forum and follow the instructions for installing it (it’s very easy). Once installed, just right click any video file(s), go to “scripts -> video-convert” and answer the simple option prompts and voila! It converts them all (using command line tools) for you! The greatest benefit of this is that you can shift-click multiple files at once, and use the script to convert them all one by one. Doing it yourself in terminal you would have to either convert them one by one, or write a script to create them in succession.

If you install this script and like it, you can also visit the ubuntu forums and get the audio-convert script too, to convert audio files the same way. You’ll be converting flac, ogg, wav, and mp3 files in no time. Just make sure that you’ve installed the command line tools for the formats you’ll be converting in synaptic. i.e., if you want to convert .flac files to mp3 using audio-convert, make sure you install the .flac command line tools in synaptic first so the .flac format will be supported and usable by audio-convert.

Making a Disc for Your DVD Player

Before I tell you how to create a disk for your dvd player - I first ask you to consider an option that will allow you to watch video on your t.v. from your computer, without converting anything! Believe it or not, I really convert video that often anymore, since my DVD player will now play plain data cd’s and dvd’s burned from my computer. Wouldn’t you like to do the same? It’s cheap and easy if you know what to buy…you can do this for under $30-$40.

There are two options - the first is to buy a region free dvd player that will play DVD, DivX, MP4, VCD, SVCD, MP3, WMA, JPEG, AVI, xVid, and mor The second is to buy a hard drive player or HDD player case. Basically - it’s the same as an external hard drive enclosure, but it also has a VGA cable and video and audio outputs to play audio and video directly to a computer monitor (without computer) or your television (without a computer). It has a chip inside that contains the menu system to navigate the hard drive and play video on it’s own. So, buy this empty enclosure, add a hard drive, hook it up to your pc with the usb cable (works with windows, mac, and linux) and transfer the video or audio to it. Then - hook it up to your tv or entertainment system with the included audio cables, and watch your movies without ever burning a cd or dvd. When your done watching your movies, just delete them and transfer more!! You can even take it with you on the road, watch in the car, on a laptop, or even in the hotel room, on anything with video/audio inputs!

I’ll show you the links first on where to get these on eBay, and then back to the “how to make a DVD” tutorial!!


Coverting video is the first step to making something you can play in your DVD player. You can burn video to a regular CD, and make either a VCD (Video CD) or SVCD (Super Video CD). The advantage is that you need only a regular cd burner and a simple CDR. The disadvantage is that you can only burn ~100 minutes of video, and the video quality is tv quality or less. In the ffmpeg commands above I show how to convert to either VCD or DVD formats very easily.

Once converted, it’s easy to use K3B to build a VCD or SVCD just by clicking on the files you want to add and burning to CDR. This is easy and cheap, but VCD’s can only store 70 minutes of video. If you have a movie or video that’s longer you can put it on 2 or more video cd’s easily. But burning dvd format files you’ve converted is not so easy because in order to make a dvd, the files have to be in the right format, in the right folders, and you usually need some type of menus or navigation system. It’s only easy once you know the commands - or if you have a decent gui program to put it all together. I’ve found that it’s also easier to create a DVD on the command line in linux (but I’ll go over GUI options after this too). For the command line - all you need is to have both dvdauthor and mkisofs installed. If you don’t, just add them in Synaptic Package Manager.

Then on the command line - use them like this:

Start by running this command from a directory that contains your newly coverted video file(s). Make sure that you have created a directory inside your current dir to create the new files. In other words, if you are in /home/Video in terminal, “mkdir dvd_ready” there to create /home/Video/dvd_ready/. As long as you already have your video in the same dir you’re running the command from (/home/Video/movie.mpg), you can run this:

#-o is output dir and movie.mpt is name of your movie
#for multiple video on same dvd, run this command for each movie
$ dvdauthor -o dvd_ready movie.mpg

#when all movies are added run this command to create table of contents file
$ dvdauthor -o dvd_ready -T

#run this command to create an ISO file to burn your DVD from
#-dvd-video is the format, -o is name of output file, dvd_ready is source dir
$ mkisofs -dvd-video -o dvd.iso dvd_ready

Then, when you are done just burn your .iso file to a DVD using K3B or another program. In K3B, I can burn my .iso to DVD in under 4 minutes with older hardware.

So creating a DVD in the terminal takes a few more commands - but hey - I can usually convert the video using ffmpeg and create the DVD files and iso in under 1/2 an hour, ready to burn straight to DVD. That is much faster then I was ever able to create a DVD from Windows.

Now, if you just must have a GUI program to create a dvd and the command line is just not for you - be sure to check out DeVeDe, QDVDAuthor, DVDStyler, AcidRip, and DVD::Rip.

Every now and then I find myself wanting to convert a video just for the computer. Maybe I want to create an avi video in Xvid format, or even DivX format. You may already have “transcode” installed. In terminal, type “man transcode” to get the transcode manual. If you don’t get anything - then go into synaptic and install it. You can always get the latest version from www.transcoding.org as well.

Here are some examples of using transcode to convert video:

Convert a video to xVid format:
$ transcode -i movie.mpg -o movie.avi -y xvid

Convert a video to DivX format:
$ transcode -i movie.mpg -o movie.avi -y divx

Do you have a better way to convert video or using command line video tools? Sign in and add your comment to this page now!

Did you find the terminal commands helpful? Would you like to get more little one and two line commands to convert, hack, play, and edit all kinds of multimedia on your linux computer? I have been reading all kinds of tutorials in forums and Linux help sites for months now. I hadn’t purchased any books to help me at all until just a few weeks ago. There was one that really caught eye called “Linux Multimedia Hacks” (which is pictured below) - it is impeccable as most O’Reilly books are - especially the hacks series. In the dozens if not hundreds of hours it will save you, it’s well worth the $20. I really wish I would have bought it before I started out figuring how to do this all on my own. I knew a very few hacks already, but now I have learned dozens of new ones. I tend to save all kinds of text files in my home folder with little command crib sheets, and I have tons of sticky notes on my desk. There really is something to be said for having a printed book reference at your disposal. That way - if you don’t convert a wav file to mp3, rip a cd, or make a dvd for a month or two, the answer is right in the book contents or index. Click on the book below for more info and consider buying a copy for yourself from Amazon. You spend more on a few pizzas than what it will cost….but it will be a reference you will use for many years to come.

Learn how to manage your music collection in Linux, including your iPod. Learn how to crop video during playback and recording. Learn how to create a DVR (Digital Video Recorder) or PVR (Personal Video Recorder) with MythTV. Learn how to rip and record streaming video and audio. Learn how to convert a dual layer DVD to a single layer dvd. Even learn how to synch your digital camera and computer, make image thumbnails, leave a watermark, or create a slideshow or screen capture movie. It’s all in the book….I’m still reading!!

originally posted: 2006-05-08 11:50:00 -0400

Linux Multimedia Hacks: Tips & Tools for Taming Images, Audio, and Video (Hacks)Linux Multimedia Hacks: Tips & Tools for Taming Images, Audio, and Video (Hacks)

Posted in convert video, ubuntu linuxwith 6 Comments →

HOWTO: Rip DVDs in MPEG-4 AVC (x264), multi audio, subtitles, Matroska06.29.07

MPlayer and MEncoder are amazing tools not only for watching but also for backing up DVD content. This HOWTO demonstrates how to create a very high quality rip with next generation video (H.264/x264/MPEG-4 AVC) serveral audio tracks (Vorbis in this case, can be other formats like AC3, MP3) and subtiles (vobsubs) in a Matroska container. In order to install the necessary applications you will need the multiverse repository (https://help.ubuntu.com/community/Repositories/Ubuntu).

1. Install needed applications

Code:

sudo apt-get install mplayer mencoder normalize-audio vorbis-tools mkvtoolnix gpac x264-bin

2. Rip DVD to harddisk

Code:

mplayer dvd://1 -v -dumpstream -dumpfile title.vob

  • 1 is the stream you want to rip.

3. Rip subtitles

Code:

mencoder dvd://1 -nosound -ovc frameno -o /dev/null -slang en -vobsubout title

  • 1 is the stream we extract the subs from
  • slang is the desired language (en, de, fr, etc.)
  • title is the basename of the vobsub files, in this case title.idx and title.sub

4. Convert audio to PCM

In case you want to keep the original AC3 audio step forward to 6.1!

Code:

mplayer title.vob -ao pcm:file=audio1.wav -vc dummy -aid 128 -vo null

  • title.vob is the stream we already ripped in step 2
  • audio1.wav is the name of the resulting PCM file
  • -aid 128 chooses the first audio track

If you would like to rip another audio track (e.g. commentary or different language) repeat the above with the next track number (-aid 129 would be the second track) and save as audio2.wav.

5. Normalize audio

Code:

normalize-audio audio1.wav

Repeat on audio2.wav etc. if you have more than one audio track.

6. Convert audio into Ogg Vorbis

Code:

oggenc -q5 audio1.wav

  • -q5 is the desired quality of the first track. Wikipedia: Many users feel that Vorbis reaches transparency (sound quality that is indistinguishable from the original source recording) at a quality setting of -q5, approximately 160 kbit/s. Additional audio tracks can be encoded accordingly with lesser quality in order to save disc space.

6.1 Keep original Dolby Digital AC3 audio

In case you do not want to compress audio but keep the original AC3 track simply extract it from the VOB with

Code:

mplayer title.vob -aid 128 -dumpaudio -dumpfile title.ac3

7. Encode video

This example uses the two-pass-method and presumes progressive PAL video. Read here how to deal with telecined, interlaced and NTSC video.

First, we have to get rid of black borders around the movie. Hence we playback the file with the cropdetect filter.

Code:

mplayer title.vob -vf cropdetect

Move a little forward in the movie using the arrow-up key and let MPlayer find the correct settings for you. If you are finished quit MPlayer and copy the part -vf crop=720:432:0:76 from the console. Of course your values might differ from this example.

Now create a file which runs the first and second pass consecutively.

Code:

gedit videnc

Paste the following into that file and adjust the cropping values with the ones you got from the procedure above

Code:

# First pass
mencoder -v\
title.vob\
-vf pullup,softskip,crop=720:432:0:76\
-ovc x264 -x264encopts subq=4:bframes=3:b_pyramid:weight_b:turbo=1:pass=1:psnr:bitrate=1000\
-nosound\
-of rawvideo\
-o title.264

# Second pass
mencoder -v\
title.vob\
-vf pullup,softskip,crop=720:432:0:76\
-ovc x264 -x264encopts subq=6:4×4mv:8×8dct:me=3:frameref=5:bframes=3:b_pyramid:weight_b:pass=2:psnr:bitrate=1000\
-nosound\
-of rawvideo\
-o title.264


Since MEncoder is not able to save directly into Matroska containers we encode the video in raw format convert it later into .mp4 and finally mux everything (video, audio, subtitles) together with mkvmerge. Interested in what all those options mean? If everything fits your needs save videnc.

Encoding of MPEG-4 AVC video is a time consuming matter. On my AMD Athlon64 3000+ a 90 minute movie takes about 3 hours for the first and again about 5 hours for the second pass. Best is to let your machine work over night while you sleep.

Run videnc

Code:

sh videnc

8. Mux video into MP4 container

Good morning!

If encoding went fine we are ready to put that x264 file into an MP4 container

Code:

MP4Box -add title.264 title.mp4

You can already verify the result by playing it in MPlayer.

9. Muxing it all together

Start up the MKV files creator

Code:

mmg

and simply drag & drop your files into the Input files box

  • title.mp4
  • audio1.ogg
  • audio2.ogg
  • title.idx (not title.sub!)

You might have noticed that we did not scale the video during the encoding process. That is because Matroska handles the aspect ratio itself. Simply define the languages and track names in the Tracks box and choose the correct aspect ratio. Choose an output filename (the default would produce title.mkv) and hit Start muxing.

Changelog:

  • 9. Oct 2006 - fixed encoding parameters
  • 9. Oct 2006 - added telecined, interlaced, NTSC

Todo:

  • Encode to a certain file size

http://ubuntuforums.org/showthread.php?t=273635&goto=newpost

originally posted: 2006-10-08 16:15:04 -0400

Posted in convert video, rip dvd, ubuntu linuxwith 4 Comments →

Printer Setup Ubuntu Linux06.29.07

For me, setting up a printer was not all that difficult. First, let me say that a little google goes a long way. Honestly, if you got this far and your computer has ubuntu linux installed on it and you’re surfing the web, you should be able to handle setting up a printer in linux.

You should already have a printer service setup in ubuntu by default (cups, common unix printing interface). You can go do “System” -> “Administration” -> “Printing” and when the windows comes up click on “new printer”. You can try and use a “detected printer” if your printer is listed. I had my printer plugged in and on (usb) when I tried this and it wasn’t detected. But, I rebooted with it on and plugged in, and it was there then. The model number for my epson stylus wasn’t listed, so I tried the closest number, but it still wouldn’t print.

So I googled “setup printer epson stylus ubuntu linux”, and found a nice page with explicit instructions. I ended up downloading a linux driver from epson, and installing using the instructions I googled. My CX3200 is printing just fine.

So - to setup your printer, try to install using drivers already in Ubuntu. If that doesn’t work, go to the printer web site for your make (lexmark, ibm, epson, hp) and look for a linux driver. Last, google to find help. And if you are setting up a printer that is a multi-function device and has a scanner, you also want to go to System -> Administration -> Synaptic Package Manager and install “XSane” - which will install a driver for your scanner as well. Then, when you are within any graphics program (like Gimp), you can “acquire” your images using the scanner and the XSane driver. It works well.

I should have mentioned - at any give time - the first place you should ALWAYS look for help is http://ubuntuforums.org/. There are tons of people there waiting to help you, and chances are your question has already been asked and answered by someone else.

Please add any linux printer help you may have by submitting a comment to this page.

originally posted: 2006-01-19 01:41:38 -0400

Posted in computers, ubuntu linuxwith No Comments →

Listening to Music in Ubuntu Linux06.29.07

One of the first things most people like to do when poking around the computer is to listen to some music. Linux is not like windows with one way to do this (Windows Media Player). There are dozens if not hundreds of ways to listen to music in Linux. Over time you’ll figure out which programs work best for you. You’ll probably find out that you like more than one for different reasons at different times. In ubuntu, under the applications menu you will find some installed be default under the heading “Sound & Video”. The default player for both sound and video in ubuntu is “Totem”.

I am going to list the programs I use most and the reasons why. If you are going to try any of these and they weren’t installed by default - install them yourself (for free!) by clicking on the “System” -> “Administration” -> “Synaptic Package Manager” heading. Just click “search” and type in the name of the program you want to install, and then “Apply” to get it installed.

Music Programs I use

Beep Media Player: I use Beep Media player (BMP) a lot. If you’ve ever used WinAmp in Windows - it’s exactly like that. You can even use Winamp skins on it. I like it because it’s small, easy to create and save playlists - it just works. I used Amarok for awhile, which seems a bit like iTunes - allowing you to manage your entire music collection. But Amarok was cumbersome and not intuitive for me.

Audacity: Audacity is a sound editor. If you want to trim the beginning or ending from a song, or merge sound clips together - this is a great tool.

EasyTag: You probably have MP3’s that have the tags all screwed up. This nifty little tool lets you not only edit them, but it can grab the right information right from the Internet and populate the tags for you if you want.

Streamtuner: Tool for finding and listening to Internet Radio stations.

SoundJuicer CD Ripper: This tool is for ripping CD’s to mp3’s for so you can have them on your computer. By default this only rips music to Ogg Vorbis or FLAC formats. But open up the help in preferences, and search for “mp3″. You’ll find instructions for setting up a new format to rip to mp3 if that’s what you prefer.

Serpentine: This is hands down the easiest tool and interface I’ve seen yet for burning just audio CD’s. Just add your songs and burn.


You’ll notice that the difference between Linux and Windows is that in Linux there is a tool to do just about anything you want - an individual tool. In Windows they try and make one tool (like Windows Media Player) do a thousand things. In Linux once you find the tools you like - just open what you want when you need it. It’s all about choice and preference, and it’s all free!

Please comment and add to this page what sound and music programs you use in Linux and why.

originally posted: 2006-01-19 01:14:47 -0400

Posted in music, ubuntu linuxwith No Comments →



  • Page 1 of 2
  • 1
  • 2
  • >


  • My name is John Pratt and I like all kinds of geeky, gadget tech stuff. I maintain web sites, write a little code, fool around with Wordpress, Ubuntu, play lead guitar in a band, and have a general fondness for computers electronic 'thingies'!