[xiph-commits] r14093 - trunk/ezstream/examples

moritz at svn.xiph.org moritz at svn.xiph.org
Sun Nov 4 05:09:09 PST 2007


Author: moritz
Date: 2007-11-04 05:09:08 -0800 (Sun, 04 Nov 2007)
New Revision: 14093

Modified:
   trunk/ezstream/examples/ezstream_reencoding_example_mp3.xml
   trunk/ezstream/examples/ezstream_reencoding_example_theora.xml
   trunk/ezstream/examples/ezstream_reencoding_example_vorbis.xml
Log:
Improve the reencoding examples; more usable defaults and add more options
to create a more well-defined stream of raw samples.


Modified: trunk/ezstream/examples/ezstream_reencoding_example_mp3.xml
===================================================================
--- trunk/ezstream/examples/ezstream_reencoding_example_mp3.xml	2007-11-03 22:02:06 UTC (rev 14092)
+++ trunk/ezstream/examples/ezstream_reencoding_example_mp3.xml	2007-11-04 13:09:08 UTC (rev 14093)
@@ -29,9 +29,9 @@
     <svrinfourl>http://www.oddsock.org</svrinfourl>
     <svrinfogenre>RockNRoll</svrinfogenre>
     <svrinfodescription>This is a stream description</svrinfodescription>
-    <svrinfobitrate>56</svrinfobitrate>
-    <svrinfochannels>1</svrinfochannels>
-    <svrinfosamplerate>220500</svrinfosamplerate>
+    <svrinfobitrate>128</svrinfobitrate>
+    <svrinfochannels>2</svrinfochannels>
+    <svrinfosamplerate>44100</svrinfosamplerate>
     <!--
       Prohibit the server to advertise the stream on a public YP directory:
      -->
@@ -48,7 +48,14 @@
            the appropriate command line parameters of the encoders in the
            <encode /> elements.
 
-           New encdec sections can be added for new input/output formats.
+           New <encdec /> sections can be added for new input/output formats.
+
+           Distorted audio, or audio playing at the wrong speed/pitch may be
+           caused by conflicting sample rates in the various <decode /> and
+           <encode /> sections, byte order (endianness) issues and mono input
+           files. See the documentation on the various de-/encoders for
+           the options that need to be used to create a consistent stream of
+           raw samples.
          -->
         <encdec>
             <!-- Support for FLAC decoding: -->
@@ -63,8 +70,9 @@
              -->
             <format>MP3</format>
             <match>.mp3</match>
-            <decode>madplay -o raw:- "@T@"</decode>
-            <encode>lame -r -x -b 56 -s 44.1 --resample 22.05 -a - -</encode>
+            <!-- Note: madplay uses host byte order for raw samples. -->
+            <decode>madplay -b 16 -R 44100 -S -o raw:- "@T@"</decode>
+            <encode>lame --preset cbr 128 -r -x -s 44.1 --bitwidth 16 - -</encode>
         </encdec>
         <encdec>
             <!--
@@ -72,8 +80,8 @@
              -->
             <format>VORBIS</format>
             <match>.ogg</match>
-            <decode>oggdec -R -o - "@T@"</decode>
-            <encode>oggenc -r -q 1.5 --resample=44100 -t "@M@" -</encode>
+            <decode>oggdec -R -b 16 -e 0 -s 1 -o - "@T@"</decode>
+            <encode>oggenc -r -B 16 -C 2 -R 44100 --raw-endianness 0 -q 1.5 -t "@M@" -</encode>
         </encdec>
     </reencode>
 </ezstream>

Modified: trunk/ezstream/examples/ezstream_reencoding_example_theora.xml
===================================================================
--- trunk/ezstream/examples/ezstream_reencoding_example_theora.xml	2007-11-03 22:02:06 UTC (rev 14092)
+++ trunk/ezstream/examples/ezstream_reencoding_example_theora.xml	2007-11-04 13:09:08 UTC (rev 14093)
@@ -49,7 +49,14 @@
            the appropriate command line parameters of the encoders in the
            <encode /> elements.
 
-           New encdec sections can be added for new input/output formats.
+           New <encdec /> sections can be added for new input/output formats.
+
+           Distorted audio, or audio playing at the wrong speed/pitch may be
+           caused by conflicting sample rates in the various <decode /> and
+           <encode /> sections, byte order (endianness) issues and mono input
+           files. See the documentation on the various de-/encoders for
+           the options that need to be used to create a consistent stream of
+           raw samples.
          -->
         <encdec>
             <!--

Modified: trunk/ezstream/examples/ezstream_reencoding_example_vorbis.xml
===================================================================
--- trunk/ezstream/examples/ezstream_reencoding_example_vorbis.xml	2007-11-03 22:02:06 UTC (rev 14092)
+++ trunk/ezstream/examples/ezstream_reencoding_example_vorbis.xml	2007-11-04 13:09:08 UTC (rev 14093)
@@ -49,7 +49,14 @@
            the appropriate command line parameters of the encoders in the
            <encode /> elements.
 
-           New encdec sections can be added for new input/output formats.
+           New <encdec /> sections can be added for new input/output formats.
+
+           Distorted audio, or audio playing at the wrong speed/pitch may be
+           caused by conflicting sample rates in the various <decode /> and
+           <encode /> sections, byte order (endianness) issues and mono input
+           files. See the documentation on the various de-/encoders for
+           the options that need to be used to create a consistent stream of
+           raw samples.
          -->
         <encdec>
             <!-- Support for FLAC decoding: -->
@@ -64,8 +71,9 @@
              -->
             <format>MP3</format>
             <match>.mp3</match>
-            <decode>madplay -o raw:- "@T@"</decode>
-            <encode>lame -r -x -b 56 -s 44.1 --resample 22.05 -a - -</encode>
+            <!-- Note: madplay uses host byte order for raw samples. -->
+            <decode>madplay -b 16 -R 44100 -S -o raw:- "@T@"</decode>
+            <encode>lame --preset cbr 128 -r -x -s 44.1 --bitwidth 16 - -</encode>
         </encdec>
         <encdec>
             <!--
@@ -73,8 +81,8 @@
              -->
             <format>VORBIS</format>
             <match>.ogg</match>
-            <decode>oggdec -R -o - "@T@"</decode>
-            <encode>oggenc -r -q 1.5 --resample=44100 -t "@M@" -</encode>
+            <decode>oggdec -R -b 16 -e 0 -s 1 -o - "@T@"</decode>
+            <encode>oggenc -r -B 16 -C 2 -R 44100 --raw-endianness 0 -q 1.5 -t "@M@" -</encode>
         </encdec>
     </reencode>
 </ezstream>



More information about the commits mailing list