VideoHelp Forum
+ Reply to Thread
Results 1 to 9 of 9
Thread
  1. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    i tried googling for the information but i did not find specifically what i am looking for. so let me go into a bit of detail and maybe someone who is familiar in this area can help me so that i can move forward in one of my projects.

    i am trying to understand how most commercial software determine in what format a video is in, in order to read specific info about the video, like the metadata or SEI sections of a video, for instance. so, ilregardless of the video in any (or most) standard/popular format, i.e., avc mp4 mkv flv avi mpg vob or raw, etc., these software seem to know how to find certain information about the video, go to the place or position in the file, and retreave that info. so, rather than guess with the video, i would like to take that approach to pull the info by determining first what do i have, raw or raw inside a container.

    basically, to my knowledge, a video file can be in one of these two formats: original raw (h264 h265) or container (avc hevc mkv mp4 mpg ts etc)

    so what i'm trying to say is, how can find out if "video.xyz" is a raw video, or is a container video ?

    thank you.
    Quote Quote  
  2. I'm a Super Moderator johns0's Avatar
    Join Date
    Jun 2002
    Location
    canada
    Search Comp PM
    Most software just read what's in the header of the video file,as to the rest of it they have no clue unless they fully analyze it by doing a scan.
    I think,therefore i am a hamster.
    Quote Quote  
  3. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    @vhelp, some softs presume much just from the Extension, some do a parse of the headers, some do a parse of the full file. The more advanced they are, the more they will need to parse.

    For your purposes, you should be using MediaInfo.

    Scott
    Quote Quote  
  4. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    i am looking for an alternative way (for the x265 infotool) to deal quickly with the drag/drop file for most of the common files that people use, now that we can repackage (remux) into prefered containers such as mp4 mkv flv ts and so on. while testing ideas with remuxing through ffmpeg, i discovered that it can remux hevc/h265, that x265.exe encoder creates, into those containers and they all played back successfully. i was using the latest versions of ffmpeg / ffplay to test this. so, i am guessing that people are using their prefered containers with their x265 encoded hevc videos. i want to get in, find the location of the data i want to retrieve and get out, in a blink of an eye. using external sources will slow that down, by how much, will depend on one's system, i guess. will it matter ? probably not.

    yes, i know all about mediainfo and ffprobe and gspot, etc., have used them over the years. but i was hoping to keep the utility portable, as much as possible without relying on other helper files. thus, if there is a standard quilifier (or token) that can tell me write away that this is an h265 or h264 or other video after opening and reading in the first parts of the video file, then i would like to use that method instead.

    so far, my google searches turned up the following resources. i read through most of them, and found the resource to be beyound my skills level and my spare time. and that was just the matroska (mkv) container.

    f: http://www.matroska.org/technical/diagram/index.html#simple
    s: specs;
    f: http://www.matroska.org/technical/specs/index.html#track
    s: specifications;
    f: http://www.matroska.org/technical/specs/codecid/index.html
    s: codec; specs;
    f: http://ebml.sourceforge.net/specs/
    s: ebml; principle;

    i guess i will have to study as many test videos as i can afford the time to remux and try to find some clues to common section or token that stands out in all of them. otherwise, i am considering using ffprobe, that is, if i can find a decent command line GREP utility, one that allows multiple token criterias, i.e.,

    GREP width; height; key; etc. etc. the one i am currently using only allows for one paramater.
    Quote Quote  
  5. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Each container has its won "tokens" or codes, as does each different type of stream. Reading them all in and/or out correctly is why you need whole libraries of helper apps. You could do it all yourself, but you wouldn't gain much except monolithicity & control. It's not like it's not fast or portable as it is already.
    Then there's the whole "am I fully qualified yet to handle dealing with learning/coding this additonal stuff?". Not worth the hassle reinventing the wheel, IMO. Only good if all the other options have serious flaws/holes/compromises.

    The specs for AVI, MOV, MP4, MKV are all fully out there on the web. Others: WMV/ASF, MPG-PS, MPG-TS, Real, Swf, FLV are partially available unless you're willing to pay, AFAIK. Same with the codec streams.
    Many coders have reverse engineered from "known good" sample files (which is why there are some flaws out there).

    Scott
    Quote Quote  
  6. ffmpeg -i "pass to file"
    normally gives most of the needed infos
    users currently on my ignore list: deadrats, Stears555
    Quote Quote  
  7. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    at first, i only wanted to do this for a couple of files, but after thinking about it some more, i came to the conclusion that we are past raw formats, and most users are packaging in whatever format is prefered at the time. i will go with mediainfo since i already have a few delphi projects using it, plus most people already have mediainfo.dll installed on their machine. but i might use ffprobe also because i have some ideas for the tool that might prove useful later on. i might need help with mediainfo later. for now, thank you all for your suggestions.

    edit: 2014-08-09 sun, 07:15pm

    i guess i will have to study as many test videos as i can afford the time to remux and try to find some clues to common section or token that stands out in all of them. otherwise, i am considering using ffprobe, that is, if i can find a decent command line GREP utility, one that allows multiple token criterias, i.e.,

    GREP width; height; key; etc. etc. the one i am currently using only allows for one paramater.
    i finally figured out how to extend the arguments (more than one search on one line) in grep searches!
    Last edited by vhelp; 10th Aug 2014 at 18:16.
    Quote Quote  
  8. Member
    Join Date
    Mar 2014
    Location
    United States
    Search PM
    Use FFprobe. Get the metadata about the video.

    FFProbe comes with FFmpeg. It will give you all the info you need about the file:
    - Audio tracks
    - Video tracks, codec, container, bitrate, etc.

    The best out there.

    Cheers
    Quote Quote  
  9. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    rather than mediainfo i'd suggest trying mediainfo-gui (MediaInfoXP)
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!