Murphy Mac - Screencasts and Tutorials » Page 'Add Chapters Using Quicktime Pro'

Add Chapters Using Quicktime Pro

Share

Quicktime Chapters

With Quicktime Pro you can add chapter markers to your movie and help viewers jump from one part to another with ease. The steps aren’t as friendly as iMovie – but you won’t have to import your video into iMovie either!

Apple has scripts on their web site that automate tons of Quicktime functions. If you didn’t think Quicktime Pro could do much check out the scripts. It’s amazing just how much this application can do.

That’s enough of the sales pitch. If you need Quicktime Pro chances are you already know about it.

The screencast is loosely based on this tutorial from the Apple site. But the Apple version says to activate chapters on the text track – which didn’t work for Murphy. In the screencast you’ll notice Murphy activates chapters on the video track. It could be an error in the Apple tutorial – or it could be a version compatibility issue.

Here’s a little more information on text tracks and Quicktime. Click to download the movie used in the screencast and a sample text file.

Note: Apple announced changes to the Macbook Pro line today. If you don’t need the very latest check Amazon. At post time they have some previous generation models listed with a $150 rebate.

Watch Now | Permalink

14 comments to “Add Chapters Using Quicktime Pro”

  1. Hi,

    I believe there is an error in the screencast. After futzing around for hours, I discovered that when adding the text to the movie using the “Add to Selection and Scale” as recommended in the screencast, the chapters often repeat themselves, due to the way QuickTime handles text. Rather than using the “Add to Selection and Scale,” I think it is better to use just the “Add to Selection” without the “and Scale,” also available from the QT Player menu. I didn’t discover this myself, but found a message posted on another site (not Apple’s site) that described the problem and the simple solution.

    I tried everything I could think of to make the screencast method work, but everything I tried failed. I thought for sure I was misreading or misunderstanding some of the screencast, but that wasn’t the problem.

    I love the screencasts, by the way, and am a big fan of this site, and it’s not just because of the great name you have.

    Best regards,

    Patrick Murphy

  2. Did you do a select-all on the destination movie before the Add to Selection and Scale? I included that because it was mentioned as a step on two different sites.

    One of those sites was the apple site – but like I said I think they have at least one other mistake in their directions.

    Also – you should probably adjust the frame rate ( the one that defaults to 1000 in the screencast) to whatever your frame rate is.

    With all that said, the steps in the screencast did work for me, and the chapter markers were placed where I expected they would be. But that was a very short movie and a longer one might be more vulnerable to differences in the steps.

    Here is the other place I saw the steps detailed. Scroll down to a post by regulus6633 where he explains the manual method.

    What exactly didn’t work with the screencast method?

    Finally – I don’t know WHY the scale part was added in the instructions. If you use that command to add audio to a video the audio is stretched or compressed to match the length of the video. I don’t see why this would be a factor with a text track.

    So if it works for you without the scale command I would go with that!

    Thanks for visiting and for sharing your experience – I’m sure some people will find it useful.

  3. “Did you do a select-all on the destination movie before the Add to Selection and Scale?” –

    Yes

    “Also – you should probably adjust the frame rate ( the one that defaults to 1000 in the screencast) to whatever your frame rate is.”

    Did that too

    “What exactly didn’t work with the screencast method?”

    It was interesting. In the text file “movie” the chapters displayed just as they should have. When added to the target QT movie, which was 15 minutes long, the chapters repeated themselves, so that I might have two chapters named “chapter two,” for example.

    The screencasts are really cool. They look good and I like them all.

    Best regards,

    Patrick

  4. I had something like that (the double chapters appearing) happening when I tried to make my own text file from scratch – by just writing it. If I remember right that problem went away when I used the Export method to create the text file in the proper form.

    So – when you leave the “scale” command out it works perfectly for you?

    btw- not sure why your comment went into my spam. sorry about that.

  5. “If I remember right that problem went away when I used the Export method to create the text file in the proper form.”

    I followed the Screen cast directions precisely, and made sure to export the file as recommended in the screencast. Didn’t matter.

    And yes, when I omit the “scale” command, everything worked just fine

  6. Thanks for posting your experience Patrick. Maybe I’ll ask Quicktime Kirk why they would have the scale command in there.

  7. Hi,

    Thank goodness for the “History” in Safari’s menu bar. It took me awhile, but I found the source of the information I’ve reported here. It can be viewed at this address:

    http://forums.3ivx.com/index.php?showtopic=85004&hl=Chapters

    Scroll down to the third message, from bantha, dated September 27, 2006. This is the post where I got the information about adding the text.mov’s without using the “Scale As.”

    Hope this helps…..

    Adios, Murph … (but I’ll be back … this is a great site!)

    Patrick

  8. Hi there,

    I’ve been adding chapters to a QT movie using the steps above, but at the point when I “Add to Movie” the image quality of the text graphics already in the movie deteriorate – go from being smooth to blocky.

    Did anyone else experience this? Is there a work around?

    Many thanks,

    Matt.

  9. I had trouble with the ‘repeating chapters’ issue too. I followed the directions exactly a second time, but used the “Add to Movie” option as opposed to the “Add to Selection and Scale” and everything worked perfectly !

    Thanks a million … this is great !!

  10. [url=http://vehicle-page.com/sitemap/2]vehicle auto comparison[/url]
    eccerslere981

  11. I have created a tool to make this faster and it’s web-based. Just paste the timestamps and chapter names: http://rosano.ca/quicktime

    This should have been built-into QuickTime 7…

  12. @Rosano: Thank you for that tool, but I would like to add that as pointed out in earlier posts, the time code displayed in the the “info” window in QuickTime is in 1/100 seconds, yet the time code that needs to be in the text file should be in frames (matching your movie – 30 fps most likely).
    This means that the last number in the D:HH:MM:SS:FF time code, the two-digit frames (00 – 29 if you are running 30fps), is:
    (30 * XX)/100
    where XX are the last two digits in the QuickTime time code (100th of a second).
    This will of course result in frames with decimal points so round up/down and you should get pretty good results.
    Thank you Murphy & everyone else for answering some questions here!
    -Chris =)

  13. Based on your work and others, here is an Applescript for making chapter files interactively …

    — Applescript to Write Chapters File for QuickTime Pro (SnowLeopard)
    — Assembled 2012 12 13 by Alfred Cellier, using fragments found here and there

    tell application “QuickTime Player 7”
    try
    set MovieDocument to document 1 — gets frontmost open movie
    set MovieProperties to properties of MovieDocument — gets properties of movie as list
    tell MovieDocument — each of the following gets an individual property
    set _CurrentTime to current time
    set _Duration to duration
    set _Name to name
    set _Path to path
    set _TimeScale to time scale
    set _FrameRate to 30
    end tell
    on error
    display dialog “Oops!”
    end try
    end tell
    set _RunningTimeSec to ((_Duration / _TimeScale) * 1000 round) / 1000
    set _RunningTimeMin to ((_RunningTimeSec / 60) * 1000 round) / 1000
    set _RunningTimeHHMMSS to convert_hhmmss(_RunningTimeSec) & text 2 thru 4 of ((_RunningTimeSec mod 1) * _FrameRate / 100 as string) as string
    set _CurrentTimeSec to ((_CurrentTime / _TimeScale) * 1000 round) / 1000
    set _CurrentTimeMin to ((_CurrentTimeSec / 60) * 1000 round) / 1000
    set _CurrentTimeHHMMSS to convert_hhmmss(_CurrentTimeSec)
    if _CurrentTimeSec is not 0 then set _CurrentTimeHHMMSS to _CurrentTimeHHMMSS & text 2 thru 4 of ((_CurrentTimeSec mod 1) * _FrameRate / 100 as string) as string
    — create header for chapter info
    set ChapterInfoHeader1 to “{QTtext}{font:Geneva}{plain}{size:12}{textColor: 65535, 65535, 65535}{backColor: 0, 0, 0}{justify:center}{timeScale:30}{width:160}{height:48}{timeStamps:absolute}{language:0}{textEncoding:0}” & return
    set ChapterInfoFile to (((path to desktop folder) as string) & “ChapterInfoFile.txt”)
    — create file for chapter info
    my write_to_file(ChapterInfoHeader1, ChapterInfoFile, false)
    set ChapterIndex to 1
    set ChapterTitle to text returned of (display dialog “Today is ” & (current date) & return & return & “Application is QuickTime Player 7” & return & return & “Path ” & return & _Path & return & return & “Name ” & return & _Name & return & return & “Time Scale tics/sec ” & _TimeScale & return & return & “Movie Duration, tics ” & _Duration & return & ” Running Time, sec ” & _RunningTimeSec & return & ” Running Time, min ” & _RunningTimeMin & return & ” Running Time, hh:mm:ss.frame ” & _RunningTimeHHMMSS & return & return & “Current Time, tics ” & _CurrentTime & return & ” Current Time, sec ” & _CurrentTimeSec & return & ” Current Time, min ” & _CurrentTimeMin & return & ” Current Time, hh:mm:ss.frame ” & _CurrentTimeHHMMSS & return & return & return & return & “This will set Chapter Index: ” & ChapterIndex & return & return & “with Chapter Title: ” default answer ((ChapterIndex as string) & “ChapterTitle” & ChapterIndex as string) with title (“Set Title for Chapter ” & ChapterIndex))
    — write title for chapter 1
    my write_to_file((“[00:00:00.00]” & return & “{textBox: 0, 0, 50, 160}” & ChapterTitle & return), ChapterInfoFile, true)
    set ChapterIndex to 2

    repeat
    display dialog “Now: ” & (current date) & return & return & “Application: QuickTime Player 7” & return & return & “Path: ” & return & _Path & return & return & “Name: ” & return & _Name & return & return & “Time Scale tics/sec ” & _TimeScale & return & return & “Running Time, hh:mm:ss.frame ” & _RunningTimeHHMMSS & return & return & “Current Time, hh:mm:ss.frame ” & _CurrentTimeHHMMSS & return & return & return & return & “Set movie position to start of chapter ” & ChapterIndex & return & return & “Finish after last chapter, or Cancel to quit” buttons {“Cancel”, “Finish”, “Next”} default button “Next” with title (“Set Movie Play Position for Chapter ” & ChapterIndex)
    set ButtonText1 to button returned of result
    if ButtonText1 = “Finish” then
    my write_to_file((“[” & (_RunningTimeHHMMSS as string) & “]” & return), ChapterInfoFile, true)
    display dialog (ChapterIndex – 1 as string) & ” chapters set up !!!” & return & return & “Cancel to quit” buttons {“Cancel”} default button “Cancel”
    end if
    tell application “QuickTime Player 7”
    tell MovieDocument to set _CurrentTime to current time
    end tell

    set _CurrentTimeSec to ((_CurrentTime / _TimeScale) * 1000 round) / 1000
    set _CurrentTimeMin to ((_CurrentTimeSec / 60) * 1000 round) / 1000
    set _CurrentTimeHHMMSS to convert_hhmmss(_CurrentTimeSec)
    if _CurrentTimeSec is not 0 then set _CurrentTimeHHMMSS to _CurrentTimeHHMMSS & text 2 thru 4 of ((_CurrentTimeSec mod 1) * _FrameRate / 100 as string) as string
    set ChapterTitle to text returned of (display dialog “Today is ” & (current date) & return & return & “Application is QuickTime Player 7” & return & return & “Path ” & return & _Path & return & return & “Name ” & return & _Name & return & return & “Time Scale tics/sec ” & _TimeScale & return & return & “Movie Duration, tics ” & _Duration & return & ” Running Time, sec ” & _RunningTimeSec & return & ” Running Time, min ” & _RunningTimeMin & return & ” Running Time, hh:mm:ss.frame ” & _RunningTimeHHMMSS & return & return & “Current Time, tics ” & _CurrentTime & return & ” Current Time, sec ” & _CurrentTimeSec & return & ” Current Time, min ” & _CurrentTimeMin & return & ” Current Time, hh:mm:ss.frame ” & _CurrentTimeHHMMSS & return & return & return & return & “This will set Chapter Index: ” & ChapterIndex & return & return & “with Chapter Title: ” default answer ((ChapterIndex as string) & “ChapterTitle” & ChapterIndex as string) with title (“Set Title for Chapter ” & ChapterIndex))
    my write_to_file(((“[” & (_CurrentTimeHHMMSS as string) & “]” & return & “{textBox: 0, 0, 50, 160}” & ChapterTitle as string) & return), ChapterInfoFile, true)
    set ChapterIndex to ChapterIndex + 1
    end repeat
    end

    on convert_hhmmss(_runTime)
    tell (1000000 + _runTime div hours * 10000 + _runTime mod hours div minutes * 100 + _runTime mod minutes div 1) as string
    set _hhmmss to text 2 thru 3 & “:” & text 4 thru 5 & “:” & text 6 thru 7 –& (text 2 thru 5 of ((_runTime mod 1) as string))
    set _Frac to 0 –text 2 thru 5 of ((_runTime mod 1) as string) as string
    –display dialog _Frac –as string
    end tell
    return _hhmmss
    end convert_hhmmss

    on write_to_file(this_data, target_file, append_data)
    try
    set the target_file to the target_file as string
    set the open_target_file to open for access file target_file with write permission
    if append_data is false then set eof of the open_target_file to 0
    write this_data to the open_target_file starting at eof
    close access the open_target_file
    return true
    on error
    try
    close access file target_file
    end try
    return false
    end try
    end write_to_file

  14. I should have also said, regarding the preceeding script, that it merely generates the text file, which then should be added to the movie per your instructions.
    And, the movie file should be open in QuckTimePro before starting the script.

Leave a comment