Mercurial > mplayer.hg
comparison DOCS/xml/en/audio.xml @ 13912:c66b1514ce5b
Remove pointless devices section, make video and audio top level sections.
author | diego |
---|---|
date | Thu, 11 Nov 2004 02:09:15 +0000 |
parents | 93fae534ae55 |
children | 7895a1b73828 |
comparison
equal
deleted
inserted
replaced
13911:bb37fefc205b | 13912:c66b1514ce5b |
---|---|
1 <?xml version="1.0" encoding="iso-8859-1"?> | 1 <?xml version="1.0" encoding="iso-8859-1"?> |
2 <!-- $Revision$ --> | 2 <!-- $Revision$ --> |
3 <sect2 id="audio-dev"> | 3 <sect1 id="audio"> |
4 <title>Audio output devices</title> | 4 <title>Audio output devices</title> |
5 <sect3 id="sync"> | 5 <sect2 id="sync"> |
6 <title>Audio/Video synchronisation</title> | 6 <title>Audio/Video synchronisation</title> |
7 | 7 |
8 <para> | 8 <para> |
9 <application>MPlayer</application>'s audio interface is called | 9 <application>MPlayer</application>'s audio interface is called |
10 <emphasis>libao2</emphasis>. It currently contains these drivers: | 10 <emphasis>libao2</emphasis>. It currently contains these drivers: |
110 <command>hdparm -u1 /dev/cdrom</command> (<command>man hdparm</command>). | 110 <command>hdparm -u1 /dev/cdrom</command> (<command>man hdparm</command>). |
111 This is generally beneficial and described in more detail in the | 111 This is generally beneficial and described in more detail in the |
112 <link linkend="drives">CD-ROM</link> section. | 112 <link linkend="drives">CD-ROM</link> section. |
113 </para></listitem> | 113 </para></listitem> |
114 </itemizedlist> | 114 </itemizedlist> |
115 </sect3> | 115 </sect2> |
116 | 116 |
117 <sect3 id="experiences"> | 117 <sect2 id="experiences"> |
118 <title>Soundcard experiences, recommendations</title> | 118 <title>Soundcard experiences, recommendations</title> |
119 <para> | 119 <para> |
120 On Linux, a 2.4.x kernel is highly recommended. Kernel 2.2 is not tested. | 120 On Linux, a 2.4.x kernel is highly recommended. Kernel 2.2 is not tested. |
121 </para> | 121 </para> |
122 | 122 |
329 | 329 |
330 <para> | 330 <para> |
331 Feedback to this document is welcome. Please tell us how | 331 Feedback to this document is welcome. Please tell us how |
332 <application>MPlayer</application> and your sound card(s) worked together. | 332 <application>MPlayer</application> and your sound card(s) worked together. |
333 </para> | 333 </para> |
334 </sect3> | 334 </sect2> |
335 | 335 |
336 <sect3 id="af"> | 336 <sect2 id="af"> |
337 <title>Audio filters</title> | 337 <title>Audio filters</title> |
338 <para> | 338 <para> |
339 The old audio plugins have been superseded by a new audio filter layer. Audio | 339 The old audio plugins have been superseded by a new audio filter layer. Audio |
340 filters are used for changing the properties of the audio data before the | 340 filters are used for changing the properties of the audio data before the |
341 sound reaches the sound card. The activation and deactivation of the filters | 341 sound reaches the sound card. The activation and deactivation of the filters |
489 to rectify the difference. | 489 to rectify the difference. |
490 </para></listitem> | 490 </para></listitem> |
491 </varlistentry> | 491 </varlistentry> |
492 </variablelist> | 492 </variablelist> |
493 | 493 |
494 <sect4 id="af_resample"> | 494 <sect3 id="af_resample"> |
495 <title>Up/Downsampling</title> | 495 <title>Up/Downsampling</title> |
496 | 496 |
497 <para> | 497 <para> |
498 <application>MPlayer</application> fully supports sound up/down-sampling through the | 498 <application>MPlayer</application> fully supports sound up/down-sampling through the |
499 <option>resample</option> filter. It can be used if you | 499 <option>resample</option> filter. It can be used if you |
545 <para>Example: | 545 <para>Example: |
546 <screen>mplayer -af resample=44100:0:0</screen> | 546 <screen>mplayer -af resample=44100:0:0</screen> |
547 would set the output frequency of the resample filter to 44100Hz using exact output | 547 would set the output frequency of the resample filter to 44100Hz using exact output |
548 frequency scaling and linear interpolation. | 548 frequency scaling and linear interpolation. |
549 </para> | 549 </para> |
550 </sect4> | 550 </sect3> |
551 | 551 |
552 <sect4 id="af_channels"> | 552 <sect3 id="af_channels"> |
553 <title>Changing the number of channels</title> | 553 <title>Changing the number of channels</title> |
554 <para> | 554 <para> |
555 The <option>channels</option> filter can be used for adding and removing | 555 The <option>channels</option> filter can be used for adding and removing |
556 channels, it can also be used for routing or copying channels. It is | 556 channels, it can also be used for routing or copying channels. It is |
557 automatically enabled when the output from the audio filter layer differs from | 557 automatically enabled when the output from the audio filter layer differs from |
609 Example 2: | 609 Example 2: |
610 <screen>mplayer -af channels=6:4:0:0:0:1:0:2:0:3 <replaceable>media.avi</replaceable></screen> | 610 <screen>mplayer -af channels=6:4:0:0:0:1:0:2:0:3 <replaceable>media.avi</replaceable></screen> |
611 would change the number of channels to 6 and set up 4 routes that copy | 611 would change the number of channels to 6 and set up 4 routes that copy |
612 channel 0 to channels 0 to 3. Channel 4 and 5 will contain silence. | 612 channel 0 to channels 0 to 3. Channel 4 and 5 will contain silence. |
613 </para> | 613 </para> |
614 </sect4> | 614 </sect3> |
615 | 615 |
616 <sect4 id="af_format"> | 616 <sect3 id="af_format"> |
617 <title>Sample format converter</title> | 617 <title>Sample format converter</title> |
618 <para> | 618 <para> |
619 The <option>format</option> filter converts between different sample formats. It | 619 The <option>format</option> filter converts between different sample formats. It |
620 is automatically enabled when needed by the sound card or another filter. | 620 is automatically enabled when needed by the sound card or another filter. |
621 </para> | 621 </para> |
646 <para> | 646 <para> |
647 Example: | 647 Example: |
648 <screen>mplayer -af format=4:float <replaceable>media.avi</replaceable></screen> | 648 <screen>mplayer -af format=4:float <replaceable>media.avi</replaceable></screen> |
649 would set the output format to 4 bytes per sample floating point data. | 649 would set the output format to 4 bytes per sample floating point data. |
650 </para> | 650 </para> |
651 </sect4> | 651 </sect3> |
652 | 652 |
653 <sect4 id="af_delay"> | 653 <sect3 id="af_delay"> |
654 <title>Delay</title> | 654 <title>Delay</title> |
655 <para> | 655 <para> |
656 The <option>delay</option> filter delays the sound to the loudspeakers such that | 656 The <option>delay</option> filter delays the sound to the loudspeakers such that |
657 the sound from the different channels arrives at the listening position | 657 the sound from the different channels arrives at the listening position |
658 simultaneously. | 658 simultaneously. |
697 <screen>mplayer -af delay=10.5:10.5:0:0:7:0 <replaceable>media.avi</replaceable></screen> | 697 <screen>mplayer -af delay=10.5:10.5:0:0:7:0 <replaceable>media.avi</replaceable></screen> |
698 would delay front left and right by 10.5ms, the two rear channels and the sub | 698 would delay front left and right by 10.5ms, the two rear channels and the sub |
699 by 0ms and the center channel by 7ms. | 699 by 0ms and the center channel by 7ms. |
700 </para> | 700 </para> |
701 | 701 |
702 </sect4> | 702 </sect3> |
703 | 703 |
704 <sect4 id="af_volume"> | 704 <sect3 id="af_volume"> |
705 <title>Software volume control</title> | 705 <title>Software volume control</title> |
706 <para>Software volume control is implemented by the <option>volume</option> | 706 <para>Software volume control is implemented by the <option>volume</option> |
707 audio filter. Use this filter with caution since it can reduce the signal to | 707 audio filter. Use this filter with caution since it can reduce the signal to |
708 noise ratio of the sound. In most cases it is best to set the level for the | 708 noise ratio of the sound. In most cases it is best to set the level for the |
709 PCM sound to max, leave this filter out and control the output level to your | 709 PCM sound to max, leave this filter out and control the output level to your |
745 This filter has a second feature: It measures the overall maximum sound level | 745 This filter has a second feature: It measures the overall maximum sound level |
746 and prints out that level when <application>MPlayer</application> exits. | 746 and prints out that level when <application>MPlayer</application> exits. |
747 This volume estimate can be used for setting the sound level in | 747 This volume estimate can be used for setting the sound level in |
748 <application>MEncoder</application> such that the maximum dynamic range is utilized. | 748 <application>MEncoder</application> such that the maximum dynamic range is utilized. |
749 </para> | 749 </para> |
750 </sect4> | 750 </sect3> |
751 | 751 |
752 <sect4 id="af_equalizer"> | 752 <sect3 id="af_equalizer"> |
753 <title>Equalizer</title> | 753 <title>Equalizer</title> |
754 <para> | 754 <para> |
755 The <option>equalizer</option> filter represents a 10 octave band graphic | 755 The <option>equalizer</option> filter represents a 10 octave band graphic |
756 equalizer, implemented using 10 IIR band pass filters. This means that | 756 equalizer, implemented using 10 IIR band pass filters. This means that |
757 it works regardless of what type of audio is being played back. The center | 757 it works regardless of what type of audio is being played back. The center |
807 Example: | 807 Example: |
808 <screen>mplayer -af equalizer=11:11:10:5:0:-12:0:5:12:12 <replaceable>media.avi</replaceable></screen> | 808 <screen>mplayer -af equalizer=11:11:10:5:0:-12:0:5:12:12 <replaceable>media.avi</replaceable></screen> |
809 would amplify the sound in the upper and lower frequency region while | 809 would amplify the sound in the upper and lower frequency region while |
810 canceling it almost completely around 1kHz. | 810 canceling it almost completely around 1kHz. |
811 </para> | 811 </para> |
812 </sect4> | 812 </sect3> |
813 | 813 |
814 <sect4 id="af_panning"> | 814 <sect3 id="af_panning"> |
815 <title>Panning filter</title> | 815 <title>Panning filter</title> |
816 <para> | 816 <para> |
817 Use the <option>pan</option> filter to mix channels arbitrarily. It is | 817 Use the <option>pan</option> filter to mix channels arbitrarily. It is |
818 basically a combination of the volume control and the channels filter. | 818 basically a combination of the volume control and the channels filter. |
819 There are two major uses for this filter: | 819 There are two major uses for this filter: |
865 <screen>mplayer -af pan=3:1:0:1:0.5:0.5 -channels 3 <replaceable>media.avi</replaceable></screen> | 865 <screen>mplayer -af pan=3:1:0:1:0.5:0.5 -channels 3 <replaceable>media.avi</replaceable></screen> |
866 would give 3 channel output leaving channels 0 and 1 intact, and mix | 866 would give 3 channel output leaving channels 0 and 1 intact, and mix |
867 channels 0 and 1 into output channel 2 (which could be sent to a | 867 channels 0 and 1 into output channel 2 (which could be sent to a |
868 sub-woofer for example). | 868 sub-woofer for example). |
869 </para> | 869 </para> |
870 </sect4> | 870 </sect3> |
871 | 871 |
872 <sect4 id="af_sub"> | 872 <sect3 id="af_sub"> |
873 <title>Sub-woofer</title> | 873 <title>Sub-woofer</title> |
874 <para> | 874 <para> |
875 The <option>sub</option> filter adds a sub woofer channel to the audio | 875 The <option>sub</option> filter adds a sub woofer channel to the audio |
876 stream. The audio data used for creating the sub-woofer channel is an | 876 stream. The audio data used for creating the sub-woofer channel is an |
877 average of the sound in channel 0 and channel 1. The resulting sound is | 877 average of the sound in channel 0 and channel 1. The resulting sound is |
909 Example: | 909 Example: |
910 <screen>mplayer -af sub=100:4 -channels 5 <replaceable>media.avi</replaceable></screen> | 910 <screen>mplayer -af sub=100:4 -channels 5 <replaceable>media.avi</replaceable></screen> |
911 would add a sub-woofer channel with a cutoff frequency of | 911 would add a sub-woofer channel with a cutoff frequency of |
912 100Hz to output channel 4. | 912 100Hz to output channel 4. |
913 </para> | 913 </para> |
914 </sect4> | 914 </sect3> |
915 | 915 |
916 <sect4 id="af_surround"> | 916 <sect3 id="af_surround"> |
917 <title>Surround-sound decoder</title> | 917 <title>Surround-sound decoder</title> |
918 <para> | 918 <para> |
919 Matrix encoded surround sound can be decoded by the <option>surround</option> | 919 Matrix encoded surround sound can be decoded by the <option>surround</option> |
920 filter. Dolby Surround is an example of a matrix encoded format. Many files | 920 filter. Dolby Surround is an example of a matrix encoded format. Many files |
921 with 2 channel audio actually contain matrixed surround sound. To use this | 921 with 2 channel audio actually contain matrixed surround sound. To use this |
942 Example: | 942 Example: |
943 <screen>mplayer -af surround=15 -channels 4 <replaceable>media.avi</replaceable></screen> | 943 <screen>mplayer -af surround=15 -channels 4 <replaceable>media.avi</replaceable></screen> |
944 would add surround sound decoding with 15ms delay for the sound to the | 944 would add surround sound decoding with 15ms delay for the sound to the |
945 rear speakers. | 945 rear speakers. |
946 </para> | 946 </para> |
947 </sect4> | 947 </sect3> |
948 | 948 |
949 <sect4 id="af_export"> | 949 <sect3 id="af_export"> |
950 <title>Audio Exporter</title> | 950 <title>Audio Exporter</title> |
951 <para> | 951 <para> |
952 This audio filter exports the incoming signal to other processes using memory | 952 This audio filter exports the incoming signal to other processes using memory |
953 mapping (<literal>mmap()</literal>). Memory mapped areas contain a header: | 953 mapping (<literal>mmap()</literal>). Memory mapped areas contain a header: |
954 | 954 |
982 <para> | 982 <para> |
983 Example: | 983 Example: |
984 <screen>mplayer -af export=/tmp/mplayer-af_export:1024 <replaceable>media.avi</replaceable></screen> | 984 <screen>mplayer -af export=/tmp/mplayer-af_export:1024 <replaceable>media.avi</replaceable></screen> |
985 would export 1024 samples per channel to <filename>/tmp/mplayer-af_export</filename>. | 985 would export 1024 samples per channel to <filename>/tmp/mplayer-af_export</filename>. |
986 </para> | 986 </para> |
987 </sect4> | 987 </sect3> |
988 | 988 |
989 <sect4 id="af_extrastereo"> | 989 <sect3 id="af_extrastereo"> |
990 <title>Extrastereo</title> | 990 <title>Extrastereo</title> |
991 | 991 |
992 <para> | 992 <para> |
993 This audio filter (linearly) increases the difference between left and | 993 This audio filter (linearly) increases the difference between left and |
994 right channels (like the <application>XMMS</application> extrastereo | 994 right channels (like the <application>XMMS</application> extrastereo |
1013 <screen> | 1013 <screen> |
1014 mplayer -af extrastereo <replaceable>media.avi</replaceable> | 1014 mplayer -af extrastereo <replaceable>media.avi</replaceable> |
1015 mplayer -af extrastereo=3.45 <replaceable>media.avi</replaceable><!-- | 1015 mplayer -af extrastereo=3.45 <replaceable>media.avi</replaceable><!-- |
1016 --></screen> | 1016 --></screen> |
1017 </para> | 1017 </para> |
1018 </sect4> | 1018 </sect3> |
1019 | 1019 |
1020 <sect4 id="af_volnorm"> | 1020 <sect3 id="af_volnorm"> |
1021 <title>Volume normalizer</title> | 1021 <title>Volume normalizer</title> |
1022 | 1022 |
1023 <para> | 1023 <para> |
1024 This audio filter maximizes the volume without distorting the sound. | 1024 This audio filter maximizes the volume without distorting the sound. |
1025 </para> | 1025 </para> |
1026 | 1026 |
1027 <para> | 1027 <para> |
1028 Usage: | 1028 Usage: |
1029 <screen>mplayer -af volnorm <replaceable>media.avi</replaceable></screen> | 1029 <screen>mplayer -af volnorm <replaceable>media.avi</replaceable></screen> |
1030 </para> | 1030 </para> |
1031 </sect4> | 1031 </sect3> |
1032 | 1032 |
1033 </sect3> | 1033 </sect2> |
1034 | 1034 |
1035 <sect3 id="audio-plugins"> | 1035 <sect2 id="audio-plugins"> |
1036 <title>Audio plugins (deprecated)</title> | 1036 <title>Audio plugins (deprecated)</title> |
1037 <note><para><emphasis role="bold">Audio plugins have been deprecated by audio filters and will | 1037 <note><para><emphasis role="bold">Audio plugins have been deprecated by audio filters and will |
1038 be removed soon.</emphasis></para></note> | 1038 be removed soon.</emphasis></para></note> |
1039 | 1039 |
1040 <para> | 1040 <para> |
1068 Currently audio plugins can not be used in | 1068 Currently audio plugins can not be used in |
1069 <application>MEncoder</application>. | 1069 <application>MEncoder</application>. |
1070 </para> | 1070 </para> |
1071 | 1071 |
1072 | 1072 |
1073 <sect4 id="updn-sampling"> | 1073 <sect3 id="updn-sampling"> |
1074 <title>Up/Downsampling</title> | 1074 <title>Up/Downsampling</title> |
1075 | 1075 |
1076 <para> | 1076 <para> |
1077 <application>MPlayer</application> fully supports up/downsampling of the sound. This plugin can be | 1077 <application>MPlayer</application> fully supports up/downsampling of the sound. This plugin can be |
1078 used if you have a fixed frequency sound card or if you are stuck with an | 1078 used if you have a fixed frequency sound card or if you are stuck with an |
1098 The output frequency should not be scaled up from the default value. | 1098 The output frequency should not be scaled up from the default value. |
1099 Scaling up will cause the audio and video streams to be played in slow | 1099 Scaling up will cause the audio and video streams to be played in slow |
1100 motion in addition to audio distortion. | 1100 motion in addition to audio distortion. |
1101 </para> | 1101 </para> |
1102 </note> | 1102 </note> |
1103 </sect4> | 1103 </sect3> |
1104 | 1104 |
1105 | 1105 |
1106 <sect4 id="surround-decode"> | 1106 <sect3 id="surround-decode"> |
1107 <title>Surround Sound decoding</title> | 1107 <title>Surround Sound decoding</title> |
1108 | 1108 |
1109 <para> | 1109 <para> |
1110 <application>MPlayer</application> has an audio plugin that can decode | 1110 <application>MPlayer</application> has an audio plugin that can decode |
1111 matrix encoded surround sound. Dolby Surround is an example of a matrix | 1111 matrix encoded surround sound. Dolby Surround is an example of a matrix |
1116 | 1116 |
1117 <para> | 1117 <para> |
1118 Usage: | 1118 Usage: |
1119 <screen>mplayer <replaceable>media.avi</replaceable> -aop list=surround</screen> | 1119 <screen>mplayer <replaceable>media.avi</replaceable> -aop list=surround</screen> |
1120 </para> | 1120 </para> |
1121 </sect4> | 1121 </sect3> |
1122 | 1122 |
1123 | 1123 |
1124 <sect4 id="sample-format-conv"> | 1124 <sect3 id="sample-format-conv"> |
1125 <title>Sample format converter</title> | 1125 <title>Sample format converter</title> |
1126 | 1126 |
1127 <para> | 1127 <para> |
1128 If your sound card driver does not support signed 16-bit int data type, | 1128 If your sound card driver does not support signed 16-bit int data type, |
1129 this plugin can be used to change the format to one which your sound card | 1129 this plugin can be used to change the format to one which your sound card |
1141 mplayer <replaceable>media.avi</replaceable> -aop list=format:format=<replaceable>outfmt</replaceable></screen> | 1141 mplayer <replaceable>media.avi</replaceable> -aop list=format:format=<replaceable>outfmt</replaceable></screen> |
1142 | 1142 |
1143 where <literal><replaceable>outfmt</replaceable></literal> is the | 1143 where <literal><replaceable>outfmt</replaceable></literal> is the |
1144 required output format. | 1144 required output format. |
1145 </para> | 1145 </para> |
1146 </sect4> | 1146 </sect3> |
1147 | 1147 |
1148 | 1148 |
1149 <sect4 id="audio-delay"> | 1149 <sect3 id="audio-delay"> |
1150 <title>Delay</title> | 1150 <title>Delay</title> |
1151 <para> | 1151 <para> |
1152 This plugin delays the sound and is intended as an example of how to | 1152 This plugin delays the sound and is intended as an example of how to |
1153 develop new plugins. It can not be used for anything useful from a users | 1153 develop new plugins. It can not be used for anything useful from a users |
1154 perspective and is mentioned here for the sake of completeness only. Do not | 1154 perspective and is mentioned here for the sake of completeness only. Do not |
1155 use this plugin unless you are a developer. | 1155 use this plugin unless you are a developer. |
1156 </para> | 1156 </para> |
1157 </sect4> | 1157 </sect3> |
1158 | 1158 |
1159 | 1159 |
1160 <sect4 id="sw-volume"> | 1160 <sect3 id="sw-volume"> |
1161 <title>Software volume control</title> | 1161 <title>Software volume control</title> |
1162 | 1162 |
1163 <para> | 1163 <para> |
1164 This plugin is a software replacement for the volume control, and can be | 1164 This plugin is a software replacement for the volume control, and can be |
1165 used on machines with a broken mixer device. It can also be used if one | 1165 used on machines with a broken mixer device. It can also be used if one |
1193 <para> | 1193 <para> |
1194 Usage: | 1194 Usage: |
1195 <screen> | 1195 <screen> |
1196 mplayer <replaceable>media.avi</replaceable> -aop list=volume:softclip</screen> | 1196 mplayer <replaceable>media.avi</replaceable> -aop list=volume:softclip</screen> |
1197 </para> | 1197 </para> |
1198 </sect4> | 1198 </sect3> |
1199 | 1199 |
1200 <sect4 id="extrastereo"> | 1200 <sect3 id="extrastereo"> |
1201 <title>Extrastereo</title> | 1201 <title>Extrastereo</title> |
1202 | 1202 |
1203 <para> | 1203 <para> |
1204 This plugin (linearly) increases the difference between left and right | 1204 This plugin (linearly) increases the difference between left and right |
1205 channels (like the <application>XMMS</application> extrastereo plugin) which gives some | 1205 channels (like the <application>XMMS</application> extrastereo plugin) which gives some |
1217 defaults to 2.5. If you set it to <literal>0.0</literal>, you will have | 1217 defaults to 2.5. If you set it to <literal>0.0</literal>, you will have |
1218 mono sound (average of both channels). If you set it to | 1218 mono sound (average of both channels). If you set it to |
1219 <literal>1.0</literal>, sound will be unchanged, if you set it to | 1219 <literal>1.0</literal>, sound will be unchanged, if you set it to |
1220 <literal>-1.0</literal>, left and right channels will be swapped. | 1220 <literal>-1.0</literal>, left and right channels will be swapped. |
1221 </para> | 1221 </para> |
1222 </sect4> | 1222 </sect3> |
1223 | 1223 |
1224 | 1224 |
1225 <sect4 id="volnorm"> | 1225 <sect3 id="volnorm"> |
1226 <title>Volume normalizer</title> | 1226 <title>Volume normalizer</title> |
1227 | 1227 |
1228 <para> | 1228 <para> |
1229 This plugin maximizes the volume without distorting the sound. | 1229 This plugin maximizes the volume without distorting the sound. |
1230 </para> | 1230 </para> |
1231 | 1231 |
1232 <para> | 1232 <para> |
1233 Usage: | 1233 Usage: |
1234 <screen>mplayer <replaceable>media.avi</replaceable> -aop list=volnorm</screen> | 1234 <screen>mplayer <replaceable>media.avi</replaceable> -aop list=volnorm</screen> |
1235 </para> | 1235 </para> |
1236 </sect4> | |
1237 </sect3> | 1236 </sect3> |
1238 </sect2> | 1237 </sect2> |
1238 </sect1> |