Le Thu, 8 Aug 2013 18:54:29 -0700, "J. Liles" <[email protected]> a écrit :
> As some of you may recall, every time I've posted a demo video to > LAD, I've had to include a disclaimer excusing the poor quality due > to a lack of functional screencasting tools. > > Well, it took a couple of weeks of hair pulling and many, many hours > of testing, but I finally arrived at a solution. > > Anyone who wants to create a screencast and record audio via JACK *in > perfect sync* must do the following: > > Get ffmpeg. Apply this patch to it: > > https://github.com/original-male/FFmpeg/commit/d02509d04d396a98646ca81e9ba327a501486130.patch > > Build it with vorbis and h264 support. > > Then, start your favorite desktop environment. I use Xephyr for this. > > Have jack running (at -r 48000) > > Then run the following command: > > ffmpeg -fflags +genpts+igndts -f x11grab -vsync 0 -r 30 -s 1920x1080 > -i :${DISPLAY}.+0,0 -vcodec h264 -f jack -ac 2 -r:a 48000 -i > screencast -acodec pcm_s16le -r:v 30 -vsync 2 -async 1 -map 0:0,1,0 > -map 1:0 -preset ultrafast -qp 0 "$FILE" > > Where DISPLAY is the number of your X11 display and FILE is the > filename for the screencast. I use a .mkv extension for the matroska > container. > > Remember to connect the streams you want recorded to the 'screencast' > JACK inputs! > > With this setup I'm able to record a full 30 FPS @ 1080P with audio in > perfect sync. Please share your results too. With some more evidence I > might have a good case to get ffmpeg to accept my patch. It work fine, thank you. My screen is 1280 by 1024 on a phenom amd64 system. When searching for an explanation for the -i display parameter, I find screecastor. You may be interested by it: http://www.hecticgeek.com/2012/12/screencastor-screen-recorder-ubuntu/ http://hizo.fr/linux/screencastor/ To make it work with jack, you can edit directly the ffmpeg command, or change 2 of screencaptor's files: In go_screencastor.sh: –combobox=’@@_audio_provenance@@col pulse /dev/dsp1 ffmpegjack hw:0,0 hw:1,0′ \ and –combobox=’@@_audio_serveur@@col alsa jack oss’ \ In screencastor.sh: case « ${G2S_audio_provenance} » in 0) G2S_audio_provenance=pulse ;; 1) G2S_audio_provenance=/dev/dsp1 ;; 2) G2S_audio_provenance=ffmpegjack ;; 3) G2S_audio_provenance=hw:0,0 ;; 4) G2S_audio_provenance=hw:1,0 ;; esac case « ${G2S_audio_serveur} » in 0) G2S_audio_serveur=alsa ;; 1) G2S_audio_serveur=jack ;; 2) G2S_audio_serveur=oss ;; esac Dominique > > Enjoy! -- "We have the heroes we deserve." _______________________________________________ Linux-audio-dev mailing list [email protected] http://lists.linuxaudio.org/listinfo/linux-audio-dev
