_JR_ Posted July 7, 2006 at 11:09 AM Report #36775 Posted July 7, 2006 at 11:09 AM Alguma vez quises-te filmar os teus passos a fazer algo para mostrar a um amigo noob? Alguma vez quises-te filmar a beleza do teu XGL em acção? Algum vez quises-te filmar as tuas frags com o CS ali emulado no Cedega? Se já, então este tutorial é para ti. Este método vai criar um video Flash do teu desktop. O que é necessário? 1- A última versão do x11vnc. 2- A última versão do pyvnc2swf 3- Um distro ^^ (Eu usei o meu caro Ubuntu 6.06) Instalar o x11vnc Se tiveres o apt-get instalado, para instalar o x11vnc basta: $ [sudo] apt-get install x11vnc Se utilizares o yum: $ yum install x11vnc E por aí fora para todos os gerenciadores de pacotes existentes. --- APENAS SE NÃO TIVERES JÁ INSTALADO O x11vnc por um gerenciador de pacotes --- Se não tiveres nenhum gerenciador de pacotes faz download aqui Descompacta: $ tar xzf x11vnc-0.8.1.tar.gz E depos instala: $ cd x11vnc-0.8.1 $ ./configure $ make $ make install E pronto! --- Continuação --- Instalar pyvnc2swf Faz download da última versão do pyvnc2swf (a versão python). Instala na pasta pessoal, para o script seguinte funcionar. $ cd ~ wget http://www.unixuser.org/~euske/vnc2swf/pyvnc2swf-0.8.2.tar.gz $ tar xzf pyvnc2swf-0.8.2.tar.gz E não é preciso mais nada. Utilizando o script Agora, para tornar a gravação de vídeos mais facil, vamos utilizar um script. (Nota: para gravar som de um microfone precisas de ter o ffmpeg instalado). Abre um ficheiro de texto com o teu editor favorito e mete lá: #!/bin/sh # x11vnc -localhost -viewonly -wait 10 -defer 10 & python ~/pyvnc2swf-0.8.2/vnc2swf.py -o tutorial.swf -N -S ‘arecord -c 2 -f cd -t wav voice.wav’ localhost:0 ffmpeg -i voice.wav -ar 22050 voice.mp3 python ~/pyvnc2swf-0.8.2/edit.py -o tutorial1.swf -a voice.mp3 tutorial.swf mv ~/tutorial1.swf ~/tutorial.swf rm ~/voice.wav rm ~/voice.mp3 rm ~/tutorial1.html Salva o script na home com um nome qualquer e a extensão .sh. Este script também irá gravar. Alternativamente podem utilizar o seguinte comando: x11vnc -localhost -viewonly -wait 10 -defer 10 & python ~/pyvnc2swf-0.8.2/vnc2swf.py -o tutorial.swf -N Para fazer o script como executavel: $ chmod 755 vidtut.sh Executar o script: $ sh o-nome-que-deste.sh A partir daqui não é preciso tutorial nenhum 🙂 Nota pessoal: Não consegui gravar som :S Bom proveito e deixem comentários 🙂
vbmaster Posted August 13, 2006 at 02:26 PM Report #44086 Posted August 13, 2006 at 02:26 PM Não consegui... isto não me cria os ficheiros e dá-em um monte de erros... Já os posto.
vbmaster Posted August 13, 2006 at 02:40 PM Report #44087 Posted August 13, 2006 at 02:40 PM Aquie stá: miguel@main ~ $ sh video.sh ############################################################### #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@# #@ @# #@ ** WARNING ** WARNING ** WARNING ** WARNING ** @# #@ @# #@ YOU ARE RUNNING X11VNC WITHOUT A PASSWORD!! @# #@ @# #@ This means anyone with network access to this computer @# #@ will be able to view and control your desktop. @# #@ @# #@ >>> If you did not mean to do this Press CTRL-C now!! <<< @# #@ @# #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@# Traceback (most recent call last): File "/home/miguel/pyvnc2swf-0.8.2/vnc2swf.py", line 27, in ? import Tkinter, tkFileDialog, tkMessageBox ImportError: No module named Tkinter ffmpeg version CVS, build 3342336, Copyright (c) 2000-2004 Fabrice Bellard configuration: --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedi r=/var/lib --enable-shared-pp --enable-shared --disable-static --extra-ldflags= --disable-mmx --disable-altivec --disable-debug --enable-mp3lame --disable-a52 - -disable-a52bin --enable-audio-oss --disable-v4l --disable-dv1394 --disable-dc13 94 --disable-pthreads --disable-xvid --enable-libogg --enable-vorbis --disable-t heora --disable-dts --disable-network --enable-zlib --enable-ffplay --disable-fa ad --disable-faac --disable-faadbin --cc=i686-pc-linux-gnu-gcc --enable-gpl --en able-pp --disable-opts --disable-strip --build=i686-pc-linux-gnu built on Jul 15 2006 12:06:46, gcc: 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie -8.7.8) voice.wav: I/O error occured Usually that means that input file is truncated and/or corrupted. Using pygame 1.6.2 Traceback (most recent call last): File "/home/miguel/pyvnc2swf-0.8.2/edit.py", line 234, in ? if __name__ == "__main__": main(sys.argv[1:]) File "/home/miguel/pyvnc2swf-0.8.2/edit.py", line 153, in main fp = file(v, 'rb') IOError: [Errno 2] No such file or directory: 'voice.mp3' mv: cannot stat `/home/miguel/tutorial1.swf': No such file or directory rm: cannot remove `/home/miguel/voice.wav': No such file or directory rm: cannot remove `/home/miguel/voice.mp3': No such file or directory rm: cannot remove `/home/miguel/tutorial1.html': No such file or directory miguel@main ~ $ #@ @# #@ You can create an x11vnc password file by running: @# #@ @# #@ x11vnc -storepasswd password /path/to/passfile @# #@ or x11vnc -storepasswd /path/to/passfile @# #@ or x11vnc -storepasswd @# #@ @# #@ (the last one will use ~/.vnc/passwd) @# #@ @# #@ and then starting x11vnc via: @# #@ @# #@ x11vnc -rfbauth /path/to/passfile @# #@ @# #@ an existing ~/.vnc/passwd file from another VNC @# #@ application will work fine too. @# #@ @# #@ You can also use the -passwdfile or -passwd options. @# #@ (note -passwd is unsafe if local users are not trusted) @# #@ @# #@ Make sure any -rfbauth and -passwdfile password files @# #@ cannot be read by untrusted users. @# #@ @# #@ Use x11vnc -usepw to automatically use your @# #@ ~/.vnc/passwd or ~/.vnc/passwdfile password files. @# #@ (and prompt you to create ~/.vnc/passwd if neither @# #@ file exists.) Under -usepw, x11vnc will exit if it @# #@ cannot find a password to use. @# #@ @# #@ @# #@ Even with a password, the subsequent VNC traffic is @# #@ sent in the clear. Consider tunnelling via ssh(1): @# #@ @# #@ http://www.karlrunge.com/x11vnc/#tunnelling @# #@ @# #@ Or using the x11vnc SSL options: -ssl and -stunnel @# #@ @# #@ Please Read the documention for more info about @# #@ passwords, security, and encryption. @# #@ @# #@ http://www.karlrunge.com/x11vnc/#faq-passwd @# #@ @# #@ You are using the -localhost option and that is a good @# #@ thing!! Especially if you ssh(1) into this machine and @# #@ use port redirection. Nevertheless, without a password @# #@ other users could possibly do redirection as well to @# #@ gain access to your desktop. @# #@ @# #@ To disable this warning use the -nopw option, or put @# #@ the setting in your ~/.x11vncrc file. @# #@ @# #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@# ############################################################### 13/08/2006 15:39:59 setting -nofilexfer in -viewonly mode. Settings: display: null authfile: null subwin: 0x0 -sid mode: 0 clip: null flashcmap: 0 shiftcmap: 0 force_idx: 0 cmap8to24: 0 8to24_opts: null 24to32: 0 visual: null overlay: 0 ovl_cursor: 1 scaling: 0 1.0000 viewonly: 1 shared: 0 conn_once: 1 timeout: 0 inetd: 0 filexfer: 0 http: 0 connect: null connectfile null vnc_conn: 1 allow: 127.0.0.1 input: null passfile: null unixpw: 0 unixpw_lst: null stunnel: 0 accept: null accept: null gone: null users: null using_shm: 1 flipbytes: 0 onetile: 0 solid: null blackout: null xinerama: 1 xtrap: 0 xrandr: 0 xrandrmode: null padgeom: null logfile: null logappend: 0 flag: null rc_file: "" norc: 0 dbg: 0 bg: 0 mod_tweak: 1 isolevel3: 0 xkb: 0 skipkeys: null sloppykeys: 0 skip_dups: 0 addkeysyms: 1 xkbcompat: 0 clearmods: 0 remap: null norepeat: 1 norepeatcnt:2 nofb: 0 watchbell: 1 watchsel: 1 watchprim: 1 seldir: null cursor: 1 multicurs: 0 curs_mode: null arrow: 1 xfixes: 1 alphacut: 240 alphafrac: 0.33 alpharemove:0 alphablend: 1 cursorshape:1 cursorpos: 1 xwarpptr: 0 buttonmap: null dragging: 1 wireframe: 0xff,3,0,32+8+8+8,all,0.15+0.30+5.0+0.125 wirecopy: always scrollcopy: always scr_area: 60000 scr_skip: ##Soffice.bin,##StarOffice scr_inc: ##Nomatch scr_keys: null scr_term: null scr_keyrep: null scr_parms: 0+64+32+32,0.02+0.10+0.9,0.03+0.06+0.5+0.1+5.0 fixscreen: null noxrecord: 0 grabbuster: 0 ptr_mode: 2 inputskip: 10 speeds: null wmdt: null debug_ptr: 0 debug_key: 0 defer: 10 waitms: 10 wait_ui: 2.00 nowait_bog: 0 slow_fb: 0.00 readtimeout: 20 take_naps: 1 sb: 60 fbpm: 1 xdamage: 1 xd_area: 20000 xd_mem: 1.000 sigpipe: null threads: 0 fs_frac: 0.75 gaps_fill: 4 grow_fill: 3 tile_fuzz: 2 snapfb: 0 rawfb: null pipeinput: null gui: 0 gui_mode: null noremote: 0 unsafe: 0 privremote: 0 safer: 0 nocmds: 0 deny_all: 0 pid: 20462 13/08/2006 15:39:59 x11vnc version: 0.8.2 lastmod: 2006-07-12 13/08/2006 15:39:59 Using X display :1.0 13/08/2006 15:39:59 13/08/2006 15:39:59 ------------------ USEFUL INFORMATION ------------------ 13/08/2006 15:39:59 X DAMAGE available on display, using it for polling hints. 13/08/2006 15:39:59 To disable this behavior use: '-noxdamage' 13/08/2006 15:39:59 Wireframing: -wireframe mode is in effect for window moves. 13/08/2006 15:39:59 If this yields undesired behavior (poor response, painting 13/08/2006 15:39:59 errors, etc) it may be disabled: 13/08/2006 15:39:59 - use '-nowf' to disable wireframing completely. 13/08/2006 15:39:59 - use '-nowcr' to disable the Copy Rectangle after the 13/08/2006 15:39:59 moved window is released in the new position. 13/08/2006 15:39:59 Also see the -help entry for tuning parameters. 13/08/2006 15:39:59 You can press 3 Alt_L's (Left "Alt" key) in a row to 13/08/2006 15:39:59 repaint the screen, also see the -fixscreen option for 13/08/2006 15:39:59 periodic repaints. 13/08/2006 15:39:59 XFIXES available on display, resetting cursor mode 13/08/2006 15:39:59 to: '-cursor most'. 13/08/2006 15:39:59 to disable this behavior use: '-cursor arrow' 13/08/2006 15:39:59 or '-noxfixes'. 13/08/2006 15:39:59 using XFIXES for cursor drawing. 13/08/2006 15:39:59 GrabServer control via XTEST. Xlib: extension "RECORD" missing on display ":1.0". 13/08/2006 15:39:59 XKEYBOARD: number of keysyms per keycode 6 is greater 13/08/2006 15:39:59 than 4 and 92 keysyms are mapped above 4. 13/08/2006 15:39:59 Automatically switching to -xkb mode. 13/08/2006 15:39:59 If this makes the key mapping worse you can 13/08/2006 15:39:59 disable it with the "-noxkb" option. 13/08/2006 15:39:59 Also, remember "-remap DEAD" for accenting characters. 13/08/2006 15:39:59 X FBPM extension not supported. 13/08/2006 15:39:59 -------------------------------------------------------- 13/08/2006 15:39:59 13/08/2006 15:39:59 Default visual ID: 0x21 13/08/2006 15:39:59 Read initial data from X display into framebuffer. 13/08/2006 15:39:59 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/4096 13/08/2006 15:39:59 13/08/2006 15:39:59 X display :1.0 is 32bpp depth=24 true color FrameBuffer Info: width: 1024 height: 768 scaled_width: 1024 scaled_height: 768 indexed_color: 0 bits_per_pixel: 32 depth: 24 red_mask: 0x00ff0000 00000000111111110000000000000000 green_mask: 0x0000ff00 00000000000000001111111100000000 blue_mask: 0x000000ff 00000000000000000000000011111111 red: max: 255 shift: 16 green: max: 255 shift: 8 blue: max: 255 shift: 0 mainfb_bytes_per_line: 4096 rfb_fb_bytes_per_line: 4096 format: ZPixmap byte_order: LSBFirst bitmap_pad: 32 bitmap_unit: 32 bitmap_bit_order: LSBFirst rfb_fb: 0xb78d4008 main_fb: 0xb78d4008 8to24_fb: (nil) snap_fb: (nil) raw_fb: (nil) fake_fb: (nil) 13/08/2006 15:39:59 setting up 32 cursors... 13/08/2006 15:39:59 done. 13/08/2006 15:39:59 13/08/2006 15:39:59 Autoprobing TCP port 13/08/2006 15:39:59 Autoprobing selected port 5903 13/08/2006 15:39:59 Xinerama: disabling: display does not support it. 13/08/2006 15:39:59 created 32 tile_row shm polling images. 13/08/2006 15:39:59 fb read rate: 132 MB/sec 13/08/2006 15:39:59 screen setup finished. 13/08/2006 15:39:59 13/08/2006 15:39:59 WARNING: You are running x11vnc WITHOUT a password. See 13/08/2006 15:39:59 WARNING: the warning message printed above for more info. 13/08/2006 15:39:59 The VNC desktop is: localhost:3 PORT=5903
Triton Posted August 13, 2006 at 02:47 PM Report #44088 Posted August 13, 2006 at 02:47 PM Bom trabalho! <3 life
vbmaster Posted August 13, 2006 at 03:03 PM Report #44089 Posted August 13, 2006 at 03:03 PM btw, para que é que isto quer acesso à net?
kingless Posted August 13, 2006 at 04:05 PM Report #44094 Posted August 13, 2006 at 04:05 PM btw, para que é que isto quer acesso à net? Para o teu PC ser hackeado com mais facilidade ? 😄
_JR_ Posted August 13, 2006 at 04:52 PM Author Report #44106 Posted August 13, 2006 at 04:52 PM Não sei 👍 Só sei que gera uma página html com o swf lá incluido mas n necessita de ir à net i think... Tentas-te fazer com o comando que lá está em vez do script?
vbmaster Posted August 13, 2006 at 05:21 PM Report #44112 Posted August 13, 2006 at 05:21 PM Não sei 👍 Só sei que gera uma página html com o swf lá incluido mas n necessita de ir à net i think... Tentas-te fazer com o comando que lá está em vez do script? Tentei, neste momento estou a tentar corrigir o erro que dá com o Tkinter.
vbmaster Posted August 13, 2006 at 05:24 PM Report #44114 Posted August 13, 2006 at 05:24 PM Bug corrigido: Tive de mandar vir a package 'tk', com: # emerge tk Compilar o python de novo usando o tk fazendo: # echo "dev-lang/python tk" >> /etc/portage/package.use #emerge python E pronto, já rulla... Danke sehr. 👍 Gentoo rulla.
vbmaster Posted August 14, 2006 at 01:50 AM Report #44197 Posted August 14, 2006 at 01:50 AM Ora bem, eu e o epimeteo andámos aqui às cabeçadas para conseguir fazer um video com mais qualidade que o apresentado no tut, e conseguimos com os seguintes comandos: # para gravar o filme $ x11vnc -localhost -viewonly -wait 10 -defer 10 & python ~/pyvnc2swf-0.8.2/vnc2swf.py -o tutorial.vnc localhost:0 # transformar o ficheiro resultante (tutorial.vnc) num swf (tutorial.swf) #Atenção às directorias, pois este comando tem de ser corido dentro da pasta dp pyvnc2swf $ ./edit.py -o tutorial.swf -c -t video tutorial.vnc Fiquem bem 👍 👍 👍
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now