Fer vídeos per al Youtube II

De Wikijoan
Dreceres ràpides: navegació, cerca



Tinc l'experiència de fer vídeos per al Youtube:

però en aquesta última referència s'apunta informació de com fer videos de qualitat de la música que estic fent amb els clients de JACK (Jeremy, Autostatic):

i aquesta és la línia que vull explorar. Reprodueixo el que tinc en l'anterior enllaç:

El recordmydesktop és compatible amb JACK, de manera que es pot gravar la sortida, per exemple, del fluidsynth. Una manera de veure-ho funcionant és al video http://www.youtube.com/watch?v=kBEzMC35gt8&feature=channel (de Jeremy-Autostatic)

De totes maneres, el Jeremy creu (setembre 2010) que és millor utilitzar ffmpeg en comptes de recordmydesktop per a fer videos del Youtube:

This tutorial explains how to use the Sirlab Vocoder LADSPA plugin in Qtractor.

MIDI USB keyboard: M-Audio Oxygen 8 v2
Softsynth: Yoshimi 0.058.1 (ZynAddSubFX fork) with the Pulse Pad 3 instrument patch
DAW: Qtractor
Vocoder: Vocoder LADSPA plugin from sirlab.de
Screencast: Xephyr (nested X-server), FFmpeg 0.6svn (video) and jack_capture 0.9.56 (audio)
Video editor: OpenShot 1.1.3
Distro: Ubuntu 9.10 Karmic Koala

The video quality is improved as promised, it seems that FFmpeg is the way to go when screencasting.

It's about using the Sirlab Vocoder LADSPA plugin in Qtractor. I ditched 
recordMyDesktop in favor of ffmpeg with jack_capture within a nested 
Xephyr session with a 1280x720 resolution (apparently YouTube likes this 
best). The quality improved drastically

El Jeremy ho ha documentat:

Hello Frank,

I've created a Wiki page on the toolchain I use:



Leigh Dyer ha fet un videotutorial sobre el seq24 seguint les recomanacions del Jeremy.

> Hi Leigh,
> > I've just posted a video tutorial for seq24 -- it discusses what seq24
> > is, and what it isn't, and then proceeds to demonstrate the basics of
> > building and playing patterns. If you've tried it in the past and been
> > confused by its somewhat unique interface, hopefully this will get you
> > past that initial confusion. The direct Youtube link is here:
> >
> > http://www.youtube.com/watch?v=J2WDHS1wYeM
> Wow, that is finally one really nice tutorial video - very well done!
> I like the quality of video and sound, the speed, the "entertaining bits" -
> everything really!

Thanks! I've answered your questions below:

> May I ask a few short questions about creation of this tutorial (I tried
> to write them so that a simple yes/no suffices in most cases ;-):
> - What toolchain did you use? Was it the Xephyr/jack_capture/ffmpeg
>   package that others (AutoStatic?) had mentioned here or in other places?

Yep, I used AutoStatic's Xephyr and ffmpeg setup for capturing the
video. For the audio, I recorded straight in to Ardour -- that let me
record the synths I used in to separate tracks so I could adjust the
voice and music levels after recording.

> - What frame rate did you choose for video - 15fps?

I had ffmpeg set to 30 FPS -- I can't say for sure that it captured at
that rate all the way through, but I was definitely happy with the

> - I assume you first write out to disk mostly uncompressed video at the
>   highest possible quality and then do a re-encoding to your selected target
>   video format offline afterwards?

I used ffmpeg's default MPEG-4 compression, but with a very high maximum
bitrate -- that gave me high quality, a manageable (large, but not too
large) file size, and relatively low CPU usage. Here's the command I

ffmpeg -an -f x11grab -s 1280x720 -r 30 -i :2.0 -vb 10000000 tute1.avi

> - Did you experience any audio/video out-of-sync problems which you had to
>   compensate for by e.g. time-stretching the video?

Nope, the audio I exported from Ardour lined up perfectly with the video
from ffmpeg. To make it easier to line them up in Kdenlive during the
edit, I started the video by hitting the "send test note" button in
XSynth; I was then able to line up the button press in the video track
with the sound of the note being played by XSynth in the audio track.

> - Since your voice comes over pretty clear, I assume you did not do live
>   voice recording, but rather overdubbed it afterwards by "watching and
>   commenting" your own video?

For the intro, I recorded the voice independently, and then lined up the
images and slides, and the little "apt-cache search" video, with that --
I made use of Kdenlive's video speed features here to speed through the
footage of the seq24 package installing.

For the rest of the video (the actual screencast), I did just record the
audio and video together in one take -- I had my mic set up so I could
talk in to it comfortably while working. If you listen closely, I'm sure
there are a few mouse or key click sounds in there as evidence of
that :)

If the screencast sounds rehearsed, that's because it kinda was -- I
actually recorded a very similar tutorial screencast a week earlier.
Once I decided to add the intro, though, I scrapped that video and
re-recorded it.


Així doncs, les eines que necessitaré són jack_caputre i el servidor de X Xephyr.

Actualització març 2011:

I've just wrote a HOWTO for the AV Linux forums on how I created my A3
MIDI vid which is basically a refinement of Jeremy's JACK screencast
tutorial with a couple of extra tips bolted on:




Una bona explicació està a:

Per instal.lar-ho:

$ sudo apt-get install xserver-xephyr

En l'ordinador de l'institut funciona això:

$ Xephyr -keybd ephyr,,,xkbmodel=evdev -br -reset -host-cursor -screen 1280x720x24 -dpi 96 :2

s'obre una finestra negra amb aquestes dimensions. De moment, en aquesta finestra no hi ha res.

i en una altra consola:

$ export DISPLAY=:2.0
$ /etc/X11/Xsession

és a dir, s'obre una sessió de gnome en el display 2, que és el que gestiona el Xephyr.

Aquesta prova bàsica que he fet a l'institut, en el portàtil no em surt. Ho he fet amb els drivers propietaris de la ATI (fglrx), i després els he desinstal.lat i quan engego el Xephyr em diu que:

Xephyr: error while loading shared libraries: libatiuki.so.1: cannot open shared object file: No such file or directory

com si necessités la llibreria libatiuki.so.1 que proporciona el driver propietari.

Ara arrenco en l'altre disc dur, amb drivers propietaris, i funciona perfectament. Totalment funcional, excepte el problema de les fletxes/cursor (per ex, no es pot fer el history en el terminal). No és un problema meu:

I can confirm that this bug is still present in Lucid amd64 and that -keybd ephyr,,xkbmodel=evdev didn't helped. BTW, the same bug affects Xnest too.
Another information, I`m from Brazil so I`m not using EUA keyboard layout.
Affects me too, this fixes it for me:
> DISPLAY=$EPHYR_DISPLAY setxkbmap -model evdev us
Got it working using:
Xephyr :1 -screen 1024x768 -keybd ephyr,,,xkbmodel=evdev

però el meu problema (tecles del cursor, fletxes) continua igual.

El Autostatic comenta que si utilitzes GNome i fas /etc/X11/Xsession (obrir una altra sessió del GNome) tens problemes. Però a mi em va bé... Després més tard he obtingut Segmentation Fault en una altra prova, però en principi va bé. El que provoca el segmentation fault és l'opció -host-cursor.

Una altra possibilitat és utilitzar un altre servidor X anidat: Xnest.


$ sudo apt-get install xnest

he isntal.lat Xnest, que és un altre nested X server

Xnest -ac :20 -nolisten tcp & xterm -display :20
Xnest -ac :20 -nolisten tcp & DISPLAY=:20 /etc/X11/Xsession

això funciona. /etc/X11/Xsession arrenca una sessió del GNome

Xnest uses the underlying X server's processing capabilities--it doesn't draw the nested image, it simply proxies the X requests to the parent server. It hasn't been actively updated in a few years, though, so it does not handle newer extensions such as RENDER.

Ara fico la resolució de la finestra:

$ Xnest -ac :20 -geometry 1024x768+50+50 -nolisten tcp & DISPLAY=:20 /etc/X11/Xsession

i ara faig un video del que treballo en aquesta finestra:

$ ffmpeg -an -f x11grab -r 30 -s 1024x768 -i :20 -vcodec libx264 -vpre lossless_ultrafast -threads 4 /home/joan/prova.avi

ha funcionat bé. La única cosa és que el refresc deixa bastant que desitjar. Ara que he tret els drivers propietaris..., funcionaria millor amb fglrx?

doncs ho he provat amb fglrx i realment funciona be, i no hi ha problemes de refresc. Només hi ha un problema amb els accents i configuració del teclat que es soluciona amb:

$ setxkbmap es

tanmateix, una cosa que no he solucionat del teclat són les fletxes.

creat per Joan Quintana Compte, octubre 2010

Eines de l'usuari
Espais de noms
IES Jaume Balmes
Màquines recreatives
Informàtica musical
joanillo.org Planet