Videos for Youtube gdm-recordmydestop

Every day solutions to every day challenges. + Brilliant stuff

Moderators: b1o, jkerr82508

Forum rules
Please feel free to post your tip it does not have to be advanced. Also ask questions directly related to the tip here. But do not start new threads with questions or ask for help here. That is what the help section is for. forum rules: http://bjoernvold.com/forum/viewtopic.php?f=8&t=568
User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Videos for Youtube gdm-recordmydestop

Postby viking60 » 01 Aug 2010, 19:32

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
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"

User avatar
dedanna1029
Sound-Berserk
Posts: 8784
Joined: 14 Mar 2010, 20:29
Contact:

Re: Videos for Youtube gdm-recordmydestop

Postby dedanna1029 » 01 Aug 2010, 23:22

Nice! :)
I'd rather be a free person who fears terrorists, than be a "safe" person who fears the government.
No gods, no masters.
"A druid is by nature anarchistic, that is, submits to no one."
http://uk.druidcollege.org/faqs.html

User avatar
viking60
Über-Berserk
Posts: 9351
Joined: 14 Mar 2010, 16:34

Re: Videos for Youtube gdm-recordmydestop

Postby viking60 » 01 Aug 2010, 23:35

Yes test it and improve it - it works like a charm - but it is kind of rough.
Manjaro 64bit on the main box -Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz and nVidia Corporation GT200b [GeForce GTX 275] (rev a1. + Centos on the server - Arch on the laptop.
"There are no stupid questions - Only stupid answers!"


Return to “Tips & Tricks”