Paul’s Linux Blog

Just Another Uber-Geek

Browsing Posts tagged media

At last I managed to get handbrake-gui on my pc big woohoo.

Not that excited hmm maybe not but I have tried many times to install handbrake, the only success I have had was on windows :( I have managed to get the Linux CLI version installed but could not get the out of my files quite right. The gui version I thought would be a simple install however I kept running into dependency issues.

Finally I did it, and worst of all it was far easier than expected.

First ensure you have subversion installed and configured as follows.

  • sudo apt-get install subversion

Now setup subversion

  • sudo svnadmin create /svn

Now to sort the dependencies.

  • sudo apt-get install  yasm build-essential autoconf libtool zlib1g-dev libbz2-dev intltool libglib2.0-dev libdbus-glib-1-dev libgtk2.0-dev libhal-dev libhal-storage-dev libwebkit-dev libnotify-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev

To begin the install you will need to fetch the latest build of handbrake as follows:

  • svn checkout svn://svn.handbrake.fr/HandBrake/trunk hb-trunk

Once the handbrake source code has downloaded change into the src directory.

  • cd hb-trunk

To configure and install handbrake in one easy go use the following command.

  • ./configure --launch

Once the build has completed you should be able to launch the gui as follows.

  • cd build/gtk/src
  • ./ghb &

NOTE: You are able to copy the ghb binary file to anywhere on your system.

I would recommend moving it to the local bin dir, then you should be able to launch it from a terminal screen by typing handbrake-gui &

  • mv ghb /usr/local/bin/handbrake-gui

If all was good you can delete the installation directory.

  • rm -rf hb-trunk

NOTES: I have run through these instructions on crunchbang / ubuntu 8.04 & 8.10 with no problems.

I thought I would share another of my trial and errors to manage and play Radio1 on my PC.

Why not just tune in on the radio I hear you say well, I no longer live in the UK, but miss Radio 1 so much I had to find a way to listen to it from the other side of the world.
I have never been a huge fan of mplayer, not sure why maybe it's because everyone raves about it so much, so I tended to use vlc instead, but vlc is a gui application and I am trying so hard to use command line when I can I just had to figure it out, I realised shortly that perhaps mplayer is pretty good, after all I now use it everyday to listen to the Radio.

Biggest problem is Radio1 insist on playing the music through the iplayer using flash this not not good for us on linux, after many hours of googling I discovered the best kept secret of where to find the Radio1 streams in ram format, and best bit is mplayer does a great job at playing them.

Getting Radio on your computer

First off make sure you have mplayer installed. If not use:

# apt-get install mplayer 

or use synaptic what ever floats your boat. :)

Next go to this site and find the stream you wish to listen too.
iplayerconvertor

Find the program you would like to listen too such as Radio 1 Chart Show, 26/07/2009
On the right is the link to the stream it's called something like b00lsltb, you need to copy or make a note of the url and then substitute for following command:

# mplayer "-playlist" http://www.iplayerconverter.co.uk/pid/b00lsltb/stream.aspx

mplayer will start to buffer the stream and by magic it will start to play.
To kill the stream use ctrl + c

You may wish that the stream runs constantly in the background, in that case run it as,

# nohup mplayer "-playlist" http://www.iplayerconverter.co.uk/pid/b00lsltb/stream.aspx &

Keep an eye on the nohup.out file in your current dir as it can grow large if left for a long time.

If you want to listen to Radio1 LIVE then use the following:

# mplayer "-playlist" http://www.bbc.co.uk/radio1/realaudio/media/r1live.ram

Recording the stream

To record the Radio stream use the following command it will start the stream and save it, you will need to convert it to mp3 if you then want it on your mp3 player.

mplayer -dumpstream "-playlist" http://www.bbc.co.uk/radio1/realaudio/media/r1live.ram -dumpfile Radio1.dump -vc dummy -vo null

Controlling the volume

I found I had no way to control the volume so I used a package called aumix.

# apt-get install aumix

This program allows you to change the volume by a command line interface and the cursor keys it's nice small and does the job.I will be trying to get some other method to control the volume using hotkeys but at this time the above method works.

Today was one of those days when I had to fall back to windows :(

I wanted to backup my DVD to avi for the PS3 and found my unusual method of using dd to dump the DVD to an iso file failed. I kept getting the message error reading disc.

I tried my other method of using vobcopy but this failed as well with errors.

My next try was DVD-Shrink via wine this method has worked on occasion but only on old discs, this time the app hung.

My last resort was booting into windows and using DVDFab, I could have installed it via wine but after spending so long trying I just wanted it done, so I could get on with other things.

Anyway windows came through and the image can now be converted into a ps3 compatible format.

In case you wonder why I do it the long way, I just don't like having my DVD drive spinning for several hours when I am converting video, especially if I do higher resolution backup.

Well it's almost done and I have probably saved another disc from the sticky hands of my kids.

Right now I need to convert some flv's to avi so I can watch them on my ps3.

Once again a little googling and 5 minutes later I have the method. Once again I find that mencoder comes to the rescue.

 mencoder -oac copy -ovc lavc -o output_name.avi input_name.flv

I love mencoder it probably one of my most used commands these days. I travel to work on the train every day and it's an hour each way. I find that wathcing a DVD is ok but it drains the battery on the laptop and also generates heat not to mention I don't like carrying my DVD around in my drive all day.

The solution is MENCODER. more on this to follow.

Powered by WordPress Web Design by SRS Solutions © 2010 Paul’s Linux Blog Design by SRS Solutions