Wednesday, September 19, 2012

DVD Ripping

I have a problem with ripping some DVD's, right now it is Ratatouille.
Basically the rip failed with every single DVD ripper on Linux. It seems they have won the DRM battle to get me not to rip this DVD.

That is until I came across this simple "fix". Simple explanation of the problem:
Some DVDs have bad sectors as a copy protection mechanism, which makes some tools choke. However, ddrescue can rip copy-protected DVDs to iso.
Now down to bussiness!
Make sure the DVD is unmounted, then use ddrescue to make an ISO of the disk:


Code:
ddrescue /dev/sr0 movie.iso


This may take a while, once this is finished you can use any decoding app, like Handbrake, to rip the ISO.

Saturday, April 14, 2012

Bash scripts

Forgive me for using this space to bookmark a few scripts I pick up all over the internet, this is for me personally, but anyone can copy and use as they please. This will be updated each time I find new and interesting scripts.

Batch convert .wav to .mp3:

Put this scripts in the same folder as all the .wav files and execute it.

Code:
#!/bin/sh
# wav to mp3

for i in *.wav; do
 if [ -e "$i" ]; then
   file=`basename "$i" .wav`
   lame -h -b 192 "$i" "$file.mp3"
 fi
done


You could also use ffmpeg if you get the following error:
Unsupported data format: 0x0011

Code:
#!/bin/sh
# wav to mp3

for i in *.wav; do
 if [ -e "$i" ]; then
   file=`basename "$i" .wav`
   ffmpeg -i "$i" "$file.mp3"
 fi
done

The reason for the error?
This indicates that the data was compressed using Microsoft's ADPCM
codec and LAME supports PCM only.

More to follow soon!