• stephen@mathsgrinds.ie

Maths Grinds ie

  • Grinds
    • Junior Cert Maths Grinds
    • Leaving Cert Maths Grinds
    • Applied Maths Grinds
    • Leaving Cert Physics Grinds
    • University Maths Grinds
    • University Statistics Grinds
    • University Physics Grinds
  • Classes
    • Christmas Revision
    • Leaving Cert Applied Maths
    • Leaving Cert Maths
    • Leaving Cert Physics
  • Corporate
  • Thesis
  • Blog
  • Contact
  • Login
 
 

Screencasting

Posted Oct 30, 12:42 am

So, this one time I forgot to turn the mic on during a class I was recoding, and so, no sound. And I thought afterwards, heck, I should write a little script that does all the things I need to do to record a lesson. So this script will turn the mic on, open mypaint, resize the screen, start recording, convert the output and stitch it to me "intro/exit" video byte. All I need to do is run this script and after is a go and the output it saved into my video folder and ready for uploading to youtube. Cool :)

#!/bin/bash
mypaint -f &
x=800;y=600;
xrandr -s \$x"x"\$y
xrandr --output VGA1 --mode \$x"x"\$y
NAME=`date +%d-%m-%Y_%H:%M:%S`
META="(C) Stephen Easley-Walsh www.mathsgrinds.ie"
cd /home/hp/Videos
amixer -q -c 0 sset 'Mic',0 unmute; amixer set Capture 50%; arecord -d 1 > /dev/null
recordmydesktop --on-the-fly-encoding --v_quality=63 --v_bitrate=2000000 --s_quality=10 --quick-subsampling --channels=1 --freq=8000 --stop-shortcut=Control+q --pause-shortcut=Control+p --fps=4 --output=".~~\$NAME.ogv"
ffmpeg -y -vsync 1 -i ".~~\$NAME.ogv" -vf scale=\$x:\$y -c:v libx264 -preset ultrafast -crf 23 -c:a libvorbis -q:a 5 -pix_fmt yuv420p -r 16 -ar 44100 -ac 1 -metadata title="\$META" ".~~\$NAME.mkv"
ffmpeg -y -vsync 1 -i ".Stephen.mp4" -vf scale=\$x:\$y -c:v libx264 -preset ultrafast -crf 23 -c:a libvorbis -q:a 5 -pix_fmt yuv420p -r 16 -ar 44100 -ac 1 -metadata title="\$META" ".Stephen.mkv"
mkvmerge -o "\$NAME.mkv" ".~~\$NAME.mkv" +".Stephen.mkv"
if [ -f "\$NAME.mkv" ]
then
rm ".~~\$NAME.ogv"; rm ".~~\$NAME.mkv"; clear;
fi
killall mypaint
exit



Author
Stephen Easley-Walsh


 

© 2008-2015 Stephen Easley-Walsh. ALL RIGHTS RESERVED. This website contains material protected under International Copyright Laws and Treaties. Any unauthorized use of this material is prohibited. No part of this website may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system without express written permission from the author.You can read the Privacy Policy here.

HTML5 Powered

HTML 5 VALID   |   CSS 3 VALID   |   SITEMAP   |   SERVER