March 13, 2015

Extracting Audio from a Transport Stream File (.ts to .mp3, .ac3, or .m1a)

Here is a way to extract audio from a .ts file (transport stream) as an .mp3. We’re going to outline how to do this using the programs, MPEG Streamclip and VLC Media Player. Using these we’ll show you how to extract an audio file from a .ts video container file and how to encode the file to be just audio, stripping out the video.

First off we’re writing about using VLC Media Player to export an .mp3 file, since that was specifically what most search enquiries were curious about accomplishing. So, you’ll want to open the .ts file in VLC Media Player. Go to the File drop down menu and select the Streaming/Transcoding Wizard. In the Streaming/Transcoding Wizard, select to Transcode/Save the file. Click Next. On the Choose Input page, choose your input stream. Since you just opened the video in VLC, you can choose it from the existing playlist items (instead of browsing your computer to find the file). Click next.

The next page is the Transcode page. Check both the Video and Audio sections. In the video section, select the codec called Dummy. Don’t worry about the bitrate for the video section, as selecting Dummy is just to allow you to export only the audio. In the Audio section, select MP3 for your codec. You can choose a variety of bitrates, but I don’t recommend choosing a bitrate higher than the bitrate of the audio stream in the .ts container file (you can’t improve the audio quality by selecting a higher bitrate). Click next.

The next page is the Encapsulation format page. On this page, you’re going to choose RAW. Click next.

This brings you to the “Additional transcode options” page. Choose where you want to save the file. You’ll see the destination of your file pop up in the dialogue box next to the Choose button. This dialogue box will have written in it something like “/Users/YOURUSERNAME/Desktop/Audio.raw”.

In that dialogue box, change the extension from .raw to .mp3. So your new save location is, “/Users/YOURUSERNAME/Desktop/Audio.mp3”. Click the next button at the bottom of the page.

This will bring you to the Summary page. Click the Finish button at the bottom of the page. Go to the location you saved the audio and play it back in iTunes or VLC or some other media player to make sure it works, and then revel in the glory of having succesfully converted your .ts file with video to a .mp3 audio only file.

Now, let’s talk about using MPEG Streamclip to export an audio file from a .ts container file. It’s important to note that a .ts file is just a container file. Encapsulated inside the .ts file you’ll find an audio stream file and a video stream file. If the audio stream file is already in the format you need to use and that format happens to be AIFF, M1A or AC3, then you can just demux the file. If you need to find out what kind of audio you have in the .ts file, then open the file in MPEG Streamclip, go the the File drop down menu, and select Show Stream Info.  Now assuming the audio is in the correct format, then go to the file drop down menu and find Demux. In the Demux submenu, you’ll find a wide variety of ways to demux your file. Select Demux to AIFF, Demux to M1A, or Demux to AC3 depending on which file type you have (MPEG Streamclip will allow you to demux to one of those file types even if it isn’t in the container file, but that’s more of a conversion/encoding job than it is demuxing then).

Once you’ve clicked on one of those options, a menu will appear that asks you to name the new file and to select where you want to save it. Once you’ve named the file and selected a location to save the file, then click the Save button. After the file has finished saving, locate the file and open it in iTunes or another media player and check to make sure it sounds right, then give yourself a high five and pop up some carbonated grape juice to celebrate.

If you need a different file type, you can go to the File drop down menu and select Export Audio. This will give you the option to export the audio as an AIFF, MP4 AAC, or MP2 file. You can also go to the File drop down menu and select Export to Other Formats.

On the page that appears, in the Format selection box, you can choose the audio formats AIFF or Wave.

Once you have selected the format you need, click the OK button and in the next page that appears you’ll have to select a destination to save the file and a name for the file. After you’ve made those decisions, click the Save button. Once the conversion is finished, locate your audio file and play it back to make sure it works correctly, then lean back in your office chair with a self satisfied smirk on your face, reveling in your accomplishments.

comments +

Leave a Reply

Your email address will not be published. Required fields are marked *