Mercurial > mplayer.hg
annotate DOCS/it/encoding.html @ 12862:01e2dd55bf49
embarassing typo
| author | diego |
|---|---|
| date | Mon, 19 Jul 2004 23:32:12 +0000 |
| parents | a5785a0b9ee1 |
| children |
| rev | line source |
|---|---|
| 4867 | 1 <HTML> |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
2 <!-- Synced with english version 1.87 --> |
| 5583 | 3 |
| 4 <HEAD> | |
| 7509 | 5 <TITLE>Codificare - MEncoder - Movie Encoder per Linux</TITLE> |
| 9512 | 6 <LINK REL="stylesheet" TYPE="text/css" HREF="../default.css"> |
| 7509 | 7 <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> |
| 5583 | 8 </HEAD> |
| 9 | |
| 7509 | 10 <BODY> |
| 4867 | 11 |
| 12 | |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
13 <H1><A NAME="encoding">7. Codificare con MEncoder</A></H1> |
| 4867 | 14 |
| 12862 | 15 <P>Per la lista completa delle opzioni disponibili per MEncoder e gli esempi, vedi |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
16 la pagina di man. Per una serie di esempi pratici ed una guida dettagliata |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
17 sull'uso dei parametri di codifica, leggi i |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
18 <A HREF="tech/encoding-tips.txt">consigli per la codifica</A> raccolti da |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
19 varie discussioni avvenute sulla mailing list |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
20 <A HREF="http://mplayerhq.hu/mailman7listinfo/mplayer-users">mplayer-users</A>. |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
21 Cerca negli <A HREF="http://mlayerhq.hu/mailman/mplayer-users">archivi</A> |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
22 le discussioni sui dettagli ed i problemi relativi alla codifica con MEncoder. |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
23 </P> |
| 4867 | 24 |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
25 <H3><A NAME="2pass">7.1 Codificare in MPEG-4 ("DivX") in 2 o 3 passaggii</H3> |
| 4867 | 26 |
| 27 <P><U><B>codifica a 2 passaggi :</B></U> il nome deriva dal fatto che questo metodo codifica il file <I>due volte</I>. | |
| 28 La prima codifica (<I>passaggio</I> doppiato) crea dei file temporanei (*.log) con una grandezza | |
| 29 di pochi megabyte, non cancellarli ancora (puoi cancellare l' AVI). Nel secondo passaggio, viene creato il | |
| 30 file di output, usando i dati sul bitrate dei file temporanei. Il file risultante avrà una | |
| 31 migliore qualità d'immagine. Se questa è la prima volta che ne senti parlare, | |
| 32 dovresti consultare alcune guide disponibili in rete.</P> | |
| 33 | |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
34 <P>Questo esempio mostra come codificare un DVD in un AVI MPEG-4 ("DivX") a 2 |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
35 passaggi. Bisogna dare solo due comandi :<BR> |
| 8707 | 36 |
| 4867 | 37 <CODE> rm frameno.avi</CODE> - rimuovi questo file che può essere rimasto |
| 38 da una precedente codifica a 3 passaggi (interferisce col processo attuale)<BR> | |
| 10405 | 39 <CODE> mencoder dvd://2 -ovc lavc -lavcopts |
| 8707 | 40 vcodec=mpeg4:vpass=1 -oac copy -o movie.avi<BR> |
| 10405 | 41 mencoder dvd://2 -ovc lavc -lavcopts |
| 8707 | 42 vcodec=mpeg4:vpass=2 -oac copy -o movie.avi</CODE></P> |
| 4867 | 43 |
| 44 <P><U><B>codifica a 3 passaggi :</B></U> questa è un' estensione della codifica a 2 passaggi, | |
| 45 dove la codifica audio avviene in un passaggio separato. Questo metodo abilita la | |
| 46 stima del bitrate video raccomandato per far stare il file risultante in un CD. In più, | |
| 47 l'audio è codificato solo una volta, diversamente dalla modalità in 2 passaggi. Schema :</P> | |
| 48 | |
| 8707 | 49 <OL> |
| 50 <LI>Rimuovi il file temporaneo che va in conflitto: | |
| 51 <P><CODE>rm frameno.avi</CODE></P></LI> | |
| 52 <LI>Primo passaggio: | |
| 53 <P><CODE>mencoder <file/DVD> -ovc frameno -oac mp3lame -lameopts vbr=3 -o frameno.avi</CODE></P> | |
| 54 <P>Sarà creato un file avi di solo audio, contenente SOLO | |
| 4867 | 55 il flusso audio richiesto. Non dimenticare <CODE>-lameopts</CODE>, se ne |
| 56 hai bisogno. Se stai codificando un filmato lungo, MEncoder da | |
| 57 i valori di bitrate consigliati per dimensioni di destinazione di 650Mb, 700Mb, e 800Mb, | |
| 8707 | 58 dopo la fine di questo passaggio.</P></LI> |
| 59 <LI>Secondo passaggio: | |
| 60 <P><CODE>mencoder <file/DVD> -oac copy | |
| 61 -ovc lavc -lavcopts vcodec=mpeg4:vpass=1:vbitrate=<bitrate></CODE></P> | |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
62 <P>Questo è il primo passaggio della codifica video. |
| 4867 | 63 Puoi specificare il bitrate video dato da MEncoder alla fine del precedente |
| 8707 | 64 passaggio.</P></LI> |
| 65 <LI>Terzo passaggio: | |
| 66 <P><CODE>mencoder <file/DVD> -oac copy | |
| 67 -ovc lavc -lavcopts vcodec=mpeg4:vpass=2:vbitrate=<bitrate></CODE></P> | |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
68 <P>Questo è il secondo passaggio della codifica video. |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
69 Specifica lo stesso bitrate del passo precedente a meno che tu sappia |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
70 veramente cosa stai facendo. In questo passaggio, l'audio preso da |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
71 <CODE>frameno.avi</CODE> sarà inserito |
| 8707 | 72 nel file di destinazione.. ed è tutto pronto!</P></LI> |
| 73 </OL> | |
| 4867 | 74 |
| 75 <P><B>Esempio di codifica a 3 passaggi :</B></P> | |
| 76 | |
| 77 <P><CODE> rm frameno.avi</CODE> - rimuovi questo file, | |
| 78 che può essere rimasto da una precedente codifica a 3 passaggi (interferisce con quella attuale)<BR> | |
| 79 | |
| 10405 | 80 <CODE> mencoder dvd://2 -ovc frameno |
| 8707 | 81 -o frameno.avi -oac mp3lame -lameopts vbr=3<BR> |
| 10405 | 82 mencoder dvd://2 -ovc lavc |
| 8707 | 83 -lavcopts vcodec=mpeg4:vpass=1 -oac copy -o movie.avi<BR> |
| 10405 | 84 mencoder dvd://2 -ovc lavc |
| 8707 | 85 -lavcopts vcodec=mpeg4:vpass=2 -oac copy -o movie.avi</CODE></P> |
| 4867 | 86 |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
87 <H2><A NAME="rescaling">7.2 Codificare in formato MPEG</A></H2> |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
88 |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
89 <P>MEncoder può creare file in formato MPEG (MPEG-PS). Ciò è probabilmente utile |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
90 solo con il codec <I>mpeg1video<I> di libavcodec, poiché i programmi - tranne |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
91 MPlayer - si aspettano solo video MPEG1 ed audio MPEG1 layer 2 (MP2) nei file |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
92 MPEG.</P> |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
93 |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
94 <P>Questa funzione non è molto utile al momento, oltre ad avere probabilmente |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
95 molti bug, soprattutto perchè al momento MEncoder non può codificare l'audio |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
96 MPEG1 layer 2 (MP2), che tutti gli altri player si aspetano di trovare nei |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
97 file MPEG.</P> |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
98 |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
99 <P>Per modificare il formato d'uscita di MEncoder, usare l'opzione |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
100 <CODE>-of mpeg</CODE>.</P> |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
101 |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
102 <P>Esempio:<BR> |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
103 <CODE>mencoder -of mpeg -ovc lavc -lavcopts vcodec=mpeg1video |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
104 -oac copy <other options> media.avi -o output.mpg</CODE></P> |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
105 |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
106 |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
107 <H2><A NAME="rescaling">7.3 Ridimensionare i filmati</A></H2> |
| 4867 | 108 |
| 8707 | 109 <P>Spesso emerge l'esigenza di ridimensionare le immagini del filmato. Le ragioni possono |
| 110 essere molte: diminuire la dimensione del file, la larghezza di banda della rete, ecc. Molte persone | |
| 111 usano il ridimensionamento anche quando convertono DVD o SVCD in AVI DivX. <B>Questo è male.</B> | |
| 112 Invece di fare così, leggete la sezione <A HREF="#aspect">Conservare | |
| 113 le proporzioni</A>.</P> | |
| 4867 | 114 |
| 5994 | 115 <P>Il processo di ridimensionamento è gestito dal filtro video <I>'scale'</I>: |
|
9644
0fe056bdb135
vop -> vf change, small fixes. The Polish documentation should be checked for correctness.
jonas
parents:
9512
diff
changeset
|
116 <CODE>-vf scale=larghezza:altezza</CODE>. La qualità può essere impostata tramite l'opzione |
| 5994 | 117 <CODE>-sws</CODE>. Se non specificata, <B>MEncoder</B> userà il valore 0 : |
| 118 bilineare veloce.</P> | |
| 4867 | 119 |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
120 <H5>Utilizzo :</H5> |
| 8707 | 121 |
| 122 <P><CODE> mencoder input.mpg -ovc lavc -lavcopts | |
|
9644
0fe056bdb135
vop -> vf change, small fixes. The Polish documentation should be checked for correctness.
jonas
parents:
9512
diff
changeset
|
123 vcodec=mpeg4 -vf scale=640:480 -oac copy -o |
| 8707 | 124 output.avi</CODE></P> |
| 4867 | 125 |
| 126 | |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
127 <H2><A NAME="copying">7.4 Copia da stream</A></H2> |
| 4867 | 128 |
| 129 <P><B>MEncoder</B> può gestire i flussi in entrata in due modi : <B>codificandoli</B> o | |
| 130 <B>copiandoli</B>. Questa sezione tratta la <B>copia</B>.</P> | |
| 131 | |
| 132 <P> | |
| 133 <UL> | |
| 134 <LI><B>Flusso video</B> (opzione <CODE>-ovc copy</CODE>) : si possono fare tante belle cose :)<BR> | |
| 135 Come, mettere (non convertire!) video FLI o VIVO o MPEG1 in un file AVI ! | |
| 136 Naturalmente solo <B>MPlayer</B> può leggere tali file :) E probabilmente non ha | |
| 137 alcuna utilità nella vita reale. Seriamente : la copia del flusso video può essere utile per esempio | |
| 138 quando si vuole codificare solo il flusso audio (come, PCM non compresso | |
| 139 in MP3).</LI> | |
| 140 | |
| 5583 | 141 <LI><B>Flusso audio</B> (opzione <CODE>-oac copy</CODE>) : semplice da capire. |
| 142 E' possibile prendere un file audio esterno (MP3, AC3, Vorbis) e mixarlo | |
| 143 nel flusso di output. Usa l'opzione <CODE>-audiofile <filename></CODE> | |
| 144 per farlo.</LI> | |
| 4867 | 145 </UL> |
| 146 </P> | |
| 147 | |
| 148 | |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
149 <H2><A NAME="fixing">7.5 Correggere gli AVI con indice o intervallo malformati</A></H2> |
| 4867 | 150 |
| 8707 | 151 <P>E' semplicissimo. Copiamo semplicemente i flussi audio e video, e |
| 4867 | 152 <B>MEncoder</B> genera l'indice. Naturalmente questo non può correggere possibili bug |
| 4961 | 153 nei flussi video e/o audio. Corregge anche i file mal intervallati, |
| 4867 | 154 così non sarà più necessaria l'opzione <CODE>-ni</CODE> per leggerli.</P> |
| 155 | |
| 5994 | 156 <P>Comando : <CODE>mencoder -idx input.avi -ovc copy -oac copy -o output.avi</CODE></P> |
| 4867 | 157 |
| 158 | |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
159 <H3><A NAME="appending">7.5.1 Unire file AVI</A></H3> |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
160 |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
161 <P>Un utile effetto collaterale della funzione di riparazione dei file AVI è la |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
162 possibilità di usare MEncored per unire 2 (o più) file AVI:</P> |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
163 |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
164 <P>Comando: <CODE>cat 1.avi 3.avi | mencoder -noidx -ovc copy -oac copy -o |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
165 output.avi -</CODE></P> |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
166 |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
167 <P><B>Nota:</B>MEncoder si aspetta che <CODE>1.avi</CODE> e <CODE>2.avi</CODE> |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
168 utilizzino gli stessi codec, risoluzione, stream rate, ecc, ed almeno 1.avi |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
169 non deve avere errori. Se necessario, puoi riparare i file prima di unirli, |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
170 come descritto <A HREF="#fixing">sopra</A>.</P> |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
171 |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
172 |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
173 <H2><A NAME="libavcodec">7.6 Codificare con le famiglia di codec libavcodec</A></H2> |
| 4867 | 174 |
| 7509 | 175 <P><A HREF="codecs.html#libavcodec">Libavcodec</A> fornisce una semplice codifica in |
| 4867 | 176 molti interessanti formati video e audio (al momento i suoi codec audio non sono |
| 177 supportati). Puoi codificare i seguenti codec :</P> | |
| 178 | |
| 179 <P> | |
| 180 <UL> | |
| 181 <LI>mjpeg - Motion JPEG</LI> | |
| 182 <LI>h263 - H263</LI> | |
| 183 <LI>h263p - H263 Plus</LI> | |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
184 <LI>mpeg4 - ISO standard MPEG-4 (DivX 5, XviD compatibile)</LI> |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
185 <LI>msmpeg4 - variant MPEG-4 pre-standard di MS, v3 (noto anche come DivX3)</LI> |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
186 <LI>msmpeg4v2 - MPEG-4 pre-standard di MS, v2 (usati in vecchi file asf)</LI> |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
187 <LI>wmv1 - Windows Media Video, versione 1 (noto anche come WMV7)</LI> |
| 4867 | 188 <LI>rv10 - un vecchio codec RealVideo</LI> |
| 189 <LI>mpeg1video - video MPEG1 :)</LI> | |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
190 <LI>huffyuv - compressione lossless (senza perdita di qualità, ndt)</LI> |
| 4867 | 191 </UL> |
| 192 </P> | |
| 193 | |
| 194 <P>La prima colonna contiene i nomi dei codec che devono essere passati dopo l'opzione | |
| 195 <CODE>vcodec</CODE>, come : <CODE>-lavcopts vcodec=msmpeg4</CODE></P> | |
| 196 | |
| 197 <P>Un esempio, con la compressione MJPEG :<BR> | |
| 10405 | 198 <CODE> mencoder dvd://2 -o title2.avi -ovc lavc |
| 8707 | 199 -lavcopts vcodec=mjpeg -oac copy</CODE></P> |
| 4867 | 200 |
| 201 | |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
202 <H2><A NAME="image_files">7.7 Codificare da file di immagine multipli (JPEG, PNG o TGA)</A></H2> |
| 4939 | 203 |
| 8707 | 204 <P><B>MEncoder</B> è in grado di creare filmati a partire da uno o più file JPEG, PNG o TGA. |
| 4939 | 205 Con un semplice framecopy può creare file MJPEG (Motion JPEG) o MPNG |
| 206 (Motion PNG).</P> | |
| 207 | |
| 208 <P><B><I>Spiegazione del processo</I></B></P> | |
| 209 | |
| 210 <P><B>MEncoder</B> <I>decodifica</I> le immagini in input con un codec video MJPEG | |
| 5583 | 211 disponibile (per i PNG, usa <B>libpng</B>). |
| 4939 | 212 </P> |
| 213 | |
| 214 <P><B>MEncoder</B> quindi passa l' immagine decodificata al compressore video scelto | |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
215 (DivX4, Xvid, ffmpeg msmpeg4, ecc...).</P> |
| 4939 | 216 |
| 217 <P><B><I>Esempi</I></B></P> | |
| 218 | |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
219 <P>La spiegazione dell'opzione <CODE>-mf</CODE> si trova nella pagina di man.</P> |
| 4939 | 220 |
| 221 <P><I>Creare un file DivX4 da tutti i file JPEG presenti nella directory attuale :</I><BR> | |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
222 <CODE>mencoder -mf on:w=800:h=600:fps=25 -ovc divx4 |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
223 -o output.avi \*.jpg</CODE></P> |
| 4939 | 224 |
| 5583 | 225 <P><I>Creare un file DivX4 da alcuni dei file JPEG presenti nella directory attuale :</I><BR> |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
226 <CODE>mencoder -mf on:w=800:h=600:fps=25 |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
227 -ovc divx4 -o output.avi frame001.jpg,frame002.jpg</CODE></P> |
| 5583 | 228 |
| 4939 | 229 <P><I>Creare un file Motion JPEG (MJPEG) da tutti i file JPEG presenti nella directory attuale :</I><BR> |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
230 <CODE>mencoder -mf on:w=800:h=600:fps=25 -ovc copy |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
231 -o output.avi \*.jpg</CODE></P> |
| 4939 | 232 |
| 233 <P><I>Creare un file non compresso da tutti i file PNG presenti nella directory attuale :</I><BR> | |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
234 <CODE>mencoder -mf on:w=800:h=600:fps=25:type=png -ovc rawrgb |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
235 -o output.avi \*.png</CODE></P> |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
236 |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
237 <P><B>Nota:</B> La larghezza deve essere un multiplo intero di 4, è una |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
238 limitazione del formato RAW RGB dei file AVI.</P> |
| 4939 | 239 |
| 240 <P><I>Creare un file Motion PNG (MPNG) da tutti i file PNG presenti nella directory attuale :</I><BR> | |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
241 <CODE>mencoder -mf on:w=800:h=600:fps=25:type=png -ovc copy |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
242 -o output.avi \*.png</CODE></P> |
| 4939 | 243 |
| 7509 | 244 <P><I>Creare un file Motion TGA (MTGA) da tutti i file TGA presenti nella directory attuale:</I><BR> |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
245 <CODE>mencoder -mf on:w=800:h=600:fps=25:type=tga -ovc copy |
|
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
246 -o output.avi \*.tga</CODE></P> |
| 7509 | 247 |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
248 <H2><A NAME="vobsub">7.8 Estrarre i sottotitoli dei DVD in un file Vobsub</A></H2> |
| 6824 | 249 |
| 250 <P><B>MEncoder</B> è in grado di estrarre i sottotitoli dei DVD e codificarli nel formato file Vobsub. | |
| 251 Questi consistono in un paio di file con estensione .idx e .sub e sono generalmente impacchettati in un unico archivio .rar. MPlayer può leggerli usando le opzioni <I>-vobsub</I> e <I>-vobsubid</I>.</P> | |
| 252 | |
| 253 <P>Devi specificare il nome di base (cioè senza le estensioni .idx o .sub) dei file di output con | |
| 254 <I>-vobsubout</I> e l'indice per questo sottotitolo nei file risultanti con <I>-vobsuboutindex</I>.</P> | |
| 255 | |
| 256 <P>Se l'input non viene da un DVD dovresti usare <I>-ifo</I> per indicare il file .ifo necessario per | |
| 257 costruire il file .idx risultante.</P> | |
| 258 | |
| 259 <P>Se l'input non viene da un DVD e non hai il file .ifo devi usare l'opzione <I>-vobsubid</I> per fargli | |
| 260 sapere quale identificativo di lingua mettere nel file .idx.</P> | |
| 261 | |
| 262 <P>Ogni esecuzione aggiungerà l'attuale sottotitolo ai file .idx e .sub se questi esistono già. | |
| 263 Quindi dovresti rimuoverli prima di ogni nuova esecuzione.</P> | |
| 264 | |
| 265 <P><B>Esempi</B></P> | |
| 266 | |
| 267 <P><I>Copiare due sottotitoli da un DVD usando la codifica a tre passaggi</I><BR> | |
| 268 <CODE>rm sottotitoli.idx sottotitoli.sub</CODE><BR> | |
| 10405 | 269 <CODE>mencoder dvd://1 -vobsubout sottotitoli -vobsuboutindex 0 |
| 8707 | 270 -sid 2 -o frameno.avi -ovc frameno -oac mp3lame -lameopts vbr=3</CODE><BR> |
| 10405 | 271 <CODE>mencoder dvd://1 -oac copy -ovc divx4 -divx4opts pass=1</CODE><BR> |
| 272 <CODE>mencoder dvd://1 -oac copy -ovc divx4 -divx4opts pass=2 -vobsubout | |
| 8707 | 273 subtitles -vobsuboutindex 1 -sid 5</CODE></P> |
| 6824 | 274 |
| 275 <P><I>Copiare un sottotitolo francese da un file MPEG</I><BR> | |
| 276 <CODE>rm sottotitoli.idx sottotitoli.sub</CODE><BR> | |
| 277 <CODE>mencoder movie.mpg -ifo movie.ifo -vobsubout subtitles -vobsuboutindex 0 -vobsuboutid fr -sid 1</CODE></P> | |
| 4939 | 278 |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
279 <H2><A NAME="aspect">7.9 Conservare le proporzioni</A></H2> |
| 8707 | 280 |
| 281 <P>I file dei DVD e dei SVCD (cioè MPEG1/2) contengono un valore di proporzione, | |
| 282 che descrive come il lettore dovrebbe ridimensionare il flusso video, così che | |
| 283 le persone non abbiano teste a uovo (es.: 480x480 + 4:3 = 640x480). Comunque quando | |
| 284 si codificano file AVI (DivX), bisogna considerare che le intestazioni degli AVI non salvano | |
| 285 questo valore. Ridimensionare il filmato è disgustoso e spreca tempo, deve esserci | |
| 286 un modo migliore!</P> | |
| 287 | |
| 288 <P>C'è.</P> | |
| 4939 | 289 |
| 8707 | 290 <P>L'MPEG4 ha una caratteristica unica: il flusso video può contenere |
| 291 le proporzioni che gli servono. Si, proprio come i file MPEG1/2 (DVD, SVCD). | |
| 292 Purtroppo, <U>non<U> ci sono lettori video la fuori che supportino questa | |
| 293 possibilità. Eccetto MPlayer.</P> | |
| 294 | |
| 295 <P>Si può usare questa caratteristica solo con il codec <CODE>mpeg4</CODE> di <B>libavcodec</B>. | |
| 296 Ricorda: anche se MPlayer riproducerà correttamente il file creato, | |
| 297 gli altri lettori useranno le proporzioni sbagliate.</P> | |
| 298 | |
| 299 <P>Dovresti considerare seriamente la possibilità di tagliare le bande nere sopra e sotto al filmato. | |
| 300 Vedi la pagina di man per l'utilizzo dei filtri <CODE>cropdetect</CODE> e | |
| 301 <CODE>crop</CODE>.</P> | |
| 302 | |
|
9864
b65bcfaedbe5
Sync with 0_90. All stuff different from 0_90 is missing.
rtognimp
parents:
9644
diff
changeset
|
303 <H4>Utilizzo:</H4> |
| 8707 | 304 |
| 305 <P><CODE>$ mencoder sample-svcd.mpg -ovc lavc -lavcopts | |
|
9644
0fe056bdb135
vop -> vf change, small fixes. The Polish documentation should be checked for correctness.
jonas
parents:
9512
diff
changeset
|
306 vcodec=mpeg4:aspect=16.0/9.0 -vf crop=714:548:0:14 -oac copy -o output.avi</CODE></P> |
| 4867 | 307 |
| 308 </BODY> | |
| 309 </HTML> |
