how to get audio fromat name using nodeJS and ffProbeData

16 Views Asked by At

Hi I have the following data pulled using MediaInfo windows application:

This is just a snippet of one audio channel:

{
... 
     {
        "@type": "Audio",
        "StreamOrder": "1",
        "ID": "2",
        "UniqueID": "12937834239489319519",
        "Format": "DTS",
        "Format_Commercial_IfAny": "DTS-HD MA + DTS:X",
        "Format_Settings_Mode": "16",
        "Format_Settings_Endianness": "Big",
        "Format_AdditionalFeatures": "XLL X",
        "CodecID": "A_DTS",
        "Duration": "9641.183000000",
        "BitRate_Mode": "VBR",
        "Channels": "8",
        "ChannelPositions": "Front: L C R, Side: L R, Back: L R, LFE, Objects",
        "ChannelLayout": "C L R LFE Lb Rb Lss Rss Objects",
        "SamplesPerFrame": "512",
        "SamplingRate": "48000",
        "SamplingCount": "462776784",
        "FrameRate": "93.750",
        "BitDepth": "16",
        "Compression_Mode": "Lossless",
        "Delay": "0.000",
        "Delay_Source": "Container",
        "Video_Delay": "0.000",
        "Title": "English DTS-X 7.1",
        "Language": "en",
        "Default": "Yes",
        "Forced": "No"
      },
...
}

How can I use nodeJS and ffProbeData to get the values from the following properties:

  • "Format": "DTS"
  • "Format_Commercial_IfAny": "DTS-HD MA + DTS:X"
  • "Format_Settings_Mode": "16"
  • "Format_Settings_Endianness": "Big"
  • "Format_AdditionalFeatures": "XLL X"

I've tried using the line: file.ffProbeData.streams[1].format but it just returns undefined.

Thank you!

0

There are 0 best solutions below