Converting ASF files

Hi experts, how can I convert the ASF formats used by WMP to avi or mpeg
Who is Participating?
This might help..


It seems lots of people want to know how to convert from ASF to an MPEG-1 system movie. I've found one method of doing it, and I'll warn you it's not for the faint of heart. While this recipe should work for most movies, it's definitely not bullet-proof. You need :Some sort of MPEG-1 encoding software or hardware Microsoft DirectX Media SDK.

The trick of course lies in getting the ASF file into virtually any other format (preferably AVI) since you cannot open an ASF in something like Premiere.

After installing the DirectX Media SDK, you'll need to run a program called graphedt.exe, which is in the bin folder. Graph Edit is a program which allows you to visually piece together a functional chain of DirectX components. It typically allows you to see what components are used and how the data flows when rendering a particular media type. So, we'll start with that first. Click on File->Render Media File, and select your ASF movie.

You'll see a graph appear on the screen, showing the data path. If you click the play icon in the toolbar now, you should see a window appear playing the ASF file. You need to rearrange the end of the play chain to render into an AVI file instead of to that window. I happen to have an MPEG-4 encoded movie, so my data flows from the file out to a video and an audio stream, and a script interpreter. The video stream goes through an ICM handler, through the MPEG-4 Decompressor codec, and out to the video renderer. The audio stream goes through an ACM handler, through an ACM wrapper, and out to the sound device.

Click on the video renderer and hit the delete key. Do the same for the audio renderer. At this point you have raw decoded video and audio going to nowhere. From my experience in keeping the audio and video in sync, you'll want to pair up that decoder with the encoder. So, select Graph->Insert Filters. Expand the Video Compressors tab, and add the appropriate encoder. I added an MPEG-4 V2 encoder.

Collapse the Video Compressors tree, and expand the DirectShow filters tab. Add 'AVI Mux' and 'File Writer'. After adding File Writer, it will prompt you for the name of the movie you want to create. Now we connect the dots. Drag a line from the decompressor out to the compressor in. ( You may need to move the boxes around in order to be able to complete the link. It should auto-arrange afterwards. ) Next draw a link between the ACM wrapper and the AVI Mux Input 01 in. Draw a link between the video compressor out to AVI Mux Input 02. Finally, draw a link between the AVI Mux out to the File Writer. If you want to adjust properties of each element, right click on the box and select properties.

Finally, click the play icon in the toolbar and your ASF will be transformed into an AVI. It will take the duration of the movie to transform it into an AVI, since it's essentially "playing" into a file. If you want to test a small section, just click the stop icon and you'll have an AVI you can start working with.

From here it should be obvious what to do... take your new AVI, and run it through an MPEG encoder. Someone told me that when using Premiere you need to change the extension of your file from .AVI to MPG, because for whatever reason Premiere crashed. I can't verify that, but it's something to think about.

I recommend running a test on a couple minutes of the file you're trying to convert first - especially make sure the audio and video are in sync. Trying to circumvent the decode/encode process above ( and piping the raw encoded data straight to the file ) once resulted with a movie with wildly out of sync audio/video.

If you're trying to create a VideoCD, remember to export the video in 352x240 mpeg-1 system format. Audio I believe is interleaved after every frame. ( ?? )

Hope this helps!-----New info:
Drawing a line from the ASF ICM Handler to Input 2 on AVI Mux (and deleting the Microsoft MPEG-4 Video Compressor) means that your video will not have to be recompressed.


What about for Macintosh users?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.