Page 1 of 1

Videos for Youtube gdm-recordmydestop

Posted: 01 Aug 2010, 19:32
by viking60
gdm-recordmydesktop produces .ogv files that need to be encoded to .avi.
I have been researching a bit about this now, and I have concluded with the following. Many programs out there are just a collection of scripts so I decided to make my own.
How hard can it be right?
Well here I am a sh.. load of coffee later:
This is the quality the script generates - it is fairly good. I used this script for this one and it is an instruction on how the script works:

And here is the script: Paste it into your editor and save it in your videoklipp folder as mencode.sh and run it from there (sh mencode.sh). Now it sure can be improved so please do! :S b1o ! rvause ! I dare you :!:
[spoiler]

Code: Select all

#!/bin/bash
###By VIKING60. More usefull stuff on http://bjoernvold.com/forum Please
###improve this and let us know there!
###You need to install Mencoder to make this script work
###Some color definitions to start with. I like to have them all even if
###I don't use them. (Makes it flexible if you prefer other colors)
red='\e[0;31m'
RED='\e[1;31m'
blue='\e[0;34m'
BLUE='\e[1;34m'
cyan='\e[0;36m'
CYAN='\e[1;36m'
NC='\e[0m' # No Color

while [ ! -e ${word}.ogv ]; do
echo -e "Hi, please type the name of the ogv file: \c "
read  word
# What we are dooing while you don't get the video name right:
echo -e "${RED}${word}.ogv does not exist - check that you are running
this script from the video folder${NC}"
done
# Confirming that you have entered an existing .ogv video
echo -e "${CYAN}Very good, the file exists! The the file you entered is:
$word.ogv${NC}"

#Entering the out file here. It can be anything you want as log at it is an acceptable filename:
echo -e "Can you please enter the name of the avi out file? "
read  word2
echo -e "${cyan}Very good! you have entered the infile: \"$word.ogv\"
and the outfile: \"$word2.avi\" Some patience now please..."

# Doing the stuff!
echo  `mencoder -idx ${word}.ogv  -ovc lavc -oac mp3lame -o ${word2}.avi`

###This will open nautilus and run your newly created .avi video,
####To open the new avi file directly change this line to
####`nautilus ~/Videoklipp${word2}.avi` where videoklipp is the name of your folder
###If you use Gnome you should replace "dolphin" with "nautilus" here.
###You must change "videoklipp" to the name of your video folder (where
###this script is)!
 
echo -e `nautilus ~/Videoklipp`
break
exit 0

Re: Videos for Youtube gdm-recordmydestop

Posted: 01 Aug 2010, 23:22
by dedanna1029
Nice! :)

Re: Videos for Youtube gdm-recordmydestop

Posted: 01 Aug 2010, 23:35
by viking60
Yes test it and improve it - it works like a charm - but it is kind of rough.