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. Graphics
  4. Library for obtaining duration of video movies in various formats?

Library for obtaining duration of video movies in various formats?

Scheduled Pinned Locked Moved Graphics
csharpcssquestion
3 Posts 2 Posters 9 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.
  • K Offline
    K Offline
    kalberts
    wrote on last edited by
    #1

    I am writing a fairly simple editor for managing video subtitle information(*). I do not touch the video itself, but use an external player (such as MPC-HC) to video in any of umpteen different formats. It would be very nice if my editor could obtain the playing time for the video file, to bracket the timing of the subtitles. Some video editors write that into the NTFS attributes, but only sometimes, and only for some formats. I guess some formats provide it in metadata within the file, but again: only for some formats. And I do not want to spend weeks chasing duration info in this format, that format, and the third format... Do you know of any library that can extract metadata info of this sort from "all" different video file formats? It certainly would not hurt if I could also extract e.g. fps value, video resolution etc. I would need either source code or something that can be called from dotNet/C# - I am prepared to translate from e.g. plain C to C#. Obviously, I can pick up the source code for MPC-HC and extract that 0.1% of it that I need, but I am hoping for something requiring less work, less need to understand the structure of half a million code lines (or however large MPC source code is). (*) regarding my desire to reinvent the subtitle editor wheel: I never found any editor suitable for handling multiple subtitle formats, and multiple languages, with the capability to generate a "concrete" subtitle file for lines spoken in specific language, subtitles in a specific languate. Also, I never saw good mechanisms for creating timestamped subtitles from scratch in an efficient manner.

    M 1 Reply Last reply
    0
    • K kalberts

      I am writing a fairly simple editor for managing video subtitle information(*). I do not touch the video itself, but use an external player (such as MPC-HC) to video in any of umpteen different formats. It would be very nice if my editor could obtain the playing time for the video file, to bracket the timing of the subtitles. Some video editors write that into the NTFS attributes, but only sometimes, and only for some formats. I guess some formats provide it in metadata within the file, but again: only for some formats. And I do not want to spend weeks chasing duration info in this format, that format, and the third format... Do you know of any library that can extract metadata info of this sort from "all" different video file formats? It certainly would not hurt if I could also extract e.g. fps value, video resolution etc. I would need either source code or something that can be called from dotNet/C# - I am prepared to translate from e.g. plain C to C#. Obviously, I can pick up the source code for MPC-HC and extract that 0.1% of it that I need, but I am hoping for something requiring less work, less need to understand the structure of half a million code lines (or however large MPC source code is). (*) regarding my desire to reinvent the subtitle editor wheel: I never found any editor suitable for handling multiple subtitle formats, and multiple languages, with the capability to generate a "concrete" subtitle file for lines spoken in specific language, subtitles in a specific languate. Also, I never saw good mechanisms for creating timestamped subtitles from scratch in an efficient manner.

      M Offline
      M Offline
      Michael_Davies
      wrote on last edited by
      #2

      MediaInfo is a opensource library that extracts information from most media files, there is a DLL and an an exe, you cold look at the exe source to see how to interact with the DLL.

      K 1 Reply Last reply
      0
      • M Michael_Davies

        MediaInfo is a opensource library that extracts information from most media files, there is a DLL and an an exe, you cold look at the exe source to see how to interact with the DLL.

        K Offline
        K Offline
        kalberts
        wrote on last edited by
        #3

        Thanks a lot! This looks exactly like the kind of library I was looking for.

        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