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 7830191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T11:06:58+00:00 2026-06-02T11:06:58+00:00

I have started a thread on this at DirectShow.NET’s forum, here is the link

  • 0

I have started a thread on this at DirectShow.NET’s forum, here is the link http://sourceforge.net/projects/directshownet/forums/forum/460697/topic/5194414/index/page/1
but unfortunately the problem still persists…

I have an application that captures video from a webcam and audio from the microphone and save it to a file, for some reason the audio and video are never in-sync, i tried the following:
1. Started with ffdshow encoder and changed to AVI Mux – problem persists, audio is delayed and at the end of the video the picture remains frozen and the audio continues
2. Changed from AVI Mux to WM ASF Writer – video is frozen at the beginning (2 seconds) and rest of video is in-sync (but the two first seconds are not usable)
3. create SampleGrabber that prints the timestamp for both audio and video – saw that the audio timestamp is 500ms earlier but I have no idea what to do with this fact…
4. tried manually setting the ReferenceClock to one of the capture filters (audio/video) but both won’t cast to IReferenceClock
5. Created a SystemClock and set it has the ReferenceClock – made no difference
6. Set SyncUsingStreamOffset(true) on the grap – timestamps are much closer now but the final result is the same
7. Tried saving the audio and video to two different files and used VirtualDub to see if they match, they still dont…

Oh i forgot to mention I also tried building the graph in GraphEditPlus but the problem still remains, here’s a link to the graph: http://www2.picturepush.com/photo/a/8030745/img/8030745.png

Currently I am testing all my changes on the CapWMV sample from DirectShow.NET’s samples.

Please any advice would be highly appreciated, I am hopeless :/

Thanks,

Eran.

Update:

It seems there’s a constant 500ms gap between the audio and video, if I use virtualDub to delay the audio by 500ms it looks fine, how can set this in the graph?

  • 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-06-02T11:07:02+00:00Added an answer on June 2, 2026 at 11:07 am

    Just wanted to add the solution for my situation, maybe it will help someone.

    I was trying to record video from a webcam together with audio from a microphone, video is HD (1080p) so I wanted to save an AVI file encoded in MPEG4, so I used ffshow-tryous (free Mpeg4 encoder) together with an Avi Mux Filter, the problem was that some (well most of them 🙂 ) of my videos had sync issues.

    What I discovered was that Avi Mux does not handle synchronization, it assumes the data arrives at the appropriate time (written here – http://msdn.microsoft.com/en-us/library/dd407208(v=vs.85).aspx), so I tried using WMAsfWriter which does handle synchronization and it worked fine (The 2 seconds freeze I mentioned above was just a glitch with VLC Player) but it doesn’t work good with high resolutions and I had trouble using it with custom profiles (filters won’t get connected).

    I also tried Roman’s suggestion and although the links were very interesting and promising (I really recommend reading them – can’t give +1 to a post yet…) it just didn’t made any difference :/

    My final solution was to give up on MPEG4 and just use MPEG2, I switched from Avi Mux to Microsoft MPEG2 Encoder which works great, should have thought about that long time ago 🙂

    Hopefully this will help someone else.

    Thanks,

    Eran.

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

Sidebar

Related Questions

Let's say I started a thread and I have something like this: ...//initiate all
I've started my own thread on this question so as to have less overhead
I have a local thread that is started on button-click event from the main
I have started to play with xVal as my validation framework for an ASP.Net
I have started writing a Macro in Visual Studio 2005 like this: Public Sub
I started a different thread for this, I tried solving it using the help
I have just started exploring SpringMVC and logback. This is my controller, (the only
I'm looking to have a class (subclassed from threading.Thread) that is initialised and started
I'm new to WinDbg and have started using it this week to diagnose memory
We have a website running .NET 2.0 and have started using the ASP.Net HttpRuntime.Cache

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.