Adding Chapters to MP4?

Post » Tue Feb 01, 2011 3:49 pm

Can you add chapter markers using vegas to mp4 files? Not to burn as a dvd, but so that when you put the mp4 onto your video ipod, you can skip around. IF you can, how do you do it?
User avatar
benjamin corsini
 
Posts: 548
Joined: Tue Jul 31, 2007 5:32 pm

Post » Tue Feb 01, 2011 5:30 pm

Yes you can! Been down this road recently.
Give me until tomorrow to dig out my workflow and write some instructions for you.
User avatar
Star Dunkels Macmillan
 
Posts: 494
Joined: Thu Aug 31, 2006 10:00 am

Post » Tue Feb 01, 2011 3:23 pm

that would be awesome! and much appreciated!!!! thank you!~
User avatar
Gavin boyce
 
Posts: 495
Joined: Sat Jul 28, 2007 5:19 pm

Post » Tue Feb 01, 2011 11:31 pm

OK, Here's how it works. I had to go back and actually add chapters to an .mp4 so I could remember exactly how to do it. It's really not as time-consuming as it looks once you've done a couple.

-- Download Drax from www.arlt.eu/blog/projects/drax/. If you love it, throw the guy a 10 EU donation. He's a student.

IN VEGAS:
1) Render an .mp4 using an AVC codec that will play on your iPod (I assume you've already done this). Rename your .mp4 extension to .m4v (important).
2) Open the Vegas project you used, name your markers the way you want them, and check View->Show Edit Details. Make sure to set your Time Format to "Time" (right-click on the clock).
3) Choose Markers / All Fields.
4) Click the upper left box to select the whole table. Ctrl->C to copy the marker data.
5) Open a new Text file on your desktop. Paste the marker data into the file.
6) Now you need to do a little editing. Remove the top line completely (says Postion Name) and move the first data line up to the top (delete the line break). Now, for each entry, there is a between the time and the name. Delete it and replace with a space. The lines will look something like this:
00:00:00.000 Ben
00:01:32.593 Luke
00:02:18.271 Henry


Note: If you have a ton of chapters, you may want to do that last step as a Search / Replace in a text editor like Word.
EDIT: See two posts down for a Word Macro that does this automatically, with thanks to johnmeyer for the idea!

IN DRAX:
1) Open your newly-named .m4v file.
2) Click on the "Chapters" tab at the bottom of the window.
3) Go to File->Import Chapters
4) Click on your newly-created chapters.txt file (you can also edit or add chapters manually if wanted).
5) When the new chapters have imported successfully, click File->Save.


That's it! You'll have to let me know if there are any differences with the newest version of Drax. I'm on 1.3. Also, if you are using Vegas 9 let us know if there is any change in exporting the chapter list. Good luck!

BTW, I made a feature request to do this in Vegas a while back, but never heard a response.
User avatar
Sophie Louise Edge
 
Posts: 520
Joined: Sat Oct 21, 2006 1:09 pm

Post » Tue Feb 01, 2011 2:17 pm

Here's another alternative, doing basically the same thing.

After creating the markers in Vegas, copy them to Microsoft Word.

Then, follow the instructions at this site:

HOWTO: Add Chapters to MP4 files

To save yourself the considerable time of editing all the timecodes to get them into the format required by the mp4muxe.exe utility used in this approach, use this Word macro. With one push of the button, it takes the Vegas marker info and turns it into exactly what the utility wants:

Code Block:
Sub MP4_Chapter()'' MP4_Chapter Macro' Macro recorded 4/17/2009 by John H. Meyer' Dim iChapterNum As Integer iChapterNum = 1 Selection.HomeKey Unit:=wdStory Selection.EndKey Unit:=wdLine, Extend:=wdExtend Selection.Delete Unit:=wdCharacter, Count:=1 Selection.HomeKey Unit:=wdLine Selection.TypeText Text:="CHAPTER" & Format(iChapterNum, "00") & "=" Selection.EndKey Unit:=wdLine Selection.TypeParagraph Selection.TypeText Text:="CHAPTER" & Format(iChapterNum, "00") & "NAME=Track" & Format(iChapterNum, "00") iChapterNum = iChapterNum + 1 With Selection.Find .Text = "^p^#" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With IsFound = Selection.Find.Execute While IsFound Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.MoveLeft Unit:=wdCharacter, Count:=1 Selection.TypeText Text:="CHAPTER" & Format(iChapterNum, "00") & "=" Selection.EndKey Unit:=wdLine Selection.TypeParagraph Selection.TypeText Text:="CHAPTER" & Format(iChapterNum, "00") & "NAME=Track" & Format(iChapterNum, "00") ' Selection.MoveRight Unit:=wdCharacter, Count:=1 ActiveWindow.ActivePane.VerticalPercentScrolled = 0 iChapterNum = iChapterNum + 1 IsFound = Selection.Find.Execute WendEnd Sub



[edit]

Almost forgot: make sure to right-click on the Vegas timeline and change the time settings to match the "hh:mm:ss.ms" format needed by MP4 muxer. In Vegas, this is the "Time" format, rather than SMPTE or one of the others.

Do this before you copy/paste from the Edit Details -> Marker area.
User avatar
Alyesha Neufeld
 
Posts: 499
Joined: Fri Jan 19, 2007 4:45 am

Post » Tue Feb 01, 2011 6:27 pm

Yes John,
Thank you for the macro.
Drax also accepts chapter import / export in this format.
However, using the macro with Drax, the chapter names are not preserved, but show up as Track01, Track02, etc.

EDIT:
Following your lead,
I figured out how to record a Word macro for MP4BOX, a much simpler format compatible with Drax:
Code Block:
Sub MP4BOX()'' MP4BOX Macro' Macro recorded 5/16/2009 by Mark' Selection.HomeKey Unit:=wdStory Selection.EndKey Unit:=wdLine, Extend:=wdExtend Selection.Delete Unit:=wdCharacter, Count:=1 Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = "^t" .Replacement.Text = "^s" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAllEnd Sub

NOTE: While the utility John uses is an .mp4 muxer / demuxer with chapter editing capabilities, Drax is a very straightforward and intuitive chapter / metadata editor.

Glad to see you back in the loop!
User avatar
Charlotte Henderson
 
Posts: 495
Joined: Wed Oct 11, 2006 6:37 am

Post » Tue Feb 01, 2011 8:22 am

Now there is an easier way to do this. The author of Drax has updated his program to work directly with Vegas marker exports, no macros or editing needed. See
www.designstudioschool.com/forums/ShowMessage.asp?ForumID=4&MessageID=655182
User avatar
rheanna bruining
 
Posts: 533
Joined: Fri Dec 22, 2006 5:00 am


Return to Vegas Pro Forum