title: codes to convert from avi to asf
body: <p>No matter what library/SDK to use, I want to convert from avi to asf very quickly (I could even sacrifice some quality of video and audio). I am working on Windows platform (Vista and 2008 Server), better .Net SDK/code, C++ code is also fine. :-)</p>
  
  <p>I learned from the below link, that there could be a very quick way to convert from avi to asf to support streaming better, as mentioned "could convert the video from AVI to ASF format using a simple copy (i.e. the content is the same, but container changes).". My question is after some hours of study and trial various SDK/tools, as a newbie, I do not know how to begin with so I am asking for reference sample code to do this task. :-)</p>
  
  <p>(as this is a different issue, we decide to start a new topic. :-) )</p>
  
  <p><a href="https://stackoverflow.com/questions/743220/streaming-avi-file-issue">Issue with streaming AVI files</a></p>
  
  <p>thanks in advance,
  George</p>
  
  <p>EDIT 1:</p>
  
  <p>I have tried to get the binary of ffmpeg from,</p>
  
  <p><a href="http://ffmpeg.arrozcru.org/autobuilds/ffmpeg-latest-mingw32-static.tar.bz2" rel="nofollow noreferrer">http://ffmpeg.arrozcru.org/autobuilds/ffmpeg-latest-mingw32-static.tar.bz2</a></p>
  
  <p>then run the following command,</p>
  
  <pre><code>C:\software\ffmpeg-latest-mingw32-static\bin&gt;ffmpeg.exe -i test.avi -acodec copy
   -vcodec copy test.asf
  FFmpeg version SVN-r18506, Copyright (c) 2000-2009 Fabrice Bellard, et al.
    configuration: --enable-memalign-hack --prefix=/mingw --cross-prefix=i686-ming
  w32- --cc=ccache-i686-mingw32-gcc --target-os=mingw32 --arch=i686 --cpu=i686 --e
  nable-avisynth --enable-gpl --enable-zlib --enable-bzlib --enable-libgsm --enabl
  e-libfaac --enable-pthreads --enable-libvorbis --enable-libmp3lame --enable-libo
  penjpeg --enable-libtheora --enable-libspeex --enable-libxvid --enable-libfaad -
  -enable-libschroedinger --enable-libx264
    libavutil     50. 3. 0 / 50. 3. 0
    libavcodec    52.25. 0 / 52.25. 0
    libavformat   52.32. 0 / 52.32. 0
    libavdevice   52. 2. 0 / 52. 2. 0
    libswscale     0. 7. 1 /  0. 7. 1
    built on Apr 14 2009 04:04:47, gcc: 4.2.4
  Input #0, avi, from 'test.avi':
    Duration: 00:00:44.86, start: 0.000000, bitrate: 5291 kb/s
      Stream #0.0: Video: msvideo1, rgb555le, 1280x1024, 5 tbr, 5 tbn, 5 tbc
      Stream #0.1: Audio: pcm_s16le, 22050 Hz, mono, s16, 352 kb/s
  Output #0, asf, to 'test.asf':
      Stream #0.0: Video: CRAM / 0x4D415243, rgb555le, 1280x1024, q=2-31, 1k tbn,
  5 tbc
      Stream #0.1: Audio: pcm_s16le, 22050 Hz, mono, s16, 352 kb/s
  Stream mapping:
    Stream #0.0 -&gt; #0.0
    Stream #0.1 -&gt; #0.1
  Press [q] to stop encoding
  frame=  224 fps=222 q=-1.0 Lsize=   29426kB time=44.80 bitrate=5380.7kbits/s
  
  video:26910kB audio:1932kB global headers:0kB muxing overhead 2.023317%
  
  C:\software\ffmpeg-latest-mingw32-static\bin&gt;
  </code></pre>
  
  <p><a href="http://www.microsoft.com/windows/windowsmedia/player/webhelp/default.aspx?&amp;mpver=11.0.6001.7000&amp;id=C00D11B1&amp;contextid=230&amp;originalid=C00D36E6" rel="nofollow noreferrer">http://www.microsoft.com/windows/windowsmedia/player/webhelp/default.aspx?&amp;mpver=11.0.6001.7000&amp;id=C00D11B1&amp;contextid=230&amp;originalid=C00D36E6</a></p>
  
  <p>then have the following error when using Windows Media Player to play it, does anyone have any ideas?</p>
  
  <p><a href="http://www.microsoft.com/windows/windowsmedia/player/webhelp/default.aspx?&amp;mpver=11.0.6001.7000&amp;id=C00D11B1&amp;contextid=230&amp;originalid=C00D36E6" rel="nofollow noreferrer">http://www.microsoft.com/windows/windowsmedia/player/webhelp/default.aspx?&amp;mpver=11.0.6001.7000&amp;id=C00D11B1&amp;contextid=230&amp;originalid=C00D36E6</a></p>