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. Why do I extract two different mp3 song durations?

Why do I extract two different mp3 song durations?

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
3 Posts 2 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.
  • Y Offline
    Y Offline
    yongwpi
    wrote on last edited by
    #1

    I used directshow Imediaseeking::getduration and windows media format sdk to extract mp3 song duration, but I got two different values. Result from IMediaSeeking is about 5 times longer than that from sdk. I am not familiar with structure of mp3. Thanks for any informations about this problem.

    L 1 Reply Last reply
    0
    • Y yongwpi

      I used directshow Imediaseeking::getduration and windows media format sdk to extract mp3 song duration, but I got two different values. Result from IMediaSeeking is about 5 times longer than that from sdk. I am not familiar with structure of mp3. Thanks for any informations about this problem.

      L Offline
      L Offline
      lastgen
      wrote on last edited by
      #2

      I'm not at all familiar with the programs/components you are referring to, but I'd be guessing that the mp3 is VBR (variable bit rate). I know in the past some programs have read times wrong because they have been code for a fixed rate. When I die I'd like to go peacefully in my sleep like my father, not screaming in terror like his passengers!!!

      Y 1 Reply Last reply
      0
      • L lastgen

        I'm not at all familiar with the programs/components you are referring to, but I'd be guessing that the mp3 is VBR (variable bit rate). I know in the past some programs have read times wrong because they have been code for a fixed rate. When I die I'd like to go peacefully in my sleep like my father, not screaming in terror like his passengers!!!

        Y Offline
        Y Offline
        yongwpi
        wrote on last edited by
        #3

        Thank you. You are right. It is VBR. Do you have any ideas about how to fix this problem to extract the right duration? My situation is I am using directshow IMediaSeeking::setpositions to set the stop time(absolute), directshow IMediaSeeking::getduration extract the wrong duration (5 times longer). Is there any way to extract right duration from VBR mp3 using directshow? Thanks again.

        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