CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2011
    Posts
    3

    Screen Capture - Problems with video and audio sync

    I have a problem with an java screen recorder. The problem is that the video and audio gets out of sync sometimes if the client computer is a bit slow.

    The tecnique used is to capture a lot of jpegs and the sound. After that the jpegs is rendered to an quicktime movie along with the sound.

    Do you guys know of a good tecnique to always get this in sync?

  2. #2
    Join Date
    May 2006
    Location
    UK
    Posts
    4,473

    Re: Screen Capture - Problems with video and audio sync

    Can you record the system time of the sound recordings and screen captures so you can resync them when you generate the movie.
    Posting code? Use code tags like this: [code]...Your code here...[/code]
    Click here for examples of Java Code

  3. #3
    Join Date
    Sep 2011
    Posts
    3

    Re: Screen Capture - Problems with video and audio sync

    Quote Originally Posted by keang View Post
    Can you record the system time of the sound recordings and screen captures so you can resync them when you generate the movie.
    Thanks for the reply =)

    I have thought about something like that too, but dont know if thats possible?
    Regarding the jpegs maybe I could make an array and save what milliseconds each frame should belong to, but does anyone have a clue how I could do to save the same metadata about the sound?

  4. #4
    Join Date
    May 2006
    Location
    UK
    Posts
    4,473

    Re: Screen Capture - Problems with video and audio sync

    If you are saving the sound as a continuous stream and there's no time data captured in the stream then it's a little trickier.

    I suppose you could monitor the number of bytes passed through the sound stream and save the total number of bytes at the point you capture each image and use that to resync the images to the sound.
    Posting code? Use code tags like this: [code]...Your code here...[/code]
    Click here for examples of Java Code

  5. #5
    Join Date
    Sep 2011
    Posts
    3

    Re: Screen Capture - Problems with video and audio sync

    Quote Originally Posted by keang View Post
    If you are saving the sound as a continuous stream and there's no time data captured in the stream then it's a little trickier.

    I suppose you could monitor the number of bytes passed through the sound stream and save the total number of bytes at the point you capture each image and use that to resync the images to the sound.
    Sounds like a good idea, thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured