mpeg_decoders.html

来自「MPlayer-mingw32-1.0rc2.zip 经典播放器源码」· HTML 代码 · 共 270 行 · 第 1/2 页

HTML
270
字号
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>8.18.聽MPEG decoders</title><link rel="stylesheet" href="default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="MPlayer - The Movie Player"><link rel="up" href="video.html" title="Chapter聽8.聽Video output devices"><link rel="prev" href="dfbmga.html" title="8.17.聽DirectFB/Matrox (dfbmga)"><link rel="next" href="other.html" title="8.19.聽Other visualization hardware"><link rel="preface" href="howtoread.html" title="How to read this documentation"><link rel="chapter" href="intro.html" title="Chapter聽1.聽Introduction"><link rel="chapter" href="install.html" title="Chapter聽2.聽Installation"><link rel="chapter" href="usage.html" title="Chapter聽3.聽Usage"><link rel="chapter" href="cd-dvd.html" title="Chapter聽4.聽CD/DVD usage"><link rel="chapter" href="faq.html" title="Chapter聽5.聽Frequently Asked Questions"><link rel="chapter" href="containers.html" title="Chapter聽6.聽Containers"><link rel="chapter" href="codecs.html" title="Chapter聽7.聽Codecs"><link rel="chapter" href="video.html" title="Chapter聽8.聽Video output devices"><link rel="chapter" href="audio.html" title="Chapter聽9.聽Audio output devices"><link rel="chapter" href="tv.html" title="Chapter聽10.聽TV"><link rel="chapter" href="radio.html" title="Chapter聽11.聽Radio"><link rel="chapter" href="ports.html" title="Chapter聽12.聽Ports"><link rel="chapter" href="mencoder.html" title="Chapter聽13.聽Basic usage of MEncoder"><link rel="chapter" href="encoding-guide.html" title="Chapter聽14.聽Encoding with MEncoder"><link rel="appendix" href="bugreports.html" title="Appendix聽A.聽How to report bugs"><link rel="appendix" href="bugs.html" title="Appendix聽B.聽Known bugs"><link rel="appendix" href="skin.html" title="Appendix聽C.聽MPlayer skin format"><link rel="appendix" href="history.html" title="Appendix聽D.聽History"><link rel="subsection" href="mpeg_decoders.html#dvb" title="8.18.1.聽DVB output and input"><link rel="subsection" href="mpeg_decoders.html#dxr2" title="8.18.2.聽DXR2"><link rel="subsection" href="mpeg_decoders.html#dxr3" title="8.18.3.聽DXR3/Hollywood+"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">8.18.聽MPEG decoders</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="dfbmga.html">Prev</a>聽</td><th width="60%" align="center">Chapter聽8.聽Video output devices</th><td width="20%" align="right">聽<a accesskey="n" href="other.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="mpeg_decoders"></a>8.18.聽MPEG decoders</h2></div></div></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="dvb"></a>8.18.1.聽DVB output and input</h3></div></div></div><p>
<span class="application">MPlayer</span> supports cards with the Siemens DVB chipset
from vendors like Siemens, Technotrend, Galaxis or Hauppauge. The latest DVB
drivers are available from the
<a class="ulink" href="http://www.linuxtv.org" target="_top">Linux TV site</a>.
If you want to do software transcoding you should have at least a 1GHz CPU.
</p><p>
Configure should detect your DVB card. If it did not, force detection with
</p><pre class="screen">./configure --enable-dvb</pre><p>
If you have ost headers at a non-standard path, set the path with
</p><pre class="screen">
./configure --with-extraincdir=<em class="replaceable"><code>DVB source directory</code></em>/ost/include
</pre><p>
Then compile and install as usual.</p><p><b>USAGE.聽</b>
Hardware decoding of streams containing MPEG-1/2 video and/or MPEG audio can be done with this
command:
</p><pre class="screen">
mplayer -ao mpegpes -vo mpegpes <em class="replaceable"><code>file.mpg|vob</code></em>
</pre><p>
</p><p>
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:
</p><pre class="screen">
mplayer -ao mpegpes -vo mpegpes <em class="replaceable"><code>yourfile.ext</code></em>
mplayer -ao mpegpes -vo mpegpes -vf expand <em class="replaceable"><code>yourfile.ext</code></em>
</pre><p>
Note that DVB cards only support heights 288 and 576 for PAL or 240 and 480 for
NTSC. You <span class="bold"><strong>must</strong></span> rescale for other heights by
adding <tt class="option">scale=width:height</tt> with the width and height you want
to the <tt class="option">-vf</tt> 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:
</p><pre class="screen">mplayer -ao mpegpes -vo mpegpes -vf scale=512:576</pre><p>
</p><p>
If you have a widescreen movie and you do not want to scale it to full height,
you can use the <tt class="option">expand=w:h</tt> filter to add black bands. To view a
640x384 MPEG-4 (DivX), try:
</p><pre class="screen">
mplayer -ao mpegpes -vo mpegpes -vf expand=640:576 <em class="replaceable"><code>file.avi</code></em>
</pre><p>
</p><p>
If your CPU is too slow for a full size 720x576 MPEG-4 (DivX), try downscaling:
</p><pre class="screen">
mplayer -ao mpegpes -vo mpegpes -vf scale=352:576 <em class="replaceable"><code>file.avi</code></em>
</pre><p>
</p><p>If speed does not improve, try vertical downscaling, too:
</p><pre class="screen">
mplayer -ao mpegpes -vo mpegpes -vf scale=352:288 <em class="replaceable"><code>file.avi</code></em>
</pre><p>
</p><p>
For OSD and subtitles use the OSD feature of the expand filter. So, instead of
<tt class="option">expand=w:h</tt> or <tt class="option">expand=w:h:x:y</tt>, use
<tt class="option">expand=w:h:x:y:1</tt> (the 5th parameter <tt class="option">:1</tt>
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
<tt class="option">-subpos &lt;0-100&gt;</tt>
option to adjust this (<tt class="option">-subpos 80</tt> is a good choice).
</p><p>
In order to play non-25fps movies on a PAL TV or with a slow CPU, add the
<tt class="option">-framedrop</tt> option.
</p><p>
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:
</p><pre class="screen">
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
</pre><p>
</p><p><b>Digital TV (DVB input module).聽</b>You can use your DVB card for watching Digital TV.</p><p>
You should have the programs <span class="command"><strong>scan</strong></span> and
<span class="command"><strong>szap/tzap/czap/azap</strong></span> installed; they are all included in
the drivers package.
</p><p>
Verify that your drivers are working properly with a program such as
<a class="ulink" href="http://sf.net/projects/dvbtools/" target="_top"><span class="command"><strong>dvbstream</strong></span></a>
(that is the base of the DVB input module).
</p><p>
Now you should compile a <tt class="filename">~/.mplayer/channels.conf</tt>
file, with the syntax accepted by <span class="command"><strong>szap/tzap/czap/azap</strong></span>, or
have <span class="command"><strong>scan</strong></span> compile it for you.
</p><p>
If you have more than one card type (e.g. Satellitar, Terrestrial, Cable and ATSC)
you can save your channels files as
<tt class="filename">~/.mplayer/channels.conf.sat</tt>,
<tt class="filename">~/.mplayer/channels.conf.ter</tt>,
<tt class="filename">~/.mplayer/channels.conf.cbl</tt>,
and <tt class="filename">~/.mplayer/channels.conf.atsc</tt>,
respectively, so as to implicitly hint <span class="application">MPlayer</span>
to use these files rather than <tt class="filename">~/.mplayer/channels.conf</tt>,
and you only need to specify which card to use.
</p><p>
Make sure that you have <span class="emphasis"><em>only</em></span> Free to Air
channels in your <tt class="filename">channels.conf</tt> file, or
<span class="application">MPlayer</span> will wait for an unencrypted transmission.
</p><p>
In your audio and video fields you can use an extended syntax:
<tt class="option">...:pid[+pid]:...</tt> (for a maximum of 6 pids each);
in this case <span class="application">MPlayer</span> 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.
</p><p>
If <span class="application">MPlayer</span> complains frequently about
</p><pre class="screen">Too many video/audio packets in the buffer</pre><p> or
if you notice a growing desynchronization between audio and
video try to use the libavformat MPEG-TS demuxer by adding
<tt class="option">-demuxer lavf -lavfdopts probesize=128</tt>
to your command line.
</p><p>
To show the first of the channels present in your list, run
</p><pre class="screen">mplayer dvb://</pre><p>
</p><p>
If you want to watch a specific channel, such as R1, run
</p><pre class="screen">mplayer dvb://<em class="replaceable"><code>R1</code></em></pre><p>
</p><p>
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:
</p><pre class="screen">mplayer dvb://<em class="replaceable"><code>2@R1</code></em></pre><p>
</p><p>
To change channels press the <span class="keycap"><b>h</b></span> (next) and
<span class="keycap"><b>k</b></span> (previous) keys, or use the
<a class="link" href="fonts-osd.html#osdmenu" title="2.4.3.聽OSD menu">OSD menu</a>.
</p><p>
If your <tt class="filename">~/.mplayer/menu.conf</tt> contains a
<code class="literal">&lt;dvbsel&gt;</code> entry, such as the one in the example
file <tt class="filename">etc/dvb-menu.conf</tt> (that you can use to overwrite

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?