View Single Post
Old January 8th, 2010, 01:59 PM   #8
Denaniel
Administrator
 
Denaniel's Avatar
 
Join Date: Dec 2006
Location: Rocinante Ops Deck
Posts: 13,914
Thanks: 114,756
Thanked 425,697 Times in 13,440 Posts
Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+
Default

Louiscar, I will address some of your points in my next post, but I have to get this other thing dealt with right away, because it affects a bunch of people who downloaded one of my latest vids.


How to extract and remux MP4 files

I recently posted a new rip of Laura's Toys (post is here) and after posting I found out that the 2nd audio track (director's commentary) was somehow cut short by 32 minutes. So I re-ripped the audio track from the DVD, converted it to AAC audio, and remuxed it with the original video and 1st audio track (original soundtrack) to create a new MP4 file. Problem is, a lot of people already downloaded the original file, which plays and sounds fine, except that the commentary is incomplete. There's no reason they should have to redownload the entire vid (1.22 GB) just for an optional 48 MB audio track.

So I'm going to use this opportunity to explain how to extract the video and audio streams from my original LaurasToys.mp4 and then remux the video and 1st audio track with the newly ripped commentary audio. This same method can be used to add additional language tracks, subtitles, chapters and other media files to MP4 files.

Download Yamb

We'll use a cool little piece of freeware called Yamb, which is a GUI for mp4box, the versatile tool for making, editing and extracting mp4 files. The program is free and only 6.8 MB (checked clean for viruses and malware). The download page and direct download link are here:

http://yamb.unite-video.com/download.html
http://yamb.unite-video.com/Yamb-2.1...eta2_setup.exe


Extracting the video and audio streams

On the left side of Yamb, click on Editing, then double click "Click to extract streams from AVI/MP4/MOV/TS files"



Under Input, navigate to LaurasToys.mp4

Under Content you should now see three files listed, one video (AVC) and two audio (AAC). Tick the radio button "Extract all streams to raw format"

The Output location by default is the same folder that LaurasToys.mp4 is already in.

Click Next



Wait a few minutes while the tracks are extracted





When extraction is complete, click the Back button twice to get back to the Main window


Muxing audio and video files

On left side, click on Creation

Double click "Click to create an MP4 file with multiple audio, video, subtitle and chapters steams"



Click Add, and choose LaurasToys_track1.h264 [this is the video track]

Click Add again, and choose LaurasToys_track2.aac [this is the main audio track]

Click Add again, and choose commentary.mp4 [this is the commentary audio track]

The first two files were created by Yamb and should be in the same folder where LaurasToys.mp4 is located. The third, commentary.mp4, you should have downloaded from rapidshare -- the link is in my original thread here

In the Output box, give the new file a different name, e.g. LaurasToys_remux.mp4



Optional: If you want to specify the language and title of the two audio tracks, here's how.

Click on LaurasToys_track2.aac to highlight it, then click Properties

In the Properties dialog, click the Language dropdown box and select English

In the Track Name box, you can type in whatever you want, e.g. Original Soundtrack (just to distinguish this track from the commentary track)

Click Ok



Do the same for the Commentary track, but Track Name = Commentary

Click Next



It might take awhile before you see any progress, so be patient. Notice in the sample above it took three minutes to "begin importing" the first stream. It seems to take mp4box a few minutes to prepare the files. Eventually, you'll see "Importing AVC Stream..." in the list of Events, and the green progress bar will start to move.



This muxing took six and a half minutes to complete. Yours might be more or less, depending on your processor, etc.

The new file has the original video and 1st audio tracks, plus the new secondary audio (commentary) which is now complete.

My copy of Yamb always gets stuck at 99% and won't finish, but the files are complete regardless. I have to use Task Manager to "End Task" because Yamb won't finish and it won't close on its own. Minor hassle but the program works fine otherwise.
__________________

Please PM me if any of my links are dead.

Don't post your thanks, hit the "Thanks" button!



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
...
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
...
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

Last edited by Denaniel; January 8th, 2010 at 02:07 PM..
Denaniel is online now   Reply With Quote
The Following 15 Users Say Thank You to Denaniel For This Useful Post: