Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to control the frame rate in DirectShow?

How to control the frame rate in DirectShow?

Scheduled Pinned Locked Moved C / C++ / MFC
questiondata-structuresregextutorial
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    houari_id
    wrote on last edited by
    #1

    Hi all.. Well, as in the subject: how can I control the frame rate of a video in DirectShow? I am using DirectShow to play a video and blend a rectangle that moves along the video, which positions are stored in an array. I use SetTimer() to change the rectangle's position, but it seems that the timepoint in the timer doesn't match the frame rate of the video. So I'm thinking of controlling the frame rate of the video instead.. Thank you in advance... -- modified at 7:20 Wednesday 21st March, 2007

    -Houari

    S M 2 Replies Last reply
    0
    • H houari_id

      Hi all.. Well, as in the subject: how can I control the frame rate of a video in DirectShow? I am using DirectShow to play a video and blend a rectangle that moves along the video, which positions are stored in an array. I use SetTimer() to change the rectangle's position, but it seems that the timepoint in the timer doesn't match the frame rate of the video. So I'm thinking of controlling the frame rate of the video instead.. Thank you in advance... -- modified at 7:20 Wednesday 21st March, 2007

      -Houari

      S Offline
      S Offline
      siddharthsan
      wrote on last edited by
      #2

      Hi, I think you can use the FrameRate attribute to get the frame rate. Siddharth

      H 1 Reply Last reply
      0
      • S siddharthsan

        Hi, I think you can use the FrameRate attribute to get the frame rate. Siddharth

        H Offline
        H Offline
        houari_id
        wrote on last edited by
        #3

        Hi I know that function too... but it seems that it is not that easy to change the frame rate. Perhaps I should change the question: how to control the frame rate using DirectShow? thank you

        -Houari

        1 Reply Last reply
        0
        • H houari_id

          Hi all.. Well, as in the subject: how can I control the frame rate of a video in DirectShow? I am using DirectShow to play a video and blend a rectangle that moves along the video, which positions are stored in an array. I use SetTimer() to change the rectangle's position, but it seems that the timepoint in the timer doesn't match the frame rate of the video. So I'm thinking of controlling the frame rate of the video instead.. Thank you in advance... -- modified at 7:20 Wednesday 21st March, 2007

          -Houari

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          Why change the framerate? Wouldn't that change the motion of the video? Since you have a "clock" already because you're playing video you shouldn't need to use a timer. You can base your motion on the timestamp of each frame. Mark

          "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups