0

We use ffprobe, I want to know if mpegdash is supported by ffprobe. I wnt to extract technical metadata of the .mpd file for example bitrate. I do not want to stream or encode. I just want to read the data

When I run the command ffprobe -formats.I don't see .mpd extension being supported by ffprobe. Is there any library or extension that I need to add. Or ffmpeg/ffprobe would not be enough to extract the data. Is thee any other tool or library available for this.

2 Answers2

0

The mpd file is a simple text file that acts like an index and points to the different audio and video streams.

You can actually just read it directly if you are just looking for the bitrate - for example a mid with 5 different ABR bit rates versions of the vide stream will have the different 'representations' listed including their bitrates - e.g. it will include a line like:

<Representation id="2" width="1280" height="720" frameRate="30/1" bandwidth="2499968" codecs="avc1.4D4029">
Mick
  • 24,231
  • 1
  • 54
  • 120
  • I know that I can read it by customise code. I just wanted to have a clue about if there is any plugin available doing this for us. I don't want to read just Representation tag, also few other fields in adaption set. Even I have finally concluded to do it by extracting the data from the xml file representation. –  Nov 05 '19 at 09:56
0

Well as nobody has answered till now and I have found a solution. I will answer myself. if we run the command :

ffmpeg -re -i <file_name.mpd> -f dash -

FFmpeg reads the XML file required to read. But it also reads the chunks and a lot of other information too. Which makes it difficult to extract technical metadata. The easiest option I concluded is to write the customised code to read the mpeg_dash.mpd file. as the XML file contains all the information.

To read more about the format of mpeg_dash file: https://www.brendanlong.com/the-structure-of-an-mpeg-dash-mpd.html

You can use existing MPD parser like https://github.com/carlanton/mpd-tools https://javalibs.com/artifact/io.lindstrom/mpd-parser

I hope this helps.