Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wiki:screencasttutorial [2011/12/15 14:35] – 151.29.137.72 | wiki:screencasttutorial [2013/06/02 15:45] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Screencasting with FFmpeg, jack_capture and Xephyr ====== | ||
+ | |||
+ | ===== Introduction ===== | ||
+ | |||
+ | Not satisfied with the quality of the screencasts made with [[http:// | ||
+ | So I needed a different toolset. For the video part I chose [[http:// | ||
+ | To prevent webservices like YouTube having to downscale or upscale your videos, which deteriorates the quality of your videos drastically, | ||
+ | |||
+ | ===== Requirements ===== | ||
+ | |||
+ | * A recent version of FFmpeg compiled with support for the h.264 protocol | ||
+ | * [[apps: | ||
+ | * Xephyr [optional] | ||
+ | * A video editor, I use [[http:// | ||
+ | * A screen with a minimal horizontal resolution of 1280 pixels | ||
+ | |||
+ | |||
+ | ===== Screencast script ===== | ||
+ | |||
+ | I use a simple script like this: | ||
+ | |||
+ | < | ||
+ | |||
+ | DATE=`date +%Y%m%d` | ||
+ | TIME=`date +%Hh%M` | ||
+ | |||
+ | # Start screencast | ||
+ | xterm -e jack_capture -b 24 $HOME/ | ||
+ | ffmpeg -an -f x11grab -r 30 -s 1280x720 -i 0:0 -vcodec libx264 -vpre lossless_ultrafast -threads 4 $HOME/ | ||
+ | |||
+ | killall jack_capture</ | ||
+ | |||
+ | You might need to adjust the number of threads for the ffmpeg -threads parameter to match the number of cores of your CPU. If unsure, set it to 0, ffmpeg should then set the numbers of threads automatically. | ||
+ | |||
+ | jack_capture by default captures all the audio that is connected to system: | ||
+ | |||
===== Optional Xephyr script | ===== Optional Xephyr script | ||
Line 17: | Line 53: | ||
After you ran this Xephyr script, you should run the above screencast script, taking care of making the following changes to it: | After you ran this Xephyr script, you should run the above screencast script, taking care of making the following changes to it: | ||
- | * add the line " | + | |
- | * change -i 0:0 ffmpeg option to -i :2 | + | * change -i 0:0 ffmpeg option to -i :2. |
- | * add the -display 0:0 option to the xterm line (so it won't appear in your screencast) | + | * add the -display 0:0 option to the xterm line (so it won't appear in your screencast). |
Within the Xephyr session I also use a [[http:// | Within the Xephyr session I also use a [[http:// | ||
+ | ===== Editing, rendering and uploading to a webservice ===== | ||
+ | |||
+ | Now you have two separate files, an .mkv and a .wav file and because jack_capture was started right after ffmpeg audio should be no more out of sync then just a few millisecs. You can now edit the audio and video parts to your liking: | ||
+ | |||
+ | * Edit the .wav file in Audacity or Rezound if necessary. I use some extra gain and compression if necessary. | ||
+ | * Import the two files in OpenShot and crop start and end to your liking. | ||
+ | * With VLC I made some stills from the video file and with Gimp I edited these to create the titling. | ||
+ | * Create transitions, | ||
+ | |||
+ | For rendering/ | ||
+ | * Video: 1280x720, 30 fps (this should match the settings of ffmpeg), mp4 videoformat, | ||
+ | * Audio: mp3 (libmp3lame), | ||
+ | |||
+ | Now you can upload the resulting mp4 file to a webservice. The settings I've used will yield optimal results for YouTube. | ||
+ | |||
+ | ===== Examples ===== | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | [[http:// |