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. MPEG-1 length how?

MPEG-1 length how?

Scheduled Pinned Locked Moved C / C++ / MFC
questioncomgraphicsgame-devtools
4 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.
  • P Offline
    P Offline
    Philip Patrick
    wrote on last edited by
    #1

    How can I retrieve an information about length (either in time or frames) from MPEG-1 file? I mean raw, without using any tools, not DirectX too. The problem is that using DirectX and some other SDK, I'm getting different results, since I've seen in the past that DirectX had several bugs (when working with MPEGs), I can't say for sure which one is right. The difference I get is 24 frames (25 fps, which is almost a second). Thanx Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer

    P 1 Reply Last reply
    0
    • P Philip Patrick

      How can I retrieve an information about length (either in time or frames) from MPEG-1 file? I mean raw, without using any tools, not DirectX too. The problem is that using DirectX and some other SDK, I'm getting different results, since I've seen in the past that DirectX had several bugs (when working with MPEGs), I can't say for sure which one is right. The difference I get is 24 frames (25 fps, which is almost a second). Thanx Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer

      P Offline
      P Offline
      Philip Patrick
      wrote on last edited by
      #2

      Still haven't found an answer (if anyone know, post please), but found that DirectX still have problems and I cannot work with it if I want frame-accurate :( Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer

      _ 1 Reply Last reply
      0
      • P Philip Patrick

        Still haven't found an answer (if anyone know, post please), but found that DirectX still have problems and I cannot work with it if I want frame-accurate :( Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer

        _ Offline
        _ Offline
        _Theo_
        wrote on last edited by
        #3

        Here's some header info for the MPEG file format which should help you: 1-4 byte Sequence header In Hex 000001B3 12 bits Horizontal size In pixels 12 bits Vertical size In pixels 4 bits Pel aspect ratio 18 bits Picture rate Mind the difference between bits and bytes here. Only the sequence header is four whole bytes, the rest are all a certain amount of bits. The picture rate stands for a certain frame rate: 1 = 23.976 frames/sec 2 = 24 3 = 25 4 = 29.97 5 = 30 6 = 50 7 = 59.94 8 = 60

        P 1 Reply Last reply
        0
        • _ _Theo_

          Here's some header info for the MPEG file format which should help you: 1-4 byte Sequence header In Hex 000001B3 12 bits Horizontal size In pixels 12 bits Vertical size In pixels 4 bits Pel aspect ratio 18 bits Picture rate Mind the difference between bits and bytes here. Only the sequence header is four whole bytes, the rest are all a certain amount of bits. The picture rate stands for a certain frame rate: 1 = 23.976 frames/sec 2 = 24 3 = 25 4 = 29.97 5 = 30 6 = 50 7 = 59.94 8 = 60

          P Offline
          P Offline
          Philip Patrick
          wrote on last edited by
          #4

          Yep, thanx, found this one too, but it doesn't give me an info about the length... More I'm reading, more I'm thinking that there is not actual length is written into MPEG file... :( Anyway.. Vitec (SDK) does a good work, unlike DirectX, which couldn't be used for a frame-accurate editing :( Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer

          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