Dispositivi di uscita video Impostare gli MTRR Si consiglia vivamente di controllare che i registri MTRR siano impostati correttamente, poiché possono aumentare di molto le prestazioni. Fai un cat /proc/mtrr: --($:~)-- cat /proc/mtrr reg00: base=0xe4000000 (3648MB), size= 16MB: write-combining, count=9 reg01: base=0xd8000000 (3456MB), size= 128MB: write-combining, count=1 E' giusto, mostra la mia Matrox G400 con 16MB di memoria. L'ho fatto da XFree 4.x.x, che imposta i registri MTRR automaticamente. Se non ha funzionato, devi farlo a mano. Per prima cosa, devi trovare l'indirizzo di base. Hai 3 modi per trovarlo: dai messaggi di avvio di X11, per esempio: (--) SVGA: PCI: Matrox MGA G400 AGP rev 4, Memory @ 0xd8000000, 0xd4000000 (--) SVGA: Linear framebuffer at 0xD8000000 da /proc/pci (usa il comando lspci -v): 01:00.0 VGA compatible controller: Matrox Graphics, Inc.: Unknown device 0525 Memory at d8000000 (32-bit, prefetchable) dai messaggi del driver del kernel mga_vid (usa dmesg): mga_mem_base = d8000000 Ora troviamo la dimensione della memoria. Questo è molto facile, converti semplicemente la video RAM in esadecimale, o usa questa tabella: 1 MB0x100000 2 MB0x200000 4 MB0x400000 8 MB0x800000 16 MB0x1000000 32 MB0x2000000 Ora che sai l'indirizzo di base e la dimensione della memoria, impostiamo i registri MTRR! Per esempio, per la scheda Matrox suddetta (base=0xd8000000) con 32MB di ram (size=0x2000000) esegui semplicemente: echo "base=0xd8000000 size=0x2000000 type=write-combining" > /proc/mtrr Non tutte le CPU hanno gli MTRR. Per esempio le CPU K6-2 più vecchie (intorno ai 266MHz, stepping 0) non hanno degli MTRR, ma gli stepping 12 invece sì (esegui cat /proc/cpuinfo per verificarlo). Xv In XFree86 4.0.2 o successivi, puoi utilizzare le funzioni YUV hardware della tua scheda usando l'estensione XVideo. Questo è quello che fa l'opzione . Inoltre, il driver supporta l'impostazione di luminosità/contrasto/tonalità/etc (a meno che tu non usi il vecchio e lento codec DirectShow DivX, che le supporta ovunque), vedi la pagina man. In order to make this work, be sure to check the following: Per far sì che funzioni, assicurati di controllare le seguenti: Che tu usi XFree86 4.0.2 o superiore (le versioni precedenti non hanno XVideo) Che la tua scheda supporti l'accellerazione hardware (le schede moderne la supportano) Che X carichi l'estensione XVideo, è un qualcosa del genere: (II) Loading extension XVideo in /var/log/XFree86.0.log Questo carica solo l'estensione per XFree86. In una buona installazione viene sempre caricata, e non significa che il supporto per l'XVideo della scheda sia supportato! Che la tua scheda abbia il supporto Xv sotto Linux. Per controllare, prova con xvinfo, è parte della distribuzione di XFree86. Dovrebbe mostrarti un lungo testo, simile al seguente: X-Video Extension version 2.2 screen #0 Adaptor #0: "Savage Streams Engine" number of ports: 1 port base: 43 operations supported: PutImage supported visuals: depth 16, visualID 0x22 depth 16, visualID 0x23 number of attributes: 5 (...) Number of image formats: 7 id: 0x32595559 (YUY2) guid: 59555932-0000-0010-8000-00aa00389b71 bits per pixel: 16 number of planes: 1 type: YUV (packed) id: 0x32315659 (YV12) guid: 59563132-0000-0010-8000-00aa00389b71 bits per pixel: 12 number of planes: 3 type: YUV (planar) (...etc...) Deve supportare i formati pixel YUY2 packed e YV12 planar per poter essere utilizzabile con MPlayer. E infine, controlla che MPlayer sia stato compilato col supporto per 'xv'. Lancia un mplayer -vo help | grep xv . Se il supporto per 'xv' è compilato, dovrebbe uscire una linea come la seguente: xv X11/Xv Schede 3dfx I vecchi driver 3dfx erano conosciuti per aver problemi con l'accellerazione XVideo, non supportavano gli spazi colore YUY2 o YV12. Verifica di avere XFree86 4.2.0 o superiore, può gestire YV12 e YUY2, mentre le versioni precedenti, 4.1.0 incluso, vanno in crash con YV12. Se hai degli strani risultati usando , prova SDL (anch'essa ha XVideo) e vedi se aiuta. Controlla la sezione su SDL per i dettagli. OPPURE, prova il NUOVO driver ! Vedi la sezione tdfxfb Schede S3 Le S3 Savage3D dovrebbero funzionare bene, ma per le Savage4, usa XFree86 4.0.3 o superiore (nel caso tu abbia problemi di immagini, prova a 16bpp). Per le S3 Virge invece: c'è il supporto per xv, ma la scheda in sé è molto lenta, per cui ti conviene venderla. Non c'è un driver framebuffer nativo per le schede S3 Virge simile a tdfxfb. Configura il tuo framebuffer (per es. aggiungi "" alla riga di avvio del kernel) e usa ( e aiutano). Non è ben chiaro il perché i modelli Savage non abbiano il supporto YV12 e facciano la conversione con il driver (lento). Se pensi sia colpa della scheda, cerca un driver più nuovo, o chiedi gentilmente di un driver abilitato MMX/3DNow! sulla mailing list MPlayer-users. Schede nVidia nVidia non è sempre una scelta molto buona sotto Linux ... Il driver open-source di XFree86 supporta la maggior parte di queste schede, ma in alcuni casi, dovrai usare il driver a sorgenti chiusi di nVidia, disponibile sul sito nVidia. Ti servirà sempre questo driver anche se vuoi l'accellerazione 3D. Le schede Riva128 non hanno il supporto XVideo con il driver nVidia di XFree86 :( Lamentati con nVidia. Tuttavia, MPlayer contiene un driver VIDIX per la maggior parte delle schede nVidia. Attualmente è a livello di sviluppo beta, e ha alcuni problemi. Per ulteriori informazioni, vedi la sezione VIDIX nVidia. Schede ATI Il driver GATOS (che dovresti usare a meno che tu non abbia una Rage128 o una Radeon) di default ha il VSYNC abilitato. Ciò significa che la velocità di decodifica (!) è sincronizzata alla frequenza di aggiornamento del monitor. Se la riproduzione ti pare lenta, prova a disabilitare in qualche modo VSYNC, o ad impostare la frequenza di aggiornamento a n*(fps del film) Hz. Read the VIDIX section. Radeon VE - se ti serve X, per questa scheda usa XFree86 4.2.0 o superiore. Il TV out non è supportato. Ovviamente con MPlayer puoi felicemente avere un display accellerato, con o senza l'uscita TV, e non servono librerie né X. Leggi la sezione VIDIX. Schede NeoMagic Queste schede si possono trovare in molti portatili. Devi usare XFree86 4.3.0 o superiore, o alternativamente usare i driver con Xv di Stefan Seyfried. Scegli semplicemente quello che ti serve in base alla tua versione di XFree86. XFree86 4.3.0 include il supporto per Xv, caomunque Bohdan Horst ha postato una piccola patch ai sorgenti di XFree86 che velocizza fino a quattro volte tanto le operazioni sul framebuffer (quindi XVideo). La patch è stata poi incorporata in XFree86 CVS e dovrebbe esserci nei rilasci successivi al 4.3.0. Per permettere la riproduzione di contenuti della dimensione DVD, modifica il tuo XF86Config in questo modo: Section "Device" [...] Driver "neomagic" Option "OverlayMem" "829440" [...] EndSection Schede Trident Se vuoi usare Xv con una scheda Trident, assunto il fatto che con 4.1.0 non funziona, intalla Xfree 4.2.0. Il 4.2.0 aggiunge il supporto per Xv a schermo intero con la scheda Cyberblade XP. Alternativamente, MPlayer contiene un driver VIDIX per le schede Cyberblade/i1. Schede Kyro/PowerVR Se vuoi usare Xv con una scheda basata su Kyro (per esempio la Hercules Prophet 4000XT), dovresti scaricare i driver dal sito di PowerVR. DGA PREAMBOLO Questa documento cerca di spiegare in poche parole cosa sia DGA e cosa possa fare (e cosa no) il driver di uscita video DGA di MPlayer. COS'E' DGA DGA è il nome breve di Direct Graphics Access (accesso grafico diretto) ed è un modo per fa sì che un programma oltrepassi l'X server e modifichi direttamente la memoria del framebuffer. In termini tecnici la memoria del framebuffer viene rimappata nello spazio di memoria del tuo processo. Questo è permesso dal kernel solo se hai provilegi di superutente. Puoi averli o autenticandoti come root o impostando il bit SUID sull'eseguibile di MPlayer (sconsigliato). Ci sono due versioni di DGA: DGA1 usato da XFree 3.x.x e DGA2 che è stato introdotto con XFree 4.0.1. DGA1 fornisce solamente accesso diretto al framebuffer come descritto sopra. Per modificare la risoluzione del segnale video devi affidarti all'estensione XVidMode. DGA2 include le funzionalità dell'estensione XVidMode e inoltre permette la modifica della profondità colore del display. Così, anche se stai facendo girare un X server con profondità di 32 bit, puoi passare a una di 15 e __viceversa__. Tuttavia DGA ha dei punti deboli. Sembra sia in qualche modo dipendente dal chip grafico utilizzato e dall'implementazione del driver video dell'X server che controlla tale chip. Per cui non funziona su tutti i sistemi... INSTALLARE IL SUPPORTO PER DGA IN MPLAYER Per prima cosa assicurati che X carichi l'estensione DGA, guarda in /var/log/XFree86.0.log: (II) Loading extension XFree86-DGA Attenzione, si consiglia vivamente XFree86 4.0.x o superiore! Il driver DGA di MPlayer viene rilevato automaticamente da ./configure, ovvero puoi forzarlo con . Se il driver non è riuscito a reimpostare una risoluzione inferiore, fai delle prove con le opzioni (solo con X 3.3.x), , , per trovare una modalità video in cui ci stia il film. Per ora non c'è un convertitore :( Diventa root. A DGA serve l'accesso da root per essere in grado di scrivere direttamente sulla memoria video. Se vuoi eseguirlo come utente, allora installa MPlayer SUID root: chown root /usr/local/bin/mplayer chmod 750 /usr/local/bin/mplayer chmod +s /usr/local/bin/mplayer Ora funziona anche da utente normale. Rischi di sicurezza Questo porta un grosso rischio di sicurezza! Non farlo mai su un server o su un computer che può essere utilizzato da altre persone, perché si possono ottenere privilegi di root attraverso MPlayer SUID root. Ora usa l'opzione , e sei a cavallo! (speralo:) Potresti anche provare se ti funziona l'opzione ! E' molto più veloce! MODIFICARE LA RISOLUZIONE Il driver DGA permette la modifica della risoluzione del segnale di uscita. Questo evita la necessità di eseguire un (lento) ridimensionamento software e allo stesso tempo fornisce un'immagine a schermo pieno. Idealmente dovrebbe ridimensionarsi alla risoluzione precisa (rispettando il rapporto di aspetto) dei dati video, ma l'X server permette solo di impostare le risoluzioni precedentemente definite in /etc/X11/XF86Config (/etc/X11/XF86Config-4 per XFree 4.X.X). Queste ultime sono conosciute come "modelines" e dipendono dalle potenzialità del tuo hardware video. Il server X legge questo file di configurazione all'avvio e disabilita le modelines incompatibili col tuo hardware. Puoi scoprire quali modalità ti restano attraverso il file di log di X11. Si può trovare qui: /var/log/XFree86.0.log. Queste modalità si sa che funzionano correttamente con un chip Riva128, usando il driver nv.o del server X. Section "Modes" Identifier "Modes[0]" Modeline "800x600" 40 800 840 968 1056 600 601 605 628 Modeline "712x600" 35.0 712 740 850 900 400 410 412 425 Modeline "640x480" 25.175 640 664 760 800 480 491 493 525 Modeline "400x300" 20 400 416 480 528 300 301 303 314 Doublescan Modeline "352x288" 25.10 352 368 416 432 288 296 290 310 Modeline "352x240" 15.750 352 368 416 432 240 244 246 262 Doublescan Modeline "320x240" 12.588 320 336 384 400 240 245 246 262 Doublescan EndSection DGA & MPLAYER DGA is used in two places with MPlayer: The SDL driver can be made to make use of it () and within the DGA driver (). The above said is true for both; in the following sections I'll explain how the DGA driver for MPlayer works. DGA viene usato con MPlayer in due posti: può essere usato attraverso il driver SDL () e con il driver DGA (). Quanto detto sopra è valido per entrambi; nei paragrafi seguenti viene spiegato come il driver DGA funziona per MPlayer. CARATTERISTICHE Il driver DGA viene utilizzato specificando sulla riga comando. Il comportamento di default è di passare ad una risoluzione il più vicino possibile a quella originaria del video. Ignora volutamente le opzioni e (abilitazione ridimensionamento video e schermo intero) - cerca sempre di coprire la più vasta area possibile dello schermo reimpostando la modalità video, evitando così di sprecare cicli della CPU per ridimensionare l'immagine. Se la modalità video selezionata non ti piace, puoi forzarlo a scegliere la modalità più prossima alla risoluzione specificata con e . Impostando l'opzione , il driver DGA emetterà, tra una sacco ci altre cose, un'elenco delle risoluzioni supportate dal tuo file XF86Config. Se hai DGA2, puoi anche forzarlo ad utilizzare una data profondità usando l'opzione . Profondità valide sono 15, 16, 24 e 32. Se queste profondità siano supportate nativamente oppure se debba venir effettuata una conversione (eventualmente lenta), dipende dal tuo hardware. Se dovessi essere abbastanza fortunato da avere sufficiente memoria fuori dalla visualizzazione per poterci far stare un'immagine intera, il driver DGA userà un buffering doppio, fornendo una riproduzione più fluida. Ti dirà quando il doppio buffering sarà abilitato o no. "Doppio buffering" significa che il fotogramma successivo del video viene disegnato nella memoria fuori dello schermo, mentre il fotogramma corrente viene mostrato. Quando il fotogramma successivo è pronto, il chip grafico rivece solo l'indirizzo in memoria del nuovo fotogramma e semplicemente prende da là i dati da mostrare. Nel frattempo l'altro buffer di memoria viene riempito con altri dati video. Il doppio buffering può venir abilitato usando l'opzione e disabilitato con . L'opzione attuale di default è di disabilitarlo. Usando il driver DGA, la visualizzazione dati su schermo (OSD, onscreen display) funziona solo con il doppio buffering abilitato. In ogni caso, abilitare il doppio buffering può portare una pesante penalizzazione della velocità (sul mio K6-II+ 525 usa un ulteriore 20% di tempo di CPU) in dipendenza dall'implementazione per DGA del tuo hardware. PROBLEMI DI VELOCITA' In generale, l'accesso DGA al framebuffer dovrebbe essere almeno veloce quanto utilizzare il driver X11, con il beneficio aggiunto di ottenere un'immagine a schermo intero. I valori di velocità percentuale emessi da MPlayer devono essere interpretati con un po' di attenzione, dato che per esempio con il driver X11 non includono il tempo usato dal server X per il disegno effettivo. Attacca un terminale sulla seriale della tua macchina e lancia top per vedere cosa stia davvero succedendo. In linea di massima, l'aumento di velocità usando DGA rispetto all'utilizzo 'normale' di X11 dipende fortemente dalla tua scheda video e da quanto bene il relativo modulo del server X sia ottimizzato. Se hai un sistema lento, è meglio usare una profondità di 15 o 16 bit, visto che richiedono solo la metà della banda di memoria di una visualizzazion a 32 bit. Usare una profondità di 24 è una buona idea anche se la tua scheda supporta nativamente solo quella a 32 bit, dato che trasferisce il 25% dei dati in meno rispetto alla modalità a 32/32. Ho visto alcuni file AVI riprodotti su Pentium MMX 266. Le CPU AMD K6-2 possono lavorare a 400 MHz e oltre. PROBLEMI/BACHI CONOSCIUTI Bene, secondo gli sviluppatori di XFree, DGA è quasi una bestia. Ti dicono che è meglio non usarla. La sua implementazione non è sempre perfetta con tutti i driver dei chip per XFree che ci sono là fuori. Con XFree 4.0.3 e nv.o c'è un baco che porta ad avere strani colori. I driver ATI hanno bisogno che la modalità sia reimpostata più di una volta dopo aver utilizzato DGA. Alcuni driver semplicemente non riescono a tornare alla risoluzione normale (Usa CtrlAltKeypad + e CtrlAltKeypad - per cambiarla manualmente). Alcuni driver semplicemente mostrano strani colori. Alcuni driver mentono riguardo alla memoria che mappano nello spazio indirizzi del processo, perciò vo_dga non usa il doppio buffering (SIS?). Alcuni driver sembra che falliscano nel fornire almeno una modalità valida. In questo caso il driver DGA andrà in crash raccontandoti di una modalità senza senso tipo 100000x100000 o qualcosa di simile. L'OSD funziona solo col doppio buffering abilitato (altrimenti sfarfalla). SDL SDL (Simple Directmedia Layer) è praticamente un'interfaccia unificata audio/video. I programmi che la usano non sanno che driver video o audio SDL usi davvero, ma conoscono solo l'interfaccia. Per esempio un porting di Doom che usi SDL può girara sopra a svgalib, aalib, X, fbdev e altro, devi semplicemente specificare (per esempio) il driver video da usare attraverso la variabile d'ambiente SDL_VIDEODRIVER. In teoria, perlomeno. Con MPlayer, usiamo la sua potenzialità di ridimensionamento via software del driver di X11 per le schede che non gestiscono XVideo, fino a quando non faremo il nostro (più veloce, più bello) ridimensionatore software. Abbiamo anche usato la sua uscita per aalib, ma ora abbiamo la nostra che è più comoda. La sua modalità per DGA era migliore della nostra fino a poco tempo fa. Hai capito, no? :) Aiuta anche con alcuni driver/schede bacate, se il video è scattoso (non per problemi di sistema lento) oppure l'audio è saltellante. L'uscita video SDL supporta la visualizzazione dei sottotitoli sotto al filmato ovvero sulla striscia nera (se presente). SVGAlib INSTALLAZIONE Affinché MPlayer compili il suo driver per SVGAlib (autorilevato, ma può essere forzato), devi installare svgalib e il suo pacchetto di sviluppo e non dimenticare di modificare /etc/vga/libvga.config in modo che corrisponda alla tua scheda e al tuo monitor. Assicurati di non usare l'opzione , dato che attiva l'utilizzo del ridimensionatore software, ed è lento. Se davvero ti serve, usa l'opzione , che porterà una bassa qualità, ma è in qualche modo più veloce. SUPPORTO PER EGA (4BPP) SVGAlib include EGAlib, e MPlayer ha la possibilità di mostrare qualsiasi filmato in 16 colori, utilizzabile in queste situazioni: Scheda EGA con monitor EGA: 320x200x4bpp, 640x200x4bpp, 640x350x4bpp Scheda EGA con monitor CGA: 320x200x4bpp, 640x200x4bpp Il valore dei bpp (bit per pixel) deve essere impostato a 4 manualmente: Il filmato probabilmente deve essere rimpicciolito per starci nella modalità EGA: -vf scale=640:350 or -vf scale=320:200 Per questo ci serve una funzione di ridimensionamento veloce ma a bassa qualità: -sws 4 Forse la correzione automatica dell'aspetto va disattivata: -noaspect Secondo la mia esperienza la qualità migliore dell'immagine su schermi EGA può essere ottenuta diminuendo un pochino la luminosità: . Sul mio sistema ho anche bisogno di abbassare la frequenza audio, dato che era rovinata a 44kHz: . Puoi abilitare l'OSD e i sottotitoli solo con il filtro , vedi la pagina man per i parametri precisi. Uscita su framebuffer (FBdev) Se compilare l'uscita FBdev o no viene rilevato automaticamente da ./configure. Leggi nei sorgenti del kernel la documentazione sul framebuffer (Documentation/fb/*) per ulteriori informazioni. Se la tua scheda non supporta lo standard VBE 2.0 (vecchie schede ISA/PCI, come la S3 Trio64), ma solo VBE 1.2 (o precedente?): bene, c'è ancora VESAfb, ma ddovrai caricare SciTech Display Doctor (conosciuto precedentemente come UniVBE) prima di avviare Linux. Usa un disco di avvio DOS o qualcosa del genere. E non dimenticare di registrare il tuo UniVBE ;)) L'uscita su FBdev richiede principalmente alcuni parametri addizionali: specifica il dispositivo framebuffer da usare (default: /dev/fb0) nome della modalità da usare (come in /etc/fb.modes) file di configirazione delle modalità (default: /etc/fb.modes) valori importanti, vedi example.conf Se vuoi passare a una modalità particolare, allora usa mplayer -vm -fbmode nome_modalità nomefile da sola può scegliere la modalità più adatta da /etc/fb.modes. Può essere usata anche insieme con le opzioni e . L'opzione è supportata solo se il formato pixel del film corrisponde al formato pixel della modalità video. Stai attento al valore di bpp, il driver fbdev cerca di usare prima quello corrente, poi quello che indichi tramite l'opzione option. l'opzione non è supportata (usa ). Non puoi usare modalità a 8bbp (o meno). Probabilmente vuoi disabilitare il cursore: echo -e '\033[?25l' o setterm -cursor off e il salvaschermo: setterm -blank 0 Per riabilitare il cursore: echo -e '\033[?25h' o setterm -cursor on La modifica della modalità video di FBdev non funziona con il framebuffer VESA, e non chiederla, visto che non è una limitazione di MPlayer. Framebuffer Matrox (mga_vid) mga_vid è un'incrocio di un driver di uscita video e di un modulo del kernel, che utilizza il ridimensionatore e l'overlay video delle Matrox G200/G400/G450/G550 per effettuare una conversione dello spazio colore YUV->RGB e un ridimensionamento video arbitrario. mga_vid ha un supporto hardware per VSYNC con triplo buffering. Funziona sia in una console su framebuffer che dentro X, ma solo con Linux 2.4.x. Per una versione del driver per Linux 2.6.x controlla . Installazione: Per usarlo, devi innanzitutto compilare mga_vid.o: cd drivers make Poi esegui (come root) make install che dovrebbe installare il modulo e creare per te il nodo del dispositivo. Carica il driver con insmod mga_vid.o Dovresti verificare il rilevamento della dimensione della memoria usando il comando dmesg. Se è errato, usa l'opzione (prima fai rmmod mga_vid), indicando in MB la dimensione della memoria della scheda: insmod mga_vid.o mga_ram_size=16 Per far sì che venga caricato/scaricato quando serve, prima inserisci la riga seguente alla fine di /etc/modules.conf: alias char-major-178 mga_vid Ora devi (ri)compilare MPlayer, ./configure rileverà /dev/mga_vid e compilerà il driver 'mga'. Si potrà usare da MPlayer con se sei su una console matroxfb, oppure se sei sotto XFree86 3.x.x o 4.x.x. Il driver mga_vid collabora con Xv. Si può leggere il file del dispositivo /dev/mga_vid per alcune informazioni, per esempio facendo cat /dev/mga_vid e ci si può scrivere per modificare la luminosità: echo "brightness=120" > /dev/mga_vid Nella stessa directory c'è un'applicazione di test che si chiama mga_vid_test. Se tutto funziona bene, dovrebbe disegnare immagini di 256x256 sullo schermo. Supporto YUV per 3Dfx Questo driver usa il driver tdfx del kernel per il framebuffer per riprodurre filmati con accellerazione YUV. Ti serve un kernel con supporto per tdfxfb e ricompilare con ./configure --enable-tdfxfb tdfx_vid Questo è un'incrocio di un driver di uscita video e di un modulo del kernel, simile a mga_vid. Ti serve un kernel 2.4.x con il driver agpgart, visto che tdfx_vid usa AGP. Passa a configure per compilare il driver di uscita video e compila il module del kernel con le istruzioni seguenti. Installare il modulo del kernel tdfx_vid.o: Compila tdfx_vid.o: cd drivers make Poi esegui (come root) make install che dovrebbe installare il modulo e creare per te il nodo del dispositivo. Carica il driver con insmod tdfx_vid.o Per far sì che venga caricato/scaricato quando serve, prima inserisci la riga seguente alla fine di /etc/modules.conf: alias char-major-178 tdfx_vid Nella stessa directory c'è un'applicazione di test che si chiama tdfx_vid_test. Se tutto funziona bene, dovrebbe fornire alcune informazioni utili. Uscita OpenGL MPlayer supporta la riproduzione di filmati usando OpenGL, ma se se la tua piattaforma/driver supportano xv come è il caso di un PC con Linux, allora usa xv, le prestazioni OpenGL sono pesantemente peggiori. Se hai un'implementazione di X11 senza xv, OpenGL è una valida alternativa. Sfortunatamente non tutti i driver supportano questa caratteristica. I driver Utah-GLX (per XFree86 3.3.6) la supportano per tutte le schede. Vedi per dettagli su come installarli. XFree86(DRI) 4.0.3 or later supports OpenGL with Matrox and Radeon cards, 4.2.0 or later supports Rage128. Vedi for download and installation instructions. XFree86(DRI) 4.0.3 o successivi supportano OpenGL con schede Matrox e Radeon, 4.2.0 o successivi supportano le Rage128. Leggi su le istruzioni per scaricarli ed installare. Un consiglio per i nostri utenti: l'uscita video GL può essere usata per ottenere un'uscita sincronizzata su vsync. Devi impostare una variabile d'ambiente (perlomeno con nVidia): export __GL_SYNC_TO_VBLANK=1 AAlib – Visualizzazione in modalità testuale AAlib è una libreria per mostrare elementi grafici in modalità testuale, usando un potente renderizzatore ASCII. Ci sono valanghe di programmi che la utilizzano, come Doom, Quake, etc. MPlayer ne include un driver facilmente utilizzabile. Se ./configure trova AAlib installata, il driver di uscita video per aalib verrà compilato. Puoi usare alcune chiavi nella finestra AA per modificare le opzioni di renderizzazione: ChiaveAzione 1 diminuisce il contrasto 2 aumenta il contrasto 3 diminuisce la luminosità 4 aumenta la luminosità 5 abilita/disabilita il fast rendering 6 imposta la modalità di dithering (nessuna, distribuzione di errore, Floyd Steinberg) 7 inverte l'immagine 8 passa tra i controlli di aa e quelli di MPlayer Si possono usare le seguenti opzioni sulla riga di comando: modifica il colore OSD modifica il colore dei sottitoli dove V può essere: 0 (normale), 1 (scuro), 2 (grassetto), 3 (font grassetto), 4 (invertito), 5 (speciale). AAlib di suo fornisce un po' di opzioni. Di seguito alcune importanti: Impostra il driver aa preferito (X11, curses, Linux). Usa tutti e 256 i caratteri. Usa ASCII a otto bit. Lista tutte le opzioni per aalib. La renderizzazione è molto pesante per la CPU, specialmente usando AA-on-X (usando aalib su X), ed è più leggera su una console standard, senza framebuffer. Usa SVGATextMode per impostare una modalità a molti caratteri, poi divertiti! (le schede Hercules con seconda uscita sono mitiche :)) (ma IMHO puoi usare l'opzione per avere grafica su hgafb:) Usa l'opzione se il tuo computer non è abbastanza veloce da renderizzare tutti i fotogrammi! Riproducendo su un terminale, avrai migliore velocità e qualità usando il driver Linux, non ncurses (). Ma devi anche avere accesso a /dev/vcsa<terminale>! Questo non è rilevato automaticamente da aalib, ma vo_aa cerca di trovare la modalità migliore. Leggi per altri consigli di impostazioni. <systemitem class="library">libcaca</systemitem> – Libreria Color ASCII Art La libreria libcaca è una libreria grafica che emette testo al posto di pixel, indi può funzionare su schede video più vecchie o su terminali di testo. Non è dissimile dalla famosa libreria AAlib. libcaca ha bisogno di un terminale per poter funzionare, perciò dovrebbe funzionare su tutti i sistemi Unix (incluso Mac OS X) usando la libreria slang ovvero la libreria ncurses, sotto DOS usando la libreria conio.h, e nei sistemi Windows usando slang o ncurses (tramite l'emulazione Cygwin) oppure conio.h. Se ./configure rileva la presenza di libcaca, il driver di uscita video per caca verrà compilato. Le differenze rispetto ad <systemitem class="library">AAlib</systemitem> sono le seguenti: 16 colori disponibili per l'emissione a caratteri (256 coppie di colori) dithering del colore dell'immagine Ma <systemitem class="library">libcaca</systemitem> ha anche le seguenti limitazioni: nessun supporto per luminosià, contrasto, gamma Puoi utilizzare alcuni tasti nella finestra caca per modificare le opzioni di renderizzazione: ChiaveAzione d Attiva/disattiva il metodo di dithering di libcaca. a Attiva/disattiva l'antialias di libcaca. b Attiva/disattiva lo sfondo di libcaca. <systemitem class="library">libcaca</systemitem> terrà anche conto di alcune variabili d'ambiente: Imposta il driver caca richiesto. Per es. ncurses, slang, x11. Specifica il numero di righe e colonne. Per es. 128x50. Specifica il font da usare. Per es. fixed, nexus. Usa l'opzione se il tuo computer non è abbastanza veloce per renderizzare tutti i fotogrammi. VESA - uscita attraverso il VESA BIOS Questo driver è stato progettato ed introdotto come un driver generico per qualsiasi scheda video che abbia un BIOS compatibile con VESA VBE 2.0. Un altro vantaggio di questo driver è che cerca di attivare l'uscita TV. La VESA BIOS EXTENSION (VBE) Versione 3.0 Data: 16 settembre 1998 (pagina 70) dice:
Dual-Controller Designs VBE 3.0 supports the dual-controller design by assuming that since both controllers are typically provided by the same OEM, under control of a single BIOS ROM on the same graphics card, it is possible to hide the fact that two controllers are indeed present from the application. This has the limitation of preventing simultaneous use of the independent controllers, but allows applications released before VBE 3.0 to operate normally. The VBE Function 00h (Return Controller Information) returns the combined information of both controllers, including the combined list of available modes. When the application selects a mode, the appropriate controller is activated. Each of the remaining VBE functions then operates on the active controller.
Perciò usando questo driver hai qualche possibilità di far funzionare l'uscita TV (si presume che spesso l'uscita TV sia almeno un'uscita a sè stante). VANTAGGI Puoi riuscire a guardare film anche se Linux non riconosce il tuo hardware grafico. Non ti serve avere alcuna cosa relativa alla grafica (come X11 (AKA XFree86), fbdev e così via) sul tuo Linux. Questo driver può venir utilizzato dalla modalità testo. Hai qualche possibilità di avere l'uscita TV funzionante (per le schede ATI perlomeno è così). Questo driver chiama la funzione int 10h percui non è un emulatore - fa riferimento a cose reali del BIOS reale in modalità reale (attualmente in modalità vm86). Con esso puoi usare VIDIX, potendo ottenere contemporaneamente un'uscita video accellerata e e l'uscita TV! (consigliato per schede ATI) Se hai VESA VBE 3.0+ e hai specificato in qualche dove (nel file di configurazione o dalla riga comando) otterrai la massima frequenza di aggiornamento possibile (usando formule generiche di temporizzazione). Per abilitare questa funzionalità devi specificare tutte le opzioni per il tuo monitor. SVANTAGGI Funziona solo su sistemi x86. Può essere usato solo da root. Attualmente è disponibile solo per Linux. Non usare questo driver con GCC 2.96! Non funzionerà! OPZIONI DELLA RIGA COMANDO DISPONIBILI PER VESA attualmente riconosciute: dga per forzare la modalità dga e nodga per disabilitarla. In modalità dga puoi abilitare il doppio buffering con l'opzione . Nota: puoi omettere questi parametri per abilitare l'auto-rilevazione della modalità dga. PROBLEMI CONOSCIUTI E SOLUZIONI Se hai dei font NLS installati sulla tua macchina Linux ed utilizzi il driver VESA in modalità testo, allora dopo essere uscito daMPlayer avrai i font ROM caricati al posto di quelli locali. Puoi ricaricare i font locali usando lo strumento setsysfont per Mandrake/Mandriva, ad esempio (consiglio: lo stesso strumento viene usato per la localizzazione di fbdev). Alcuni driver grafici per Linux non modificano nella memoria DOS la modalità BIOS attiva. Per cui se hai questo problema - usa sempre il driver VESA dalla modalità testo. Altrimenti verrà comunque attivata la modalità testo (#03) e dovrai riavviare il tuo computer. Spesso dopo aver dismesso il driver VESA ottieni uno schermo nero. Per riportare il tuo schermo allo stato originario - salta semplicemente ad unìaltra console (premendo AltF<x>) poi ritorna alla console precedente allo stesso modo. Per avere l'uscita TV funzionante devi avere il connettore TV collegato prima di avviare il tuo PC, visto che il BIOS video si inizializza solo una volta durante il passaggio POST.
X11 Avoid if possible. Outputs to X11 (uses shared memory extension), with no hardware acceleration at all. Supports (MMX/3DNow/SSE accelerated, but still slow) software scaling, use the options . Most cards have hardware scaling support, use the output for them, or for Matrox cards. The problem is that most cards' driver doesn't support hardware acceleration on the second head/TV. In those cases, you see green/blue colored window instead of the movie. This is where this driver comes in handy, but you need powerful CPU to use software scaling. Don't use the SDL driver's software output+scaler, it has worse image quality! Software scaling is very slow, you better try changing video modes instead. It's very simple. See the DGA section's modelines, and insert them into your XF86Config. If you have XFree86 4.x.x: use the option. It will change to a resolution your movie fits in. If it doesn't: With XFree86 3.x.x: you have to cycle through available resolutions with the CtrlAltKeypad + and CtrlAltKeypad - keys. If you can't find the modes you inserted, browse XFree86's output. Some drivers can't use low pixelclocks that are needed for low resolution video modes. VIDIX PREAMBLE VIDIX is the abbreviation for VIDeo Interface for *niX. VIDIX was designed and introduced as an interface for fast user-space drivers providing such video performance as mga_vid does for Matrox cards. It's also very portable. This interface was designed as an attempt to fit existing video acceleration interfaces (known as mga_vid, rage128_vid, radeon_vid, pm3_vid) into a fixed scheme. It provides a high level interface to chips which are known as BES (BackEnd scalers) or OV (Video Overlays). It doesn't provide low level interface to things which are known as graphics servers. (I don't want to compete with X11 team in graphics mode switching). I.e. main goal of this interface is to maximize the speed of video playback. USAGE You can use standalone video output driver: . This driver was developed as X11's front end to VIDIX technology. It requires X server and can work only under X server. Note that, as it directly accesses the hardware and circumvents the X driver, pixmaps cached in the graphics card's memory may be corrupted. You can prevent this by limiting the amount of video memory used by X with the XF86Config option "VideoRam" in the device section. You should set this to the amount of memory installed on your card minus 4MB. If you have less than 8MB of video ram, you can use the option "XaaNoPixmapCache" in the screen section instead. There is a console VIDIX driver: . This requires a working and initialized framebuffer for most cards (or else you'll just mess up the screen), and you'll have a similar effect as with or . nVidia cards however are able to output truly graphical video on a real text console. See the nvidia_vid section for more information. To get rid of text on the borders and the blinking cursor, try something like setterm -cursor off > /dev/tty9 (assuming tty9 is unused so far) and then switch to tty9. On the other hand, should give you a video running in the "background", though this depends on the colorkey functionality to work right. You can use VIDIX subdevice which was applied to several video output drivers, such as: (Linux only) and . Indeed it doesn't matter which video output driver is used with VIDIX. REQUIREMENTS Video card should be in graphics mode (except nVidia cards with the output driver). MPlayer's video output driver should know active video mode and be able to tell to VIDIX subdevice some video characteristics of server. USAGE METHODS When VIDIX is used as subdevice () then video mode configuration is performed by video output device (vo_server in short). Therefore you can pass into command line of MPlayer the same keys as for vo_server. In addition it understands key as globally visible parameter. (I recommend using this key with VIDIX at least for ATI's card). As for , currently it recognizes the following options: . Also you can specify VIDIX's driver directly as third subargument in command line: mplayer -vo xvidix:mga_vid.so -fs -zoom -double file.avi or mplayer -vo vesa:vidix:radeon_vid.so -fs -zoom -double -bpp 32 file.avi But it's dangerous, and you shouldn't do that. In this case given driver will be forced and result is unpredictable (it may freeze your computer). You should do that ONLY if you are absolutely sure it will work, and MPlayer doesn't do it automatically. Please tell about it to the developers. The right way is to use VIDIX without arguments to enable driver autodetection. Since VIDIX requires direct hardware access you can either run it as root or set the SUID bit on the MPlayer binary (Warning: This is a security risk!). Alternatively, you can use a special kernel module, like this: Download the development version of svgalib (for example 1.9.17), OR download a version made by Alex especially for usage with MPlayer (it doesn't need the svgalib source to compile) from here. Compile the module in the svgalib_helper directory (it can be found inside the svgalib-1.9.17/kernel/ directory if you've downloaded the source from the svgalib site) and insmod it. To create the necessary devices in the /dev directory, do a make device in the svgalib_helper dir, as root. Move the svgalib_helper directory to the vidix subdirectory of the MPlayer source tree. Remove the comment before the CFLAGS line containing the "svgalib_helper" string from vidix/Makefile. Recompile. ATI cards Currently most ATI cards are supported natively, from Mach64 to the newest Radeons. There are two compiled binaries: radeon_vid for Radeon and rage128_vid for Rage 128 cards. You may force one or let the VIDIX system autoprobe all available drivers. Matrox cards Matrox G200, G400, G450 and G550 have been reported to work. The driver supports video equalizers and should be nearly as fast as the Matrox framebuffer Trident cards There is a driver available for the Trident Cyberblade/i1 chipset, which can be found on VIA Epia motherboards. The driver was written and is maintained by Alastair M. Robinson. 3DLabs cards Although there is a driver for the 3DLabs GLINT R3 and Permedia3 chips, no one has tested it, so reports are welcome. nVidia cards An unique feature of the nvidia_vid driver is its ability to display video on plain, pure, text-only console - with no framebuffer or X magic whatsoever. For this purpose, we'll have to use the video output, as the following example shows: mplayer -vo cvidix example.avi SiS cards This is very experimental code, just like nvidia_vid. It's been tested on SiS 650/651/740 (the most common chipsets used in the SiS versions of the "Shuttle XPC" barebones boxes out there) Reports awaited! DirectFB
"DirectFB is a graphics library which was designed with embedded systems in mind. It offers maximum hardware accelerated performance at a minimum of resource usage and overhead." - quoted from
I'll exclude DirectFB features from this section. Though MPlayer is not supported as a "video provider" in DirectFB, this output driver will enable video playback through DirectFB. It will - of course - be accelerated, on my Matrox G400 DirectFB's speed was the same as XVideo. Always try to use the newest version of DirectFB. You can use DirectFB options on the command line, using the option. Layer selection can be done by the subdevice method, e.g.: (layer -1 is default: autodetect)
DirectFB/Matrox (dfbmga) Please read the main DirectFB section for general information. This video output driver will enable CRTC2 (on the second head) on Matrox G400/G450/G550 cards, displaying video independent of the first head. Ville Syrjala's has a README and a HOWTO on his homepage that explain how to make DirectFB TV output run on Matrox cards. the first DirectFB version with which we could get this working was 0.9.17 (it's buggy, needs that surfacemanager patch from the URL above). Porting the CRTC2 code to mga_vid has been planned for years, patches are welcome. MPEG decoders DVB output and input MPlayer supports cards with the Siemens DVB chipset from vendors like Siemens, Technotrend, Galaxis or Hauppauge. The latest DVB drivers are available from the Linux TV site. If you want to do software transcoding you should have at least a 1GHz CPU. Configure should detect your DVB card. If it did not, force detection with ./configure --enable-dvb If you have ost headers at a non-standard path, set the path with ./configure --with-extraincdir=DVB source directory/ost/include Then compile and install as usual. USAGE Hardware decoding of streams containing MPEG-1/2 video and/or MPEG audio can be done with this command: mplayer -ao mpegpes -vo mpegpes file.mpg|vob Decoding of any other type of video stream requires transcoding to MPEG-1, thus it's slow and may not be worth the trouble, especially if your computer is slow. It can be achieved using a command like this: mplayer -ao mpegpes -vo mpegpes yourfile.ext mplayer -ao mpegpes -vo mpegpes -vf expand yourfile.ext Note that DVB cards only support heights 288 and 576 for PAL or 240 and 480 for NTSC. You must rescale for other heights by adding with the width and height you want to the option. DVB cards accept various widths, like 720, 704, 640, 512, 480, 352 etc. and do hardware scaling in horizontal direction, so you do not need to scale horizontally in most cases. For a 512x384 (aspect 4:3) MPEG-4 (DivX) try: mplayer -ao mpegpes -vo mpegpes -vf scale=512:576 If you have a widescreen movie and you do not want to scale it to full height, you can use the filter to add black bands. To view a 640x384 MPEG-4 (DivX), try: mplayer -ao mpegpes -vo mpegpes -vf expand=640:576 file.avi If your CPU is too slow for a full size 720x576 MPEG-4 (DivX), try downscaling: mplayer -ao mpegpes -vo mpegpes -vf scale=352:576 file.avi If speed does not improve, try vertical downscaling, too: mplayer -ao mpegpes -vo mpegpes -vf scale=352:288 file.avi For OSD and subtitles use the OSD feature of the expand filter. So, instead of or , use (the 5th parameter at the end will enable OSD rendering). You may want to move the image up a bit to get a bigger black zone for subtitles. You may also want to move subtitles up, if they are outside your TV screen, use the option to adjust this ( is a good choice). In order to play non-25fps movies on a PAL TV or with a slow CPU, add the option. To keep the aspect ratio of MPEG-4 (DivX) files and get the optimal scaling parameters (hardware horizontal scaling and software vertical scaling while keeping the right aspect ratio), use the new dvbscale filter: for a 4:3 TV: -vf dvbscale,scale=-1:0,expand=-1:576:-1:-1:1 for a 16:9 TV: -vf dvbscale=1024,scale=-1:0,expand=-1:576:-1:-1:1 Digital TV (DVB input module) You can use your DVB card for watching Digital TV. You should have the programs scan and szap/tzap/czap/azap installed; they are all included in the drivers package. Verify that your drivers are working properly with a program such as dvbstream (that is the base of the DVB input module). Now you should compile a ~/.mplayer/channels.conf file, with the syntax accepted by szap/tzap/czap/azap, or have scan compile it for you. If you have more than one card type (e.g. Satellitar, Terrestrial, Cable and ATSC) you can save your channels files as ~/.mplayer/channels.conf.sat, ~/.mplayer/channels.conf.ter, ~/.mplayer/channels.conf.cbl, and ~/.mplayer/channels.conf.atsc, respectively, so as to implicitly hint MPlayer to use these files rather than ~/.mplayer/channels.conf, and you only need to specify which card to use. Make sure that you have have only Free to Air channels in your channels.conf file, or MPlayer will try to skip to the next visible one, but it may take long if there are many consecutive encrypted channels. In your audio and video fields you can use an extended syntax: (for a maximum of 6 pids each); in this case MPlayer will include in the stream all the indicated pids, plus pid 0 (that contains the PAT). You are encouraged to include in each row the PMT pid for the corresponding channel (if you know it). You can also specify 8192, this will select all pids on this frequency and you can then switch between the programs with TAB. This might need more bandwidth, though cheap cards always transfer all channels at least to the kernel so it does not make much of a difference for these. Other possible uses are: televideo pid, second audio track, etc. If MPlayer complains frequently about Too many video/audio packets in the buffer or if you notice a growing desynchronization between audio and video try to use the libavformat MPEG-TS demuxer by adding to your command line. To show the first of the channels present in your list, run mplayer dvb:// If you want to watch a specific channel, such as R1, run mplayer dvb://R1 If you have more than one card you also need to specify the number of the card where the channel is visible (e.g. 2) with the syntax: mplayer dvb://2@R1 To change channels press the h (next) and k (previous) keys, or use the OSD menu. If your ~/.mplayer/menu.conf contains a <dvbsel> entry, such as the one in the example file etc/dvb-menu.conf (that you can use to overwrite ~/.mplayer/menu.conf), the main menu will show a sub-menu entry that will permit you to choose one of the channels present in your channels.conf, possibly preceded by a menu with the list of cards available if more than one is usable by MPlayer. If you want to save a program to disk you can use mplayer -dumpfile r1.ts -dumpstream dvb://R1 If you want to record it in a different format (re-encoding it) instead you can run a command such as mencoder -o r1.avi -ovc xvid -xvidencopts bitrate=800 \ -oac mp3lame -lameopts cbr:br=128 -pp=ci dvb://R1 Read the man page for a list of options that you can pass to the DVB input module. FUTURE If you have questions or want to hear feature announcements and take part in discussions on this subject, join our MPlayer-DVB mailing list. Please remember that the list language is English. In the future you may expect the ability to display OSD and subtitles using the native OSD feature of DVB cards, as well as more fluent playback of non-25fps movies and realtime transcoding between MPEG-2 and MPEG-4 (partial decompression). DXR2 MPlayer supports hardware accelerated playback with the Creative DXR2 card. First of all you will need properly installed DXR2 drivers. You can find the drivers and installation instructions at the DXR2 Resource Center site. USAGE Enable TV output. or Enable Overlay output in X11. This option is used to control the DXR2 driver. The overlay chipset used on the DXR2 is of pretty bad quality but the default settings should work for everybody. The OSD may be usable with the overlay (not on TV) by drawing it in the colorkey. With the default colorkey settings you may get variable results, usually you will see the colorkey around the characters or some other funny effect. But if you properly adjust the colorkey settings you should be able to get acceptable results. Please see the man page for available options. DXR3/Hollywood+ MPlayer supports hardware accelerated playback with the Creative DXR3 and Sigma Designs Hollywood Plus cards. These cards both use the em8300 MPEG decoder chip from Sigma Designs. First of all you will need properly installed DXR3/H+ drivers, version 0.12.0 or later. You can find the drivers and installation instructions at the DXR3 & Hollywood Plus for Linux site. configure should detect your card automatically, compilation should go without problems. USAGE activates the overlay instead of TVOut. It requires that you have a properly configured overlay setup to work right. The easiest way to configure the overlay is to first run autocal. Then run mplayer with dxr3 output and without overlay turned on, run dxr3view. In dxr3view you can tweak the overlay settings and see the effects in realtime, perhaps this feature will be supported by the MPlayer GUI in the future. When overlay is properly set up you will no longer need to use dxr3view. turns on prebuffering. Prebuffering is a feature of the em8300 chip that enables it to hold more than one frame of video at a time. This means that when you are running with prebuffering MPlayer will try to keep the video buffer filled with data at all times. If you are on a slow machine MPlayer will probably use close to, or precisely 100% of CPU. This is especially common if you play pure MPEG streams (like DVDs, SVCDs a.s.o.) since MPlayer will not have to reencode it to MPEG it will fill the buffer very fast. With prebuffering video playback is much less sensitive to other programs hogging the CPU, it will not drop frames unless applications hog the CPU for a long time. When running without prebuffering the em8300 is much more sensitive to CPU load, so it is highly suggested that you turn on MPlayer's option to avoid further loss of sync. will turn on the new sync-engine. This is currently an experimental feature. With the sync feature turned on the em8300's internal clock will be monitored at all times, if it starts to deviate from MPlayer's clock it will be reset causing the em8300 to drop any frames that are lagging behind. will set the TV norm of the DXR3 card without the need for external tools like em8300setup. Valid norms are 5 = NTSC, 4 = PAL-60, 3 = PAL. Special norms are 2 (auto-adjust using PAL/PAL-60) and 1 (auto-adjust using PAL/NTSC) because they decide which norm to use by looking at the frame rate of the movie. norm = 0 (default) does not change the current norm. = device number to use if you have more than one em8300 card. Any of these options may be left out. seems to work great when playing MPEG-4 (DivX) movies. People have reported problems using the prebuf option when playing MPEG-1/2 files. You might want to try running without any options first, if you have sync problems, or DVD subtitle problems, give a try. For audio output, where X is the device number (0 if one card). The em8300 cannot play back samplerates lower than 44100Hz. If the sample rate is below 44100Hz select either 44100Hz or 48000Hz depending on which one matches closest. I.e. if the movie uses 22050Hz use 44100Hz as 44100 / 2 = 22050, if it is 24000Hz use 48000Hz as 48000 / 2 = 24000 and so on. This does not work with digital audio output (). To watch non-MPEG content on the em8300 (i.e. MPEG-4 (DivX) or RealVideo) you have to specify an MPEG-1 video filter such as libavcodec (lavc). See the man page for further info about . Currently there is no way of setting the fps of the em8300 which means that it is fixed to 30000/1001 fps. Because of this it is highly recommended that you use especially if you are using prebuffering. Then why 25 and not 30000/1001? Well, the thing is that when you use 30000/1001 the picture becomes a bit jumpy. The reason for this is unknown to us. If you set it to somewhere between 25 and 27 the picture becomes stable. For now all we can do is accept this for a fact. Although the DXR3 driver can put some OSD onto the MPEG-1/2/4 video, it has much lower quality than MPlayer's traditional OSD, and has several refresh problems as well. The command line above will firstly convert the input video to MPEG-4 (this is mandatory, sorry), then apply an expand filter which won't expand anything (-1: default), but apply the normal OSD onto the picture (that's what the "1" at the end does). The em8300 supports playing back AC3 audio (surround sound) through the digital audio output of the card. See the option above, it must be used to specify the DXR3's output instead of a sound card. Other visualization hardware Zr This is a display-driver () for a number of MJPEG capture/playback cards (tested for DC10+ and Buz, and it should work for the LML33, the DC10). The driver works by encoding the frame to JPEG and then sending it to the card. For the JPEG encoding libavcodec is used, and required. With the special cinerama mode, you can watch movies in true wide screen provided that you have two beamers and two MJPEG cards. Depending on resolution and quality settings, this driver may require a lot of CPU power, remember to specify if your machine is too slow. Note: My AMD K6-2 350MHz is (with ) quite adequate for watching VCD sized material and downscaled movies. This driver talks to the kernel driver available at , so you must get it working first. The presence of an MJPEG card is autodetected by the configure script, if autodetection fails, force detection with ./configure --enable-zr The output can be controlled by several options, a long description of the options can be found in the man page, a short list of options can be viewed by running mplayer -zrhelp Things like scaling and the OSD (on screen display) are not handled by this driver but can be done using the video filters. For example, suppose that you have a movie with a resolution of 512x272 and you want to view it fullscreen on your DC10+. There are three main possibilities, you may scale the movie to a width of 768, 384 or 192. For performance and quality reasons, I would choose to scale the movie to 384x204 using the fast bilinear software scaler. The command line is mplayer -vo zr -sws 0 -vf scale=384:204 movie.avi Cropping can be done by the filter and by this driver itself. Suppose that a movie is too wide for display on your Buz and that you want to use to make the movie less wide, then you would issue the following command mplayer -vo zr -zrcrop 720x320+80+0 benhur.avi if you want to use the filter, you would do mplayer -vo zr -vf crop=720:320:80:0 benhur.avi Extra occurrences of invoke cinerama mode, i.e. you can distribute the movie over several TV's or beamers to create a larger screen. Suppose you have two beamers. The left one is connected to your Buz at /dev/video1 and the right one is connected to your DC10+ at /dev/video0. The movie has a resolution of 704x288. Suppose also that you want the right beamer in black and white and that the left beamer should have JPEG frames at quality 10, then you would issue the following command mplayer -vo zr -zrdev /dev/video0 -zrcrop 352x288+352+0 -zrxdoff 0 -zrbw \ -zrcrop 352x288+0+0 -zrdev /dev/video1 -zrquality 10 \ movie.avi You see that the options appearing before the second only apply to the DC10+ and that the options after the second apply to the Buz. The maximum number of MJPEG cards participating in cinerama is four, so you can build a 2x2 vidiwall. Finally an important remark: Do not start or stop XawTV on the playback device during playback, it will crash your computer. It is, however, fine to FIRST start XawTV, THEN start MPlayer, wait for MPlayer to finish and THEN stop XawTV. Blinkenlights This driver is capable of playback using the Blinkenlights UDP protocol. If you don't know what Blinkenlights or its successor Arcade are, find it out. Although this is most probably the least used video output driver, without a doubt it is the coolest MPlayer has to offer. Just watch some of the Blinkenlights documentation videos. On the Arcade video you can see the Blinkenlights output driver in action at 00:07:50. TV-out support Matrox G400 cards Under Linux you have two methods to get G400 TV out working: for Matrox G450/G550 TV-out instructions, please see the next section! XFree86 Using the driver and the HAL module, available from the Matrox site. This will give you X on the TV. This method doesn't give you accelerated playback as under Windows! The second head has only YUV framebuffer, the BES (Back End Scaler, the YUV scaler on G200/G400/G450/G550 cards) doesn't work on it! The windows driver somehow workarounds this, probably by using the 3D engine to zoom, and the YUV framebuffer to display the zoomed image. If you really want to use X, use the options, but it will be SLOW, and has Macrovision copy protection enabled (you can "workaround" Macrovision using this perl script). Framebuffer Using the matroxfb modules in the 2.4 kernels. 2.2 kernels don't have the TVout feature in them, thus unusable for this. You have to enable ALL matroxfb-specific feature during compilation (except MultiHead), and compile them into modules! You'll also need I2C enabled. Enter TVout and type ./compile.sh. Install TVout/matroxset/matroxset somewhere into your PATH. If you don't have fbset installed, put TVout/fbset/fbset somewhere into your PATH. If you don't have con2fb installed, put TVout/con2fb/con2fb somewhere into your PATH. Then enter into the TVout/ directory in the MPlayer source, and execute ./modules as root. Your text-mode console will enter into framebuffer mode (no way back!). Next, EDIT and run the ./matroxtv script. This will present you to a very simple menu. Press 2 and Enter. Now you should have the same picture on your monitor, and TV. If the TV (PAL by default) picture has some weird stripes on it, the script wasn't able to set the resolution correctly (to 640x512 by default). Try other resolutions from the menu and/or experiment with fbset. Yoh. Next task is to make the cursor on tty1 (or whatever) to disappear, and turn off screen blanking. Execute the following commands: echo -e '\033[?25l' setterm -blank 0 or setterm -cursor off setterm -blank 0 You possibly want to put the above into a script, and also clear the screen. To turn the cursor back: echo -e '\033[?25h' or setterm -cursor on Yeah kewl. Start movie playing with mplayer -vo mga -fs -screenw 640 -screenh 512 filename (If you use X, now change to matroxfb with for example CtrlAltF1.) Change 640 and 512 if you set the resolution to other... Enjoy the ultra-fast ultra-featured Matrox TV output (better than Xv)! Building a Matrox TV-out cable No one takes any responsibility, nor guarantee for any damage caused by this documentation. Cable for G400 The CRTC2 connector's fourth pin is the composite video signal. The ground are the sixth, seventh and eighth pins. (info contributed from Balázs Rácz) Cable for G450 The CRTC2 connector's first pin is the composite video signal. The ground are the fifth, sixth, seventh, and fifteenth (5, 6, 7, 15) pins. (info contributed from Balázs Kerekes) Matrox G450/G550 cards TV output support for these cards has only been recently introduced, and is not yet in the mainstream kernel. Currently the mga_vid module can't be used AFAIK, because the G450/G550 driver works only in one configuration: the first CRTC chip (with much more features) on the first display (on monitor), and the second CRTC (no BES - for explanation on BES, please see the G400 section above) on TV. So you can only use MPlayer's fbdev output driver at the present. The first CRTC can't be routed to the second head currently. The author of the kernel matroxfb driver - Petr Vandrovec - will maybe make support for this, by displaying the first CRTC's output onto both of the heads at once, as currently recommended for G400, see the section above. The necessary kernel patch and the detailed HOWTO is downloadable from ATI cards PREAMBLE Currently ATI doesn't want to support any of its TV-out chips under Linux, because of their licensed Macrovision technology. ATI CARDS TV-OUT STATUS ON LINUX ATI Mach64: supported by GATOS. ASIC Radeon VIVO: supported by GATOS. Radeon and Rage128: supported by MPlayer! Check VESA driver and VIDIX sections. Rage Mobility P/M, Radeon, Rage 128, Mobility M3/M4: supported by atitvout. On other cards, just use the VESA driver, without VIDIX. Powerful CPU is needed, though. Only thing you need to do - Have the TV connector plugged in before booting your PC since video BIOS initializes itself only once during POST procedure. nVidia First, you MUST download the closed-source drivers from . I will not describe the installation and configuration process because it does not cover the scope of this documentation. After XFree86, XVideo, and 3D acceleration is properly working, edit your card's Device section in the XF86Config file, according to the following example (adapt for your card/TV): Section "Device" Identifier "GeForce" VendorName "ASUS" BoardName "nVidia GeForce2/MX 400" Driver "nvidia" #Option "NvAGP" "1" Option "NoLogo" Option "CursorShadow" "on" Option "TwinView" Option "TwinViewOrientation" "Clone" Option "MetaModes" "1024x768,640x480" Option "ConnectedMonitor" "CRT, TV" Option "TVStandard" "PAL-B" Option "TVOutFormat" "Composite" EndSection Of course the important thing is the TwinView part. NeoMagic The NeoMagic chip is found in a variety of laptops, some of them are equipped with a simple analog TV encoder, some have a more advanced one. Analog encoder chip: It has been reported that reliable TV out can be obtained by using or . You need to have vesafb compiled in your kernel and pass the following parameters on the kernel command line: . You should start X, then switch to console mode with e.g. CtrlAltF1. If you fail to start X before running MPlayer from the console, the video becomes slow and choppy (explanations are welcome). Login to your console, then initiate the following command: clear; mplayer -vo fbdev -zoom -cache 8192 dvd:// Now you should see the movie running in console mode filling up about half your laptop's LCD screen. To switch to TV hit FnF5 three times. Tested on a Tecra 8000, 2.6.15 kernel with vesafb, ALSA v1.0.10. Chrontel 70xx encoder chip: Found in IBM Thinkpad 390E and possibly other Thinkpads or notebooks. You must use for PAL or for NTSC. It will provide TV output function in the following 16 bpp and 8 bpp modes: NTSC 320x240, 640x480 and maybe 800x600 too. PAL 320x240, 400x300, 640x480, 800x600. Mode 512x384 is not supported in BIOS. You must scale the image to a different resolution to activate TV out. If you can see an image on the screen in 640x480 or in 800x600 but not in 320x240 or other smaller resolution you need to replace two tables in vbelib.c. See the vbeSetTV function for details. Please contact the author in this case. Known issues: VESA-only, no other controls such as brightness, contrast, blacklevel, flickfilter are implemented.