HOW-TO: Make a screencast with KXStudio

Official support for the KXStudio Linux distribution and applications.
More info at http://kxstudio.linuxaudio.org/

Moderators: falkTX, MattKingUSA, khz

User avatar
falkTX
Established Member
Posts: 6646
Joined: Sat Jan 09, 2010 3:04 pm

HOW-TO: Make a screencast with KXStudio

Postby falkTX » Fri Aug 03, 2012 7:00 pm

hey guys, I'll be soon making some KXStudio related screencasts, so I've updated my auto-rec scripts to work in KXStudio 12.04 only.
This works in KXStudio with KDE, Gnome2 or XFCE. Other DEs can be supported if you know how to start them via command-line (PM me if interested in working on that).
Make sure your system is fully up-to-date before proceeding.

First, install the scripts:

Code: Select all

sudo apt-get install kxstudio-scripts


Now, open 2 separate terminals or tabs (Yakuake is very useful here).
On the first terminal, run:

Code: Select all

xrec_1 kde4 # alternatively use gnome2 or xfce4

^That will create a new X window with 1280x720 resolution (ideal for Youtube 720p videos). Apps opened in this new X window will be shown inside it. You should fiddle with this setup a bit to get used to it.
This first script will also kill your current desktop. Don't worry, you'll get it back afterwards. Alt+Tab will still work as usual, use that to change windows.
You shouldn't close this new X window.

Now on a different terminal, run:

Code: Select all

xrec_2

^That will start the actual recording. Make sure to connect any output audio you want to the screencast client!
When done recording, press Ctrl+C on this terminal window.
There will be 2 files both saved in ~/Screencasts, using current date and time in their filenames. You'll get a lossless file and a highly compressed one, use as you see fit.
To do a new recording, just run "xrec_2" again as many times as you need.

When done, press Ctrl+C in the first terminal window.

Here's 2 demo videos I made with this:
http://youtu.be/0ZyaufDJF58
http://youtu.be/esAqHWi_Zi8

Many thanks to AutoStatic for the initial scripts and male for the ffmpeg audio+video sync patch!

User avatar
briandc
Established Member
Posts: 1321
Joined: Sun Apr 29, 2012 3:17 pm
Contact:

Re: HOW-TO: Make a screencast with KXStudio

Postby briandc » Sat Sep 22, 2012 10:54 am

I've thought about doing a screencast. But I'm using XFCE. Any suggestions? (I've never made one before, but it would definitely be worth the try..)

brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com

User avatar
falkTX
Established Member
Posts: 6646
Joined: Sat Jan 09, 2010 3:04 pm

Re: HOW-TO: Make a screencast with KXStudio

Postby falkTX » Sat Sep 22, 2012 11:02 am

briandc wrote:I've thought about doing a screencast. But I'm using XFCE. Any suggestions? (I've never made one before, but it would definitely be worth the try..)

brian


For that we need to know the exact CLI commands that start the XFCE stuff.
I know the Window manager is "xfwm4", but what about the desktop? does it need to run a separate app for the panel?

if you know a bit about bash scripts, you can just edit the x_rec1 script and add there XFCE4 support.
the xfce section would be something like:

Code: Select all

start_screen_xfce4 () {
# start XFCE
xfce-desktop &
xfce-panel &
xfwm4
# wait for ctrl+c here
}

^that of course won't work, it's just to give the base idea.

wolftune
Established Member
Posts: 1285
Joined: Fri Feb 24, 2012 7:40 pm
Location: Portland, OR
Contact:

Re: HOW-TO: Make a screencast with KXStudio

Postby wolftune » Fri Oct 26, 2012 3:23 am

Works great!
http://youtu.be/IusGRX7rjSM

I was frustrated, however, that I couldn't get kdenlive to do screen recording directly. It had some error.
I would like to do more advanced screencasting that zooms in on certain sections of the screen.

Anyway, always more to learn. And I hope to eventually do more and create more KXStudio how-to stuff!

Cheers!
Last edited by wolftune on Fri Oct 26, 2012 6:06 am, edited 1 time in total.
Aaron Wolf
Music teacher, scholar
http://wolftune.com

User avatar
falkTX
Established Member
Posts: 6646
Joined: Sat Jan 09, 2010 3:04 pm

Re: HOW-TO: Make a screencast with KXStudio

Postby falkTX » Fri Oct 26, 2012 4:05 am

wolftune wrote:Works great!
http://youtu.be/H5BBUWYnT0o

I was frustrated, however, that I couldn't get kdenlive to do screen recording directly. It had some error.
I would like to do more advanced screencasting that zooms in on certain sections of the screen.

Anyway, always more to learn. And I hope to eventually do more and create more KXStudio how-to stuff!

Cheers!

nice, I'm glad the script is useful :)
I agree that a tool for screen-zomming would be great to have. I know compiz had a plugin like that (meta + mouse-wheel would zoom on the screen).

wolftune
Established Member
Posts: 1285
Joined: Fri Feb 24, 2012 7:40 pm
Location: Portland, OR
Contact:

Re: HOW-TO: Make a screencast with KXStudio

Postby wolftune » Fri Oct 26, 2012 6:07 am

Whoops, typo. Had to rerender and reupload:
http://youtu.be/IusGRX7rjSM
Aaron Wolf
Music teacher, scholar
http://wolftune.com

wolftune
Established Member
Posts: 1285
Joined: Fri Feb 24, 2012 7:40 pm
Location: Portland, OR
Contact:

Re: HOW-TO: Make a screencast with KXStudio

Postby wolftune » Fri Oct 26, 2012 6:08 am

falkTX wrote:nice, I'm glad the script is useful :)
I agree that a tool for screen-zomming would be great to have. I know compiz had a plugin like that (meta + mouse-wheel would zoom on the screen).


Actually, KDE has a zoom function in the desktop effects. I played with it a while before. I guess I could see about just using that…!
Aaron Wolf
Music teacher, scholar
http://wolftune.com

carlos
Established Member
Posts: 9
Joined: Sun Nov 25, 2012 8:18 pm

Re: HOW-TO: Make a screencast with KXStudio

Postby carlos » Wed Jan 09, 2013 10:29 pm

Hi, I'm a very happy user of KXstudio. Today I'm testing these great scripts for screencasting. if anyone is interested, I added xrec_1 options for using LXDE and Lubuntu. Also for Mate DE http://mate-desktop.org/, but there is a problem with the mouse cursor that I don't know how to solve, I don't know anything about programming, so if anyone wants to try and correct what may be wrong ...

Using Lubuntu or LXDE works fine for me.
Thanks a lot and sorry about my english.
Cheers.




Code: Select all

#!/bin/bash

# all dependencies:
# $ sudo apt-get install xserver-xephyr libav-tools jack-capture xterm

init_screen () {
# Set up nested X server
Xephyr -keybd ephyr,,,xkbmodel=evdev -br -reset -screen 1280x720x24 -dpi 96 :2 &
sleep 3
}

start_screen_gnome2 () {
# set environment
export DISPLAY=:2.0

# start Gnome
gnome-panel &
nautilus

# wait for ctrl+c here
export DISPLAY=:0
}


start_screen_mate () {
# set environment
export DISPLAY=:2.0

# start Mate
mate-panel &
caja

# wait for ctrl+c here
export DISPLAY=:0
}

start_screen_kde4 () {
# set environment
export DISPLAY=:2.0
export KWIN_COMPOSE=N

# kill current desktop, only 1 instance allowed
killall plasma-desktop plasma-desktop.kde4

# start KDE
plasma-desktop
kwin

# wait for ctrl+c here, restore desktop
export DISPLAY=:0
plasma-desktop
}

start_screen_xfce4 () {
# set environment
export DISPLAY=:2.0

# kill current panel, only 1 instance allowed
killall xfce4-panel

# start XFCE
xfce4-panel &
xfdesktop &
xfwm4

# wait for ctrl+c here, restore desktop
export DISPLAY=:0
xfce4-panel &
}

start_screen_lubuntu () {
# set environment
export DISPLAY=:2.0

# kill current panel, only 1 instance allowed
#killall lxpanel

# start LUBUNTU
startlubuntu

# wait for ctrl+c here, restore desktop
export DISPLAY=:0
}

start_screen_lxde () {
# set environment
export DISPLAY=:2.0

# kill current panel, only 1 instance allowed
#killall lxpanel

# start LXDE
startlxde

# wait for ctrl+c here, restore desktop
export DISPLAY=:0
}

case $1 in
  gnome2|-gnome2|--gnome2)
init_screen
start_screen_gnome
  ;;

  mate|-mate|--mate)
init_screen
start_screen_mate
  ;;

  kde4|-kde4|--kde4)
init_screen
start_screen_kde4
  ;;

  xfce4|-xfce4|--xfce4)
init_screen
start_screen_xfce4
  ;;

  lubuntu|-lubuntu|--lubuntu)
init_screen
start_screen_lubuntu
  ;;

  lxde|-lxde|--lxde)
init_screen
start_screen_lxde
  ;;

  *)
echo "usage: xrec_1 <DE>

DE can be:
    -gnome2     Gnome2 session
    -mate     Mate session
    -kde4       KDE4 session
    -xfce4      XFCE4 session
    -lubuntu      LUBUNTU session
    -lxde      LXDE session
"
  ;;

esac

User avatar
briandc
Established Member
Posts: 1321
Joined: Sun Apr 29, 2012 3:17 pm
Contact:

Re: HOW-TO: Make a screencast with KXStudio

Postby briandc » Mon Feb 11, 2013 4:44 pm

Falk,

I'd like to try my hand at making a screencast of mx44, using XFCE (you wrote above that this is possible now). After I add the scripts, what commands do I use?

Thanks,
brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com

User avatar
falkTX
Established Member
Posts: 6646
Joined: Sat Jan 09, 2010 3:04 pm

Re: HOW-TO: Make a screencast with KXStudio

Postby falkTX » Mon Feb 11, 2013 4:52 pm

briandc wrote:Falk,

I'd like to try my hand at making a screencast of mx44, using XFCE (you wrote above that this is possible now). After I add the scripts, what commands do I use?

The scripts are already packaged in KXStudio (and updated), just install 'kxstudio-scripts'.

Just follow the steps on the first post, using 'xrec_1 xfce4' instead of kde4.

User avatar
briandc
Established Member
Posts: 1321
Joined: Sun Apr 29, 2012 3:17 pm
Contact:

Re: HOW-TO: Make a screencast with KXStudio

Postby briandc » Mon Feb 11, 2013 5:03 pm

falkTX wrote:The scripts are already packaged in KXStudio (and updated), just install 'kxstudio-scripts'.

Just follow the steps on the first post, using 'xrec_1 xfce4' instead of kde4.


Ok, thanks. I'm crossing my fingers! :D

brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com

User avatar
briandc
Established Member
Posts: 1321
Joined: Sun Apr 29, 2012 3:17 pm
Contact:

Re: HOW-TO: Make a screencast with KXStudio

Postby briandc » Mon Feb 11, 2013 5:10 pm

I also need to know:

you wrote that the audio and video are saved separately. Do I have to load them into kdenlive (or similar) and sync them together manually? (I was hoping I'd have a finished product automatically.)


brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com

User avatar
falkTX
Established Member
Posts: 6646
Joined: Sat Jan 09, 2010 3:04 pm

Re: HOW-TO: Make a screencast with KXStudio

Postby falkTX » Mon Feb 11, 2013 5:16 pm

briandc wrote:you wrote that the audio and video are saved separately. Do I have to load them into kdenlive (or similar) and sync them together manually? (I was hoping I'd have a finished product automatically.)

The audio and video will only be un-synced by a few ms. If you have a very good CPU it might actually be none...

you can zoom in kdenlive and adjust the minor delay if needed, should be easy enough.

wolftune
Established Member
Posts: 1285
Joined: Fri Feb 24, 2012 7:40 pm
Location: Portland, OR
Contact:

Re: HOW-TO: Make a screencast with KXStudio

Postby wolftune » Mon Feb 11, 2013 5:23 pm

brian, be happy with the need to use kdenlive! You will find that there are lots of easy places to take a minute deleting useless gaps or just fine-tuning most of the time. It is worth it to preview in kdenlive before committing because you'll end up with a better result. That was my experience anyway.
Aaron Wolf
Music teacher, scholar
http://wolftune.com

User avatar
briandc
Established Member
Posts: 1321
Joined: Sun Apr 29, 2012 3:17 pm
Contact:

Re: HOW-TO: Make a screencast with KXStudio

Postby briandc » Mon Feb 11, 2013 5:32 pm

Hi guys,

I had installed "Record it now" a while back, and after opening it earlier, it now won't leave me alone. I rebooted and it appeared after login! :shock:

If I remove it, it says that it will also remove "kxstudio meta all" and "kxstudio meta video" and install "record my desktop" instead.

What should I do?


brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com


Return to “KXStudio Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests