Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7639563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:27:03+00:00 2026-05-31T08:27:03+00:00

What I would like to do is this: play a master quicktime movie (prores

  • 0

What I would like to do is this:

  • play a master quicktime movie (prores or pjpg) on one screen (with audio)
  • play another slave quicktime movie (prores or pjpg) on another screen, in-sync with the master
  • when i press left or right, cycle through different slave movies

This is what i’ve done:

  • create an NSWindow for each screen
  • create an array of QTMovies (actually an array of arrays per screen)
  • create an array of QTMovieViews (actually an array of arrays per screen)
  • play the master QTMovie normally
  • setup an NSTimer to update the current slave movie time from the master movies time
  • if a key is pressed, swap the content view of the window to the new QTMovieView

my full code is at http://codepad.org/gDsJLPAy

It all works, however when I switch videos, I get a single frame flash of the old frame of the video being switched to. I.e. if I run the app for 50 frames and switch to SlaveVideo2, I catch a glimpse of SlaveVideo2 frame 0, and then it immediately jumps to SlaveVideo2 frame 50 and carries on as usual. If, after 20 frames I switch back to SlaveVideo1 I catch a glimpse of SlaveVideo1 frame 50, and then it jumps to SlaveVideo1 frame 70 and carries on as usual.

I’m going crazy trying to figure this out. I’ve tried all kinds of refresh, display methods but to no avail. Any ideas on how I can fix this?

P.S. You can see in the timerFireMethod if I update all slave movies all the time (instead of just the active one), I don’t get the flicker. Obviously this isn’t a solution since I’m constantly seeking tons of videos which is way too heavy and unnecessary!

P.P.S. I’ve tried recreating the setup in Quartz Composer and I get the exact same problem.

I’m on 10.7.3

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T08:27:05+00:00Added an answer on May 31, 2026 at 8:27 am

    For the sake of the archives I’ll post my conclusions here.

    I couldn’t find a direct solution to this problem. If the slave movie is paused, when I make its view active – even if I start playing the movie slightly earlier – upon becoming visible it first shows the old frame. The workaround solution I found was to keep the movie playing at all times (which sucks).

    However I found this
    https://developer.apple.com/library/mac/#documentation/QuickTime/RM/MovieInternals/MTTimeSpace/B-Chapter/2MovieTimeandSpace.html

    and by calling GetMovieTimeBase on the master Movie, and applying SetTimeBaseMasterTimeBase to the slave movie, it allows the two movies to play in sync in the back end, without you having to manually keep them in sync. So the whole sync code can be reduced to:

    -(void)setLayerIndex:(int)i {
        // make sure target index is within bounds
        if(i<0) i=[[movies objectAtIndex:1] count]-1;
        else if(i>[[movies objectAtIndex:1] count]-1) i=0;
    
        // pause all slave views
        [[viewers objectAtIndex:1] makeObjectsPerformSelector:@selector(pause:) withObject:self];
    
        // save current index
        currentLayerIndex = i;
    
        // sync frame of new slave movie
        [[self currentSlaveMovie] setCurrentTime:[masterMovie currentTime]];
    
        // set windows view to QTView
        [[windows objectAtIndex:1] setContentView:[self currentSlaveView]];
    
        // set timebase of slave to timebase of master
        TimeBase masterTimeBase = GetMovieTimeBase([masterMovie quickTimeMovie]);
        TimeValue masterTimeScale = GetMovieTimeScale([masterMovie quickTimeMovie]);
        TimeRecord slaveZero;
        TimeValue slaveZeroTV = GetTimeBaseStartTime(masterTimeBase, masterTimeScale, &slaveZero); 
        SetMovieMasterTimeBase([[self currentSlaveMovie] quickTimeMovie], masterTimeBase, &slaveZero);    
    
        // play master movie
        [masterViewer play:self];
    
        // play slave movie
        [[self currentSlaveView] play:self];
    

    }

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to play a radio stream in Quartz Composer. This would be
I would like this to be the ultimate discussion on how to check if
I would like to do something like this in terminal $ ruby quicksort.rb unsorted.txt
I would like to execute a command like this: #!/bin/sh `which rvmsudo` `which program`
I would like to implement in python something like this: def producer(): while True:
I would like to do something like this: a rotating cube on a form.
I would like to do something like this: container::iterator it = NULL; switch (
I would like to have declaration like this: void Date::get_days_name(const Date& = this) which
I would like to do something like this i.e., use wild card characters in
I would like do some thing like this: SELECT sum(quantity) FROM orders WHERE order_code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.