You are here

Add new comment

AutoStatic's picture

1. Make sure you have a recent version of ffmpeg compiled with support for the h.264 protocol and that you have jack_capture installed. You also need Xephyr and a video editor, I use OpenShot myself.
2. Set up a Xephyr nested X server with a resolution of 1280x720 as this resolution yields the best result when uploading the final video to YouTube. I use a little script for this:

#!/bin/bash

# Set up nested X server
Xephyr -keybd ephyr,,,xkbmodel=evdev -br -reset -host-cursor -screen 1280x720x24 -dpi 96 :2 &
sleep 3
export DISPLAY=:2.0
/etc/X11/Xsession &

3. Start your screencast within the nested X server, I use a second script for this:

#!/bin/bash

DATE=`date +%Y%m%d`
TIME=`date +%Hh%M`
export DISPLAY=:2.0

# Start screencast
(sleep 3;qtractor $HOME/Screencasts/Screencast.qtr) &
xterm -display :0.0 -e jack_capture -b 24 $HOME/Screencasts/screencast_audio_$DATE-$TIME.wav &
ffmpeg -an -f x11grab -r 30 -s 1280x720 -i :2 -vcodec libx264 -vpre lossless_ultrafast -threads 4 $HOME/Screencasts/screencast_video_$DATE-$TIME.mkv

killall jack_capture

4. 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.
5. Edit the .wav file in Audacity or Rezound if necessary. I used some extra gain and compression.
6. Import the two files in OpenShot and crop start and end to your liking.
7. With VLC I made some stills from the video file and with Gimp I edited these to make the titling. You can also use Inkscape.
8. Create transitions, fade-ins and fade-outs to your liking with OpenShot.
9. Render/export the project. I use the following settings:
- Video: 1280x720, 30 fps (this should match the settings of ffmpeg), mp4 videoformat, 40 Mb/s (Blu-ray quality), libx264 videocodec.
- Audio: mp3 (libmp3lame), 256 Kb/s and 44.1 Khz sample rate.
10. Upload to YouTube, set it to private, wait for the vid to get processed and if the result is satisfactory set the video status to public.