= Freej beginner tutorial = == Target of this manual == In this part you will learn: * what is the basic idea of using ''freej'', how its user interface is organized * how to use ''freej'' to show movies and static images * how to use layers, so you can use more than one movie * how to mix layers with each other * how to add visual effects to displayed movies However, we assume that you: * can use a GNU/Linux system (command line) * will really do all the exercises from this tutorial -- if you only read it, you'll learn nothing. You have to put hands on! :) * will let us know about any problems, comments and suggestions, so we can make this tutorial better ---------- == contents == * [[#start|the first start]] -- how to start and stop ''freej'' * [[#ui|user interface]] -- what is what in ''freej'' * [[#movies|showing movies with freej]] * [[#layers|using layers]] * [[#mix|mixing two movies]] (fun starts) * [[#alpha|adding transparency]] * [[#effects|using effects]] -- basics * [[#more_on_effects|effects disabling and deleting]] <> == the first start == Create a directory, for example ''freej_tmp''. We will put our images, movies etc in this directory and we will play inside it: {{{ mkdir freej_tmp cd freej_tmp }}} Download [[http://freej.dyne.org/tut/data/ipernav.png|this image]] to ''freej_tmp'' directory. Now start ''freej'': {{{ freej ipernav.png }}} As a result, ''freej'' starts and shows the picture ''ipernav.png''. [[http://freej.dyne.org/tut/img/01.png|{{http://freej.dyne.org/tut/img/01-mini.jpg}}]] ---------- <> == user interface == ''Freej'' consists of two windows: * output window – in this window our movies, pictures etc are shown, * console window – this window is used to interact with ''freej'' – give commands, load new pictures, movies etc, [[http://freej.dyne.org/tut/img/02.jpg|{{http://freej.dyne.org/tut/img/02-mini.jpg}}]] In console window, press ''ctrl-h''. You will see the list of shortcuts. [[http://freej.dyne.org/tut/img/03.png|{{http://freej.dyne.org/tut/img/03.png}}]] As you can see, ''[ctrl+c]'' means ''quit''. Press ''[ctrl+c]''. You are prompted to confirm that you really want to quit ''freej''. Type ''yes [enter]'' [[http://freej.dyne.org/tut/img/04.png|{{http://freej.dyne.org/tut/img/04.png}}]] ---------- <> == some more fun – movies == So far we just used static image – not so much fun. But the very same way we can use a movie. Download [[http://freej.dyne.org/tut/data/kury.avi|this movie]] to ''freej_tmp'' directory. Then start ''freej'': {{{ freej kury.avi }}} As a result, ''freej'' starts and shows the movie ''kury.avi''. [[http://freej.dyne.org/tut/img/05-mini.jpg|{{http://freej.dyne.org/tut/img/05.jpg}}]] quit the ''freej'' (remember? ''[ctrl+c]''). ---------- <> == more layers == We can load both static image and the movie. Start ''freej'' with both movie and static image: {{{ freej kury.avi ipernav.png }}} [[http://freej.dyne.org/tut/img/06.png|{{http://freej.dyne.org/tut/img/06-mini.jpg}}]] As you can see, only chicken movie is visible (and the static image – file ''ipernav.png'' – is invisible). We are going to understand why... Now, when we opened two images (static image and a movie) in ''freej'', we have them on two layers. You can see the list of layers in the console. As you can see, that layers are called ''VID'' (which means: ''video layer'') and ''IMG'' (''static image layer''). [[http://freej.dyne.org/tut/img/06-lista.jpg|{{http://freej.dyne.org/tut/img/06-lista.jpg}}]] The list of layers is also shown in output window. As you can see (below), the video layer is on top of static image layer. This is why we can't see the image. [[http://freej.dyne.org/tut/img/06-output.png|{{http://freej.dyne.org/tut/img/06-output.png}}]] Take a look at the console window. As you can see, one of layers (''VID'') is highlighted. It is the current layer. You can see the detailed information about that layer in the top of console window. You can see there the name of the file (''kury.avi'') and some other info, which we will understand later. Notice that ''current layer'' doesn't mean ''top layer'' or ''the layer which is visible now''. ''Current layer'' means just ''current layer''. [[http://freej.dyne.org/tut/img/06-details.png|{{http://freej.dyne.org/tut/img/06-details.png}}]] While in the console window, you can use left and right arrow keys to change the current layer. Press the ''right arrow key'' to change the current layer to ''IMG'' layer. Notice that now at the top of the console window you can see the details of static image layer. [[http://freej.dyne.org/tut/img/07.png|{{http://freej.dyne.org/tut/img/07.png}}]] While in the console window, you can use ''+'' and ''-'' keys to move the current layer up and down. So now, when the current layer is ''IMG'' layer, press ''+''. As you can see, the static image layer went to the top. Now the static image is visible and the chicken movie became invisible. [[http://freej.dyne.org/tut/img/08.png|{{http://freej.dyne.org/tut/img/08-mini.jpg}}]] Close the ''freej'' (''ctrl+c'', as you remember). ---------- == some words about commands, parameters, completions == Some of the console commands (e.g. CTRL-B, CTRL-E) can accept parameters. To show them, just press TAB. The completion is also working. :) For example, pressing ''CTRL-B'' you have: {{{ [*] select Blit mode for the selected Layer - press TAB for completion: }}} and so, pressing ''TAB'', you obtain: {{{ [*] List available blits starting with "" RGB ADD SUB MEAN ABSDIFF MULT MULTNOR DIV MULTDIV2 MULTDIV4 AND OR XOR RED GREEN BLUE REDMASK GREENMASK BLUEMASK NEG ADDB ADDBH SUBB SHL SHLB SHR MULB BIN SDL ALPHA SRCALPHA CHROMAKEY }}} When choosing something, like a filter (pressing ''CTRL-E''), you can also use ''TAB'' and completion: {{{ [*] add new Effect - press TAB for completion: 3dflippo Brightness bw0r Cartoon Contrast0r delay0r Distort0r Equaliz0r Flippo Gamma Glow Hueshift0r Invert0r Mask0Mate nosync0r pixeliz0r rotozoom Saturat0r scanline0r Sobel Squareblur TehRoxx0r Threshold0r Twolay0r Vertigo Water }}} This also give you a list of all effect. <> == mixing two movies == As we previously told, ''freej'' is about mixing images. Now we will start doing that. Download [[http://freej.dyne.org/tut/data/term.avi|another movie]] to ''freej_tmp'' directory. Then start freej: {{{ freej term.avi kury.avi }}} As a result, ''freej'' starts. ''kury.avi'' is on the top layer, and is visible. ''term.avi'' is on the bottom layer and thus is invisible. [[http://freej.dyne.org/tut/img/09.png|{{http://freej.dyne.org/tut/img/09-mini.jpg}}]] Now press key ''CTRL-B'', and write ''red'' in output window. The effect should look like that: [[http://freej.dyne.org/tut/img/10.png|{{http://freej.dyne.org/tut/img/10-mini.jpg}}]] Doing so, we made ''red blit'' on active layer. You can see it in layer details, in the top of console window. [[http://freej.dyne.org/tut/img/10-info.png|{{http://freej.dyne.org/tut/img/10-info.png}}]] As you know, each picture an a computer screen has three channels: red, green and blue. ''Red blit'' means that now only red channel of the ''kury.avi'' layer is visible. Green and blue channels of this layer became transparent, so now we can see: * the red channel of ''kury.avi'' * the green channel of ''term.avi'' * the blue channel of ''term.avi'' In very similar fashion we can use green blit or blue blit, just choosing ''green'' or ''blue'' as parameter for ''CTRL-B''. You can also try using other blits in the list. Try switching it on and off! ;) ---------- <> == alpha blit == And now let's try ''alpha'' blit! [[http://freej.dyne.org/tut/img/11.png|{{http://freej.dyne.org/tut/img/11-mini.jpg}}]] As you can see, now we use ''alpha'' blit (you can read it in the info on current layer in the console window). With alpha blit, the current layer becames partly transparent. As you can see, now the layer ''kury.avi'' became fully transparent and only ''term.avi'' is visible. This is because alpha parameter is zero: [[http://freej.dyne.org/tut/img/11-alpha.png|{{http://freej.dyne.org/tut/img/11-alpha.png}}]] We can change the alpha parameter from the console window. Just press CTRL-V and you can change the alpha numeric value. Enter a value between 0.0 and 0.1, for instance 0.5 – the current layer becomes half transparent. [[http://freej.dyne.org/tut/img/11_alpha_127.png|{{http://freej.dyne.org/tut/img/11_alpha_127-mini.jpg}}]] ---------- <> == Effects == Start ''freej'' with ''term.avi'': {{{ freej term.avi }}} In console window press ''[ctrl+e]'' (''e'' like ''effect''). You will see the prompt like that: [[http://freej.dyne.org/tut/img/13.png|{{http://freej.dyne.org/tut/img/13.png}}]] So just press ''[tab]'' and you will see the list of available effects: [[http://freej.dyne.org/tut/img/14.png|{{http://freej.dyne.org/tut/img/14.png}}]] Vertigo effect is a nice one. So just type ''vertigo [enter]''. You will see something like that: [[http://freej.dyne.org/tut/img/15.png|{{http://freej.dyne.org/tut/img/15-mini.jpg}}]] ---------- <> == disabling and deleting effects == Take a look at the console window. As you can see, the current layer is video layer with file ''term.avi'': [[http://freej.dyne.org/tut/img/16.png|{{http://freej.dyne.org/tut/img/16.png}}]] You can also see that this current layer has the effect ''vertigo'': [[http://freej.dyne.org/tut/img/16-effect.png|{{http://freej.dyne.org/tut/img/16-effect.png}}]] Press ''down arrow key'' in the console window to see the details on this filter: [[http://freej.dyne.org/tut/img/17.png|{{http://freej.dyne.org/tut/img/17.png}}]] Pressing ''SPACE'' key you can temporarily disable and enable this effect. Press ''[delete]'' to delete the effect from this layer. ---------- === about this document === The original document was by Piotr Sobolewski ([[http://www.rozrywka.jawsieci.pl/materialy/index_EN.html]]) It was revised, enlarged and rebuilt at Wintercamp 09 in Amsterdam, by Gabriele ''Asbesto Molesto'' Zaverio. It was revised, and rebuilt once more for the 1.0 release by Alexander "dreamer" Chalikiopoulos. ---- CategoryTemplate