vlc webcam audio recording and destkop screencast

-..- i got the flu …. so this article is online

first of all you need to know which device you have to use

Audio:

as always :

cat /proc/asound/pcm

you should ge something like this

00-00: ALC861-VD Analog : ALC861-VD Analog : playback 1 : capture 1
00-06: Si3054 Modem : Si3054 Modem : playback 1 : capture 1
01-00: USB Audio : USB Audio : capture 1

so…. you can see here i have the internal audio card … that can caputre (alc861vd) and the usb microfone, which is into the webcam

so to capture my destkop and the audio from the usb microfone i should use

alsa://hw:1,0

if i need instead the audio from your internal audio card

alsa://plughw

or this one

 alsa://hw:0,0

as you can seee the number 0,0 or 1,0 it’s related to this output

00-00: ALC861-VD Analog : ALC861-VD Analog : playback 1 : capture 1
00-06: Si3054 Modem : Si3054 Modem : playback 1 : capture 1
01-00: USB Audio : USB Audio : capture 1

for the webcam it’s the same but you need to configure vlc using this

Capture mode: Video for Linux 2
Video: /dev/video0
Audio: plughw

kde or gnome set vlc like default player for every formats kubuntu

Fast answer

type this in the konsole and and add these lines … *modify as need with brain*

kate /$HOME/.local/share/applications/mimeapps.list 

my file is this AUDIO + VIDEO = VLC

**NOTE IF YOU HAVE other application for html,text and images please consider only to add the video and the audio lines

[Added Associations]
video/x-flv=vlc.desktop;
video/x-msvideo=vlc.desktop;
video/3gpp=vlc.desktop;
video/annodex=vlc.desktop;
video/dv=vlc.desktop;
video/isivideo=vlc.desktop;
video/mlt-playlist=vlc.desktop;
video/mp2t=vlc.desktop;
video/mp4=vlc.desktop;
video/mpeg=vlc.desktop;
video/ogg=vlc.desktop;
video/quicktime=vlc.desktop;
video/vivo=vlc.desktop;
video/vnd.rn-realvideo=vlc.desktop;
video/wavelet=vlc.desktop;
video/x-anim=vlc.desktop;
video/x-flic=vlc.desktop;
video/x-flv=vlc.desktop;
video/x-matroska=vlc.desktop;
video/x-mng=vlc.desktop;
video/x-ms-asf=vlc.desktop;
video/x-ms-wmp=vlc.desktop;
video/x-ms-wmv=vlc.desktop;
video/x-msvideo=vlc.desktop;
video/x-nsv=vlc.desktop;
video/x-ogm+ogg=vlc.desktop;
audio/AMR-WB=vlc.desktop;
audio/AMR=vlc.desktop;
audio/aac=vlc.desktop;
audio/ac3=vlc.desktop;
audio/annodex=vlc.desktop;
audio/basic=vlc.desktop;
audio/midi=vlc.desktop;
audio/mp2=vlc.desktop;
audio/mp4=vlc.desktop;
audio/mpeg=vlc.desktop;
audio/ogg=vlc.desktop;
audio/prs.sid=vlc.desktop;
audio/vnd.rn-realaudio=vlc.desktop;
audio/x-adpcm=vlc.desktop;
audio/x-aifc=vlc.desktop;
audio/x-aiff=vlc.desktop;
audio/x-aiffc=vlc.desktop;
audio/x-ape=vlc.desktop;
audio/x-flac+ogg=vlc.desktop;
audio/x-flac=vlc.desktop;
audio/x-gsm=vlc.desktop;
audio/x-iriver-pla=vlc.desktop;
audio/x-it=vlc.desktop;
audio/x-m4b=vlc.desktop;
audio/x-matroska=vlc.desktop;
audio/x-minipsf=vlc.desktop;
audio/x-mo3=vlc.desktop;
audio/x-mod=vlc.desktop;
audio/x-mpegurl=vlc.desktop;
audio/x-ms-asx=vlc.desktop;
audio/x-ms-wma=vlc.desktop;
audio/x-musepack=vlc.desktop;
audio/x-pn-realaudio-plugin=vlc.desktop;
audio/x-psf=vlc.desktop;
audio/x-psflib=vlc.desktop;
audio/x-riff=vlc.desktop;
audio/x-s3m=vlc.desktop;
audio/x-scpls=vlc.desktop;
audio/x-speex+ogg=vlc.desktop;
audio/x-speex=vlc.desktop;
audio/x-stm=vlc.desktop;
audio/x-tta=vlc.desktop;
audio/x-voc=vlc.desktop;
audio/x-vorbis+ogg=vlc.desktop;
audio/x-wav=vlc.desktop;
audio/x-wavpack-correction=vlc.desktop;
audio/x-wavpack=vlc.desktop;
audio/x-xi=vlc.desktop;
audio/x-xm=vlc.desktop;
audio/x-xmf=vlc.desktop;

[Removed Associations]

refresh now your settings by typing this

kbuildsycoca4

note if you want add an application for example kmplayer too only for flv look at this example

video/x-flv=vlc.desktop;kde4-kmplayer.desktop;

Usefull stuff

Save old settings

mv /$HOME/.local/share/applications/mimeapps.list /$HOME/.local/share/applications/mimeapps.OLD

How can i reset what i did in this article?

 mv /$HOME/.local/share/applications/mimeapps.OLD   $HOME/.local/share/applications/mimeapps.list

How to set vlc like default video player

if you type into your konsole this

locate mime |  awk '/\/usr\/share\/mime\/video/{gsub (/\/usr\/share\/mime\//,""); gsub(/.xml/,""); a= $1 ;print $1"=vlc.desktop;"}' 

you will get a lots of stuff usefull to edit and set like default player vlc if you prefer other player just replace vlc.desktop on the code with for example kmplayer.desktop . If you want filter only the audio just use

locate mime |  awk '/\/usr\/share\/mime\/audio/{gsub (/\/usr\/share\/mime\//,""); gsub(/.xml/,""); a= $1 ;print $1"=vlc.desktop;"}' 

you should get something like this

video/3gpp=vlc.desktop;
video/annodex=vlc.desktop;
video/dv=vlc.desktop;
video/isivideo=vlc.desktop;
video/mlt-playlist=vlc.desktop;
video/mp2t=vlc.desktop;
video/mp4=vlc.desktop;
video/mpeg=vlc.desktop;
video/ogg=vlc.desktop;
video/quicktime=vlc.desktop;
video/vivo=vlc.desktop;
video/vnd.rn-realvideo=vlc.desktop;
video/wavelet=vlc.desktop;
video/x-anim=vlc.desktop;
video/x-flic=vlc.desktop;
video/x-flv=vlc.desktop;
video/x-matroska=vlc.desktop;
video/x-mng=vlc.desktop;
video/x-ms-asf=vlc.desktop;
video/x-ms-wmp=vlc.desktop;
video/x-ms-wmv=vlc.desktop;
video/x-msvideo=vlc.desktop;
video/x-nsv=vlc.desktop;
video/x-ogm+ogg=vlc.desktop;
video/x-sgi-movie=vlc.desktop;
video/x-theora+ogg=vlc.desktop;

edit the file

kate /$HOME/.local/share/applications/mimeapps.list 

FFmpeg

HOW TO TEST YOUR FFMPEG

FFmpeg handles a lots of formats but only if you install it correctly let’s go to test it

Type in a terminal :

ffmpeg -formats 2>&1 | grep aac

if you get

D aac ADTS AAC
D A mpeg4aac

E=Encoder and so…

Your ffmpeg is not able to use restricted formats like ac3 wma etc etc ! and you’ll get problems !

if you get

D aac ADTS AAC
DEA aac
D A mpeg4aac

your FFmpeg is compiled with aac supports and if you wanna encode on ac3 formats you HAVE TO USE like codec name aac!

EXAMPLE: ffmpeg -i INPUT -acodec aac OUTPUT
fi you get

D aac ADTS AAC
DEA libfaac
D A mpeg4aac

Your FFmpeg is compiled with aac supports but YOU HAVE TO USE LIBFAAC like codec name!

EXAMPLE: ffmpeg -i INPUT -acodec libfaac OUTPUT

this works for many codecs example xvid h264 etc etc

etc etc

HOW TO FIX FFMPEG on Kubuntu system

1-Add Medibuntu repository

then reinstall FFmpeg + these packages  (NUMBER COULD CHANGE BUT YOU CAN SEARCH WITH SYNAPTIC O KPACKAGEKIT )

sudo apt-get install ffmpeg libavdevice-unstripped-52 libavformat-unstripped-52 libavutil-unstripped-49 libpostproc-unstripped-51 libswscale-unstripped-0

Error that makes your ffmpeg sucks

error while loading shared libraries: libavutil.so.50: cannot open shared object file: No such file or directory

that is due to an older ffmpeg version on the pc you have to rid it

try this

sudo apt-get remove –-purge ffmpeg libavdevice-unstripped-52 libavformat-unstripped-52 libavutil-unstripped-49 libpostproc-unstripped-51 libswscale-unstripped-0 

then try again your ffmpeg or try to compile ffmpeg again.

HOW To FIx FFMPEG on Kubuntu 9.04 system COMPILING

sudo apt-get build-dep ffmpeg && sudo apt-get install libx264-dev  libxvidcore4-dev libopenjpeg-dev libamrwb-dev libamrnb-dev  checkinstall  libasound2-dev   libdc1394-22-dev   libgsm1-dev  libimlib2-dev libraw1394-dev libsdl1.2-dev libschroedinger-dev libspeex-dev  libtheora-dev  libvorbis-dev libx11-dev libxext-dev libxvmc-dev quilt texi2html zlib1g-dev libfaad-dev libdirac-dev libfaac-dev libmp3lame-dev

svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg

 cd ffmpeg && ./configure --prefix=/usr/local --enable-shared --enable-libmp3lame --enable-gpl --enable-libfaad --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libx264  --enable-libtheora --enable-libdc1394 --enable-nonfree --disable-stripping --enable-avfilter --enable-libdirac --disable-decoder=libdirac --enable-libschroedinger --disable-encoder=libschroedinger --enable-avfilter-lavf --enable-libamr-nb --enable-libamr-wb &&  make

HOW To FIx FFMPEG on Kubuntu 9.10 system COMPILING

This could help you to add some feauters on your ffmpeg when this article will get old.The most of configuration can be found here , i mean to enable codecs,

./configure --help | grep enable-lib

that should list every library you can enable. And as you can see on karmic koala 9.10 the old way to compile ffmpeg can not be used again, just because amr libraries have changed name and some feauters have been added like vdpau for nvdia cars only.

So now you need to install :

sudo apt-get install libopencore-amrnb-dev libopencore-amrwb-dev

when i tried to compile ffmpeg then i get some errors like this

ibavcodec/vdpau.h:76: error: expected specifier-qualifier-list before ‘VdpPictureInfoMPEG4Part2’

and of course this is an error because i have not disabled vdpau support that is only for nvidia cards. and i have an intel… well so you should search something to disable with

./configure --help | grep disable-

Because of course you use software like kdenlive or software that use ffmpeg YOU NEED TO ENABLE THIS OPTION ;

–enable-shared

And you should REMOVE FFMPEG AND EVERY OLD FFMPEG FROM YOUR SYSTEM THAT SHOULD BE INSTALLED ON

/usr

so to avoid some problems with libraries you need to install ffmpeg on /usr/local so the most of configure script has

/usr/local like prefix by default anyway to be sure ….

–prefix=/usr/local

So this could be a configuration :( here there is not x264 becasue on kubuntu karmic seems there are some problems with x264 version… -.-”  **)

--prefix=/usr/local --enable-shared --enable-gpl --enable-version3 --enable-nonfree  --enable-postproc --enable-avfilter --enable-avfilter-lavf --enable-pthreads --enable-x11grab  --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libdc1394 --enable-libdirac  --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame  --enable-libopenjpeg --enable-libschroedinger --enable-libtheora --enable-libvorbis  --enable-libxvid --disable-vdpau

and this one another to add some libraries that you never use in your life …

./configure  --prefix=/usr/local --enable-shared  --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-avfilter --enable-avfilter-lavf --enable-pthreads --enable-x11grab --enable-gray    --enable-bzlib --enable-libopencore-amrnb  --enable-libopencore-amrwb --enable-libdc1394  --enable-libdirac   --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame  --enable-libopenjpeg  --enable-libschroedinger  --enable-libspeex --enable-libtheora  --enable-libvorbis     --enable-libxvid   --enable-zlib  --enable-gprof  --enable-extra-warnings --disable-vdpau

if you want 264 encoder you should download and installl libx264 too… -.-”

git clone git://git.videolan.org/x264.git
git clone git://git.videolan.org/x264.git

cd x264  &&  ./configure --enable-shared  &&  make -j3  &&  sudo checkinstall


**if you want install normally you should use sudo make install instead of sudo checkinstall.

then recompile ffmpeg you should get errors on compiling ffmpeg just because this library is going to be installed in /usr/local/lib instead of /usr/lib…

for my own use i installed ffmpeg on /usr … even if this can be a pain in some situations

Kwave 0.8.3-2 Kubuntu 9.04 sound editor

lkwave

This is my way to compile kwave on kubuntu 9.04

sudo apt-get build-dep kwave

then install extra packages… just because who has made the stuff has forgotten this:

sudo apt-get install libsamplerate0-dev libasound2-dev libfftw3-dev

now download the latest svn (your should install subversion to use this command line…)

svn co https://kwave.svn.sourceforge.net/svnroot/kwave/trunk/ kwave

now you should see a kwave folder in your HOME…. if you see that folder type this

cd $HOME/kwave && mkdir $HOME/kwave/kwave-build && cd kwave-build

and then (the first configure the stuff…and it should not show errors…if you see errors stop it…)

cmake .. && make

install Kwave on your system…

with

sudo make install

** you could create your own deb package with checkinstall … (sudo apt-get install checkinstal)

instead of sudo make install type:

sudo checkinstall

k3b qt4 1.65 kubuntu 9.04

k3b1

dependeces

sudo apt-get install kdelibs5-dev libsamplerate0-dev libkcddb-dev libcdparanoia-dev genisoimage wodim dvd+rw-tools cdrdao libflac++-dev libdvdread-dev libtag1-dev libmusicbrainz4-dev libsndfile1-dev libvorbis-dev libmpcdec-dev libmad0-dev libavcodec-dev libmp3lame-dev libmpcdec-dev transcode vcdimager normalize-audio ffmpeg movixmaker-2

**if you have not dual core change make -j3 with make

cmake -DK3B_BUILD_K3BSETUP=OFF && make -j3

if any errors are shown you can do this

sudo make install

Normalize not found ? wtf –>soltuions see here

arecordmydesktop 0.0.7

i got everytime problems with my audio card and record mydesktop

Using 44100Hz instead.
Recording on device hw:0,0 is set to:
2 channels at 44100Hz
Capturing!
Broken pipe: Overrun occurred.
Broken pipe: Overrun occurred.
Broken pipe: Overrun occurred.
Broken pipe: Overrun occurred.
Broken pipe: Overrun occurred.
Broken pipe: Overrun occurred.
Broken pipe: Overrun occurred.     

ok and i got always a bad audio so i have used arecord like someone has suggested on launchpad

https://bugs.launchpad.net/ubuntu/+source/recordmydesktop/+bug/339648

so i have created my personal script to screen grabbin and i got it ! now i can do my screencast with very good audio and i can denoise it automatically.

you can find it here

INSTALLATION

Install this:

sudo apt-get install oggz-tools recordmydesktop vorbis-tools sox libsox-fmt-all

Download and save it on :

/usr/local/bin/arecordmydesktop

if you don’t want install kdialog then you should create a settings file like this in this location

$HOME/arecordmydesktop.txt

:

Format for video file: ogv
Video L Size: 1280
Video H Size: 800
Video Bitrate: 1000
Audio Bitrate: 192
Frame for second: 25
Frame for second recordmydesktop: 15
Sampling Rate: 44100
CPU(dual core = 2 ): 1
Mencoder profiler for lavc: None(faster)
Mencoder profiler for xvid: None(faster)
Mencoder profiler for h264: None(faster)


**EDIT:

jaunty version 0.0.6
Karmic re-version 0.0.7 (oggz-merge instead of oggzmerge…wth…)

#!/bin/bash
######################################################################
# based on a script from lauchpad i don't remember well xD
#Creative a kubuntu user
#thanks a lot to :
#
#
#
#irc bash script channel for suggestion fix and more thank u guys !!
#
# for this work expecially Trash form irc bash channel
######################################################################
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#the Free Software Foundation, either version 3 of the License, or
#(at your option) any later version.
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with this program.  If not, see
#
#
#
##check program#########################################
wokingfolder="$PWD"
tempfolder=/tmp/arecordmydesktop
noiseprofile="$HOME/noise.wav"
tempnamevideo="$tempfolder/temp.ogv"
tempnameaudio="$tempfolder/tempfull.wav"
if [[  -e "$tempfolder" ]];then
rm -Rf  "$tempfolder" ; mkdir "$tempfolder"
else
mkdir "$tempfolder"
fi
functionusageerror(){
echo "###############################################################"
echo ""
echo "arecordmydesktop version 0.0.7"
echo ""
echo "Record your desktop with recordmydesktop and arecord for audio "
echo "This resolve the problem with audio syncro"
echo "###############################################################"
echo ""
echo ""
echo "Usage:
arecordmydesktop -d  -o
Press ENTER to stop capturing and  start encoding
output format will be added automatically
**Note if you have not kdialog please see \"how to create settings file\" down
Options
-o  :   without extension
-d  : denoise audio 1-10
example:
arecordmydesktop -d 1 -o myfile
-r : Delete old settings
arecordmydesktop -r
-h : print this help
###################
DENOISE FUNCTION
###################
in order to use this function you have to record some
seconds of silence (\"perfect silence\") in this file
$HOME/noise.wav
typing this :
rec -c 1 -o $HOME/noise.wav
then the script will do automatically the rest
anyway here some stuff (you should use : SoX v14.2.0)
#############################################
SOX denoise function ; generating noise profile
##############################################
sox -c 1 $HOME/noise.wav -n trim 0 2 noiseprof $HOME/speech.noise-profile
#############################################
SOX denoise function ; denoise
##############################################
sox -c 1  INPUTFILE.WAV OUTFILE.wav noisered $HOME/speech.noise-profile  VALUE
value shoul be 0-1 (default 0.5)
i have scaled to 1-10 because i don't want write 0. stuff
you shouldn't denoise with >0.5 (in my so >5 for arecordmydesktop)
** note: -c 1 means 1 channel if you record with 1 channel and you try to use
2 channel you could get sox get this message
line 173: 22562 Segmentation fault      sox \$tempnameaudio \$tempfolder/temp.wav noisered \$HOME/speech.noise-profile \$1
so please make sure you used 1 channels
############################
HOW TO CREATER SETTINGS FILE
############################
If you have not kdialog in your system you can create
a settings file like this one and save here
$HOME/arecordmydesktop.txt
##########Settingsfile################################
Format for video file: ogv
Video L Size: 1280
Video H Size: 800
Video Bitrate: 1000
Audio Bitrate: 192
Frame for second: 25
Frame for second recordmydesktop: 15
Sampling Rate: 44100
CPU(dual core = 2 ): 1
Mencoder profiler for lavc: None(faster)
Mencoder profiler for xvid: None(faster)
Mencoder profiler for h264: None(faster)
########################################################
"
}
checkprogram(){
program[0]=recordmydesktop
program[1]=lame
program[2]=mencoder
program[3]=oggenc
program[4]=oggz-merge
program[5]=faac
program[6]=xrandr
program[7]=ffmpeg2theora
#program[3]=kdialog
for program in "${program[@]}";
do if ! type -p "$program" >/dev/null;
then echo "$program not found; PLEASE INSTALL IT" >&2
echo "error exiting..." >&2
echo
echo "You need of xrandr and..."
echo "For debian : sudo apt-get install oggz-tools recordmydesktop  mencoder vorbis-tools sox libsox-fmt-all ffmpeg2theora faac lame  "
exit 1;
fi; done
}
functionaudiodenoise(){
if [[ ! $1  ]]; then
echo "No denoise"
mv "$tempnameaudio" "$tempfolder/temp.wav"
else
if [[ ! -e  $HOME/nspeech.noise-profile  ]]; then #if doesn't exist the file noiseprofile.prf
if [[  -e "$noiseprofile" ]];then
echo "generating noiseprofile.."; sox -c 1 $noiseprofile -n trim 0 2 noiseprof $HOME/speech.noise-profile
else
echo "sorry no noise profile found. Please enter record 15 seconds of silence and save with this name $noiseprofile  "
echo "Error you want denoise but you didn't prepare a $HOME/noise.wav file before"
echo ""
echo "use this before rec -c 1 -o $HOME/noise.wav"
echo ""
echo "rec -c 1 -o $HOME/noise.wav"
echo ""
exit
fi
echo "denoising..please wait"
fi
sox -c 1 $tempnameaudio $tempfolder/temp.wav noisered $HOME/speech.noise-profile  $1
fi
}
functionclean(){
[[  -e "$tempfolder" ]]   && rm -Rf  "$tempfolder" || mkdir "$tempfolder"
exit 2
}
functionrecord(){
echo $1
# Starts audio recording.
arecord --quiet --file-type wav --rate=44100 > $tempnameaudio & pidA=$!
echo "Audio recording started with process ID $pidA"
# Starts recordmydesktop without
recordmydesktop -fps $1 --no-sound --overwrite -o $tempnamevideo 2>/tmp/arecord.txt &
pidV=$!
echo "Video recording started with process ID $pidV"
#foo& foo_pid=$! stuff; wait; echo everything has finished
# Waits for the user to press enter.
echo ""
echo "Press ENTER to finish."
read nothing
# Kills arecord and sends a Ctrl+C signal to recordmydesktop.
echo "Terminating processes $pidA and $pidV..."
kill -15 $pidA $pidV ; wait;
}
#
if [[ ! -e  "$HOME/arecordmydesktop.txt"  ]];then
defaulresolutionL=$(xrandr  | awk '/, current /{print $8}')
defaulresolutionH=$(xrandr  | awk '/, current /{gsub(/\,/,"");print $10}')
echo "No configuration file found ... creating"
if ! type -p kdialog >/dev/null; #if doesn't exist kdialog...
then
echo "No kialog detected generating default $HOME/arecordmydesktop.txt..."
echo
echo "Format for video file: ogv"   >>$HOME/arecordmydesktop.txt
echo "Video L Size: 1280"   >>$HOME/arecordmydesktop.txt
echo "Video H Size: 800"   >>$HOME/arecordmydesktop.txt
echo "Video Bitrate: 1000"   >>$HOME/arecordmydesktop.txt
echo "Audio Bitrate: 192"   >>$HOME/arecordmydesktop.txt
echo "Frame for second: 25"   >>$HOME/arecordmydesktop.txt
echo "Frame for second recordmydesktop: 15"   >>$HOME/arecordmydesktop.txt
echo "Sampling Rate: 44100"   >>$HOME/arecordmydesktop.txt
echo "CPU(dual core = 2 ): 1"   >>$HOME/arecordmydesktop.txt
echo "Mencoder profiler for lavc: None(faster)"   >>$HOME/arecordmydesktop.txt
echo "Mencoder profiler for xvid: None(faster)"   >>$HOME/arecordmydesktop.txt
echo "Mencoder profiler for h264: None(faster)"   >>$HOME/arecordmydesktop.txt
else
echo "Kdialog detected.."
echo -n "Format for video file: ">>"$HOME/arecordmydesktop.txt" &&  kdialog --combobox $"Choose Your Prefered Format Video:" ogv avi mov mp4 flv mpeg2 mpeg1  wmv --default ogv --title $"Video Format">>"$HOME/arecordmydesktop.txt"
echo >>"$HOME/arecordmydesktop.txt"
echo -n "Video L Size: " >>"$HOME/arecordmydesktop.txt" &&  kdialog --combobox $" Video L Size Fullscreen($defaulresolutionL) :" 2048 1280 1024 1080 800 720 640 576 480 320 240 272 --default  $defaulresolutionL  --title $"Prefered Video Bitrate (pixel)">>"$HOME/arecordmydesktop.txt"
echo >>"$HOME/arecordmydesktop.txt"
echo -n "Video H Size: " >>"$HOME/arecordmydesktop.txt" &&  kdialog --combobox $"Video H Size Fullscreen($defaulresolutionH) :" 2048 1280 1024 1080 800 720 640 576 480 320  240 272   --default  $defaulresolutionH  --title $"Prefered Video Bitrate (pixel)">>"$HOME/arecordmydesktop.txt"
echo >>"$HOME/arecordmydesktop.txt"
echo -n "Video Bitrate: " >>"$HOME/arecordmydesktop.txt" &&  kdialog --combobox $"Choose Your Prefered Video Bitrate (KB) :" 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2200 2400 2600 2800 2900 3000 4000 5000 6000   --default 1000  --title $"Prefered Video Bitrate (KB)">>"$HOME/arecordmydesktop.txt"
echo >>"$HOME/arecordmydesktop.txt"
echo -n "Audio Bitrate: " >>"$HOME/arecordmydesktop.txt" &&  kdialog --combobox $"Choose Your Prefered Audio Bitrate for video file (KB) :" 32 64 92 128 192 256 320 --default 192  --title $"Prefered Audio Bitrate  for video file (KB)">>"$HOME/arecordmydesktop.txt"
echo >>"$HOME/arecordmydesktop.txt"
echo -n "Frame for second: " >>"$HOME/arecordmydesktop.txt" &&  kdialog --combobox $"Choose Your Prefered Frame for seconds Value for mencoder:" 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 29 21 22 23 24 25 27 28 29 30000/1001 30 --default 25  --title $"Frame for seconds Value">>"$HOME/arecordmydesktop.txt"
echo >>"$HOME/arecordmydesktop.txt"
echo -n "Frame for second recordmydesktop: " >>"$HOME/arecordmydesktop.txt" &&  kdialog --combobox $"Choose Your Prefered Frame when you record :" 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 29 21 22 23 24 25 27 28 29  30   --default 15  --title $"Frame for seconds Value">>"$HOME/arecordmydesktop.txt"
echo >>"$HOME/arecordmydesktop.txt"
echo -n "Sampling Rate: " >>"$HOME/arecordmydesktop.txt" &&  kdialog --combobox $"Choose Your Prefered Resampling Rate  (HZ) :" 8000 16000 44100 48000 --default 44100  --title $"Resampling Rate (KB)">>"$HOME/arecordmydesktop.txt"
echo >>"$HOME/arecordmydesktop.txt"
echo -n "CPU(dual core = 2 ): " >>"$HOME/arecordmydesktop.txt" &&  kdialog --combobox $"CPU (dual core = 2 ) :" 1 2 3 4 5 6 7 8 16 3.4 xD --default 1  --title $"CPU">>"$HOME/arecordmydesktop.txt"
echo >>"$HOME/arecordmydesktop.txt"
echo -n "Mencoder profiler for lavc: " >>"$HOME/arecordmydesktop.txt" &&  kdialog --combobox $"Mencoder Prefered Profile lavc  :" $"None(faster)" $"Realtime" $"Fast" $"High quality" $"Very High Quality"   --default $"None(faster)"  --title $"CPU">>"$HOME/arecordmydesktop.txt"
echo >>"$HOME/arecordmydesktop.txt"
echo -n "Mencoder profiler for xvid: " >>"$HOME/arecordmydesktop.txt" &&  kdialog --combobox $"Mencoder Prefered Profile xvid  :" $"None(faster)" $"Realtime" $"Fast" $"High quality" $"Very High Quality"   --default $"None(faster)"  --title $"CPU">>"$HOME/arecordmydesktop.txt"
echo >>"$HOME/arecordmydesktop.txt"
echo -n "Mencoder profiler for h264: " >>"$HOME/arecordmydesktop.txt" &&  kdialog --combobox $"Mencoder Prefered Profile H264  :" $"None(faster)"  $"Fast" $"High quality" $"Very High Quality"   --default $"None(faster)"  --title $"CPU">>"$HOME/arecordmydesktop.txt"
echo >>"$HOME/arecordmydesktop.txt"
fi
fi
pcontainervideo=$(awk '/Format for video file:/ {print $5}' "$HOME/arecordmydesktop.txt")
pvideoLSIZE=$(awk '/Video L Size:/ {print $4}' "$HOME/arecordmydesktop.txt")
pvideoHSIZE=$(awk '/Video H Size:/ {print $4}' "$HOME/arecordmydesktop.txt")
pvideobitrate=$(awk '/Video Bitrate:/ {print $3}' "$HOME/arecordmydesktop.txt")
paudiobitrate=$(awk '/Audio Bitrate:/ {print $3}' "$HOME/arecordmydesktop.txt")
pfpsrec=$(awk '/Frame for second recordmydesktop:/ {print $5}' "$HOME/arecordmydesktop.txt")
pfps=$(awk '/Frame for second mencoder:/ {print $4}' "$HOME/arecordmydesktop.txt")
presamplingrate=$(awk '/Sampling Rate:/ {print $3}' "$HOME/arecordmydesktop.txt")
pcpu=$(awk '/CPU/ {print $6}' "$HOME/arecordmydesktop.txt")
pmencoderprofilelavc=$(awk '/Mencoder profiler for lavc:/ {print $5}' "$HOME/arecordmydesktop.txt")
pmencoderprofilexvid=$(awk '/Mencoder profiler for xvid:/ {print $5}' "$HOME/arecordmydesktop.txt")
pmencoderprofileh264=$(awk '/Mencoder profiler for h264:/ {print $5}' "$HOME/arecordmydesktop.txt")
if [[ $pcpu == 1 ]] ;then
mcpu=""
else
mcpu=":threads=$pcpu"
fi
resolution="-vf scale=$pvideoLSIZE:$pvideoHSIZE,harddup"
checkprogram
case $1 in
-d)
noiselevel=$2; shift 2 ;outputfile=$2
if [[ ! "$noiselevel"  ]]; then
functionusageerror
echo " please set denoise value (1-10)"
exit
elif [[ $noiselevel -lt 10 ]]; then  # -lt means less
noiselevel="0.$noiselevel"
echo "Denoise value " $noiselevel
elif [[ $noiselevel -ge 10 ]]; then  # -ge Greater or Equal
noiselevel=1
echo "Denoise value  $noiselevel"
fi
if [[ ! $outputfile  ]]; then
echo "no name...."
outputfile=screencast
fi
;;
-o)
outputfile=$2; shift 1 ; checkenoise=$2 ;shift 1; noiselevel=$2
if [[ ! $checkenoise  ]]; then
if [[ ! $outputfile  ]];then
outputfile=screencast
fi
elif [[ ! $noiselevel  ]]; then
functionusageerror
echo " please set denoise value (1-10)"
exit
elif [[ $noiselevel -lt 10 ]]; then
noiselevel=0.$noiselevel
echo "Denoise value " $noiselevel
if [[ ! $outputfile  ]];then
outputfile=screencast
fi
elif [[ $noiselevel -ge 10 ]]; then
noiselevel=1
echo "Denoise value " $noiselevel
if [[ ! $outputfile  ]];then
outputfile=screencast
fi
fi
;;
-h)
functionusageerror
exit
;;
-r)
echo "Deleting settings..."
rm "$HOME/arecordmydesktop.txt"
exit
;;
*)
echo  " hey! lazy $USER detected mm are you  my  programmer?
outputfile "
outputfile=screencast
;;
esac
functionrecord $pfpsrec
functionaudiodenoise $noiselevel
#functioname
case $pcontainervideo in
ogv)
defaulresolutionL=$(xrandr  | awk '/, current /{print $8}')
defaulresolutionH=$(xrandr  | awk '/, current /{gsub(/\,/,"");print $10}')
if [[ $defaulresolutionL===$pvideoLSIZE &&  $defaulresolutionH==$pvideoHSIZE ]]; then
oggenc -b $paudiobitrate $tempfolder/temp.wav  -o $tempfolder/temp.oga 2>&1
oggz-merge --output $wokingfolder/$outputfile.ogv  $tempfolder/temp.oga $tempnamevideo
else
oggenc -b $paudiobitrate  $tempfolder/temp.wav  -o $tempfolder/temp.oga 2>&1
oggz-merge --output $tempfolder/resize.ogv  $tempfolder/temp.oga $tempnamevideo
ffmpeg2theora -x $pvideoLSIZE -y $pvideoHSIZE  $tempfolder/resize.ogv -o $wokingfolder/$outputfile.ogv
fi
;;
avi)
mvcodec=xvid
macodec=copy
# Converts the audio to mp3.
lame -m j -h --vbr-new -b $paudiobitrate $tempfolder/temp.wav  -o $tempfolder/temp.mp3
#oggenc -R $presamplingrate -b $paudiobitrate
# Converts the video to avi.
mencoder $resolution -ovc $mvcodec -xvidencopts bitrate=$pvideobitrate$mcpu -oac $macodec -audiofile $tempfolder/temp.mp3 $tempnamevideo -o "$wokingfolder/$outputfile.$pcontainervideo"
echo "mencoder $resolution -ovc $mvcodec  -xvidencopts bitrate=$pvideobitrate$mcpu -oac $macodec -audiofile $tempfolder/temp.mp3 $tempnamevideo -o "$wokingfolder/$outputfile.$pcontainervideo""
;;
mp4|mov)
mvcodec=x264
macodec=copy
faac -b $paudiobitrate -c $presamplingrate  -o  $tempfolder/temp.aac $tempfolder/temp.wav
mencoder  $resolution -ovc $mvcodec -x264encopts bitrate=$pvideobitrate$mcpu -oac copy -audiofile $tempfolder/temp.aac $tempnamevideo -o "$wokingfolder/$outputfile.$pcontainervideo"
;;
flv)
mvcodec=lavc
macodec=copy
lame -m j -h --vbr-new -b $paudiobitrate $tempfolder/temp.wav  -o $tempfolder/temp.mp3
mencoder $resolution  -ovc $mvcodec -lavcopts vcodec=flv:vbitrate=$pvideobitrate$mcpu -oac copy -audiofile $tempfolder/temp.mp3 $tempnamevideo -o "$wokingfolder/$outputfile.$pcontainervideo"
;;
mpeg2)
pcontainervideo=mpeg
mvcodec=lavc
macodec=copy
lame -m j -h --vbr-new -b $paudiobitrate $tempfolder/temp.wav  -o $tempfolder/temp.mp3
mencoder $resolution  -ovc $mvcodec -lavcopts vcodec=mpeg2video:vbitrate=$pvideobitrate$mcpu -oac copy -audiofile $tempfolder/temp.mp3 $tempnamevideo -o "$wokingfolder/$outputfile.$pcontainervideo"
;;
mpeg1)
pcontainervideo=mpeg
mvcodec=lavc
macodec=copy
lame -m j -h --vbr-new -b $paudiobitrate $tempfolder/temp.wav  -o $tempfolder/temp.mp3
mencoder $resolution  -ovc $mvcodec -lavcopts vcodec=mpeg1video:vbitrate=$pvideobitrate$mcpu -oac copy -audiofile $tempfolder/temp.mp3 $tempnamevideo -o "$baseName-final".$pcontainervideo
functionclean
;;
wmv)
mvcodec=lavc
macodec=copy
lame -m j -h --vbr-new -b $paudiobitrate $tempfolder/temp.wav  -o $tempfolder/temp.mp3
mencoder $resolution  -ovc $mvcodec -lavcopts vcodec=wmv2:vbitrate=$pvideobitrate:abitrate=$paudiobitrate$mcpu -oac lavc -audiofile $tempfolder/temp.mp3 $tempnamevideo -o "$baseName-final".$pcontainervideo
;;
esac
echo "file is here $wokingfolder/$outputfile.$pcontainervideo"

Sox Denoise

1. Create a noise profile

sox -c 1 SILENCE.WAV -n trim 0 2 noiseprof $HOME/speech.noise-profile

2. Denoise


sox INPUTFILE NOISE.WAV OUT-DENOISED-FILE.WAV noisered $HOME/speech.noise-profile  VALUE

where VALUE should be 0-1 (default 0.5 , with value >0.5 you will get bad denoising.)

Example:

sox inputfile.wav filtredfile.wav noisered $HOME/speech.noise-profile 0.3


Medibuntu short

For legal stuff please visit the complete webpage

DOUBLE CLICK ON THE CODE TO SELECT IT

Add Medibuntu to your sources.list, as well as its GPG key to your keyring. Make sure to use the correct sources.list that corresponds to your current distribution.

  • Any Ubuntu Release and keyring:

    sudo wget http://www.medibuntu.org/sources.list.d/`lsb_release -cs`.list --output-document=/etc/apt/sources.list.d/medibuntu.list; sudo apt-get -q update; sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring; sudo apt-get -q update
  • Ubuntu 9.04 “Jaunty Jackalope”:

    sudo wget http://www.medibuntu.org/sources.list.d/jaunty.list --output-document=/etc/apt/sources.list.d/medibuntu.list
  • Ubuntu 8.10 “Intrepid Ibex”:

    sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list --output-document=/etc/apt/sources.list.d/medibuntu.list
  • Ubuntu 8.04 “Hardy Heron”:

    sudo wget http://www.medibuntu.org/sources.list.d/hardy.list --output-document=/etc/apt/sources.list.d/medibuntu.list

TomTom And TomPlayer

Create a BACKUP of your  tomtom FLASH card

TomTom is linux …. so Mplayer is working right now … on tomtom one

HOW TO
  1. Download this   http://sourceforge.net/projects/tomplayer
  2. Extract somewhere and go in the folder just created and you will see a “ttsystem file ” you have to RENAME the file ttsystem because in the root of your tomtom there also a ttsystem file and if you replace the orginal file with this one your tomtom will become only a simple video audio player.
  3. then copy  every file on the root of your tomtom’s flash card
  4. then restart your Tomtom (with the flash card inside …) You could note your tomtom is a bit slower on booting …. Wait a while …
  5. GO in the last page of your tomtom and click on TomPlayer Icon as you can see in the picture above

Automatic Slideshow Script for Kdenlive 0.7??

i have to say it didn’t think it was so easy but i am at 75% of this script . And it is working…

Edit

update

the script is done! still some problem but wtf it is working pretty well

Edit 2 :

AND WE GOT IT! FINISHED I WILL TEST BUT IT’S FINISHED

edit 3

we got problems with tha latest version of kdenlive and with few time we are on hard trouble…. someone should help …..

Follow

Get every new post delivered to your Inbox.