Metadata Extraction of mpegdash file - mpeg-dash

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.

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">

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.

Related

Trying to use LAME on mp3- getting MPEG-2.5 is supported by Layer3 only

When using the LAME interface through a node application (I am writing a JavaScript program running on node, with LAME installed), I am now getting this error on a semi-regular basis:
"MPEG-2.5 is supported by Layer3 only"
I am using LAME to convert mp3's to WAV files, so I need this to work for all mp3s.
What should I be doing to the mp3s (or to my call to LAME) to make these mp3 files convertible via LAME?
This error is often the result of someone who has taken an mp4 file and changed the name to mp3 extension. This shows up especially for windows, since it uses extensions to indicate file type rather than purely inspecting the file content.
In this case, using LAME to try to convert a file like (helloworld.mp3 - which was originally helloworld.mp4):
LAME --decode helloworld.mp3 helloworld.wav
will give you the following message
"LAME error: MPEG-2.5 is supported by Layer3 only"

How to debug a .zip generator algorithm?

I'm trying to implement a minimal version of .zip file generation following this spec: https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT
I don't actually need compression, I just need a way to string together a bunch of files into a single widely adopted archive format with the capability to stream in file data while streaming out the zip.
So far I'm partially successful, 7-zip and windows built in zip extractor can extract them just fine, winrar and macos built in zip extractor are giving me corrupted archive errors.
I can't for the life of me find the actual problem(s?) though, as far as I can tell the .zips are built 100% to the specification but the spec is a big wall of text and with swooping changes from one zip file version to the next along with legacy attributes taking on new functions it is tad confusing.
Does anyone know of an extraction tool that can give me more specific errors than just "archive is corrupt"?
Or perhaps a zip generation utility where I can pick and choose between all the different ways of building a zip file so I can go and compare the results byte by byte?
Does anyone know of an extraction tool that can give me more specific errors than just "archive is corrupt"?
The unzipada tool # Zip-Ada project will do exactly that
Testing archive ko.zip
raised ZIP.ARCHIVE_CORRUPTED : Bad (or no) end-of-central-directory
[C:\Ada\za\unzipada.exe]
Zip.Find_First_Offset at zip.adb:589
Unzip.Extract at unzip.adb:667
Unzipada at unzipada.adb:259
By browsing the code (like: zip.adb, line 589) you can narrow down the corrupt archive issues. For building the tool, download the sources and follow the readme.txt file. There are also pre-built binaries for Windows.

How can I get the length of a video in node.js

My backend needs to check to see if a video is under 60 seconds, or else it doesn't add the link to the database. Is there any easy solution if I have the file on disk? Something simple like videofile.getDuration()
I checked out FFMEG on npm but I'm not sure if that's what I need or if that's even up to date.
I use ffprobe for the task.
If you follow the README and you get to read the streams' info you will be able to get the duration by accessing the following tag on the video stream:
info.streams[0].tags.DURATION
There might be variants according to the kind of video file you are parsing, this example works with mkv.

collada2gltf converter can't produce *.json file

I am reading a book: Programming 3D Applications with HTML5 and WebG , it involve a Vizi framework.
All the examples load the *.json file instead of *.gltf file. Why?
When I load *.gltf, it doesn't load any result, and the collada2gltf converters only produce *.gltf, *.bin, *.glsl files and so on.
What should I do?
.gltf is a JSON file. Try to open it with a text editor and see for youself. .bin and .glsl files are just additional resources, linked from .gltf file. Those are geometry buffers and shaders respectively. So to make it work you should make sure that all the files produced with the converter are also available to a web browser you running your code in.
Also you can try to add -e CLI flag to collada2gltf and it'll embed all the resources into result .gltf file.

Merge two .au files to a single .au file using ffmpeg

I am new to ffmpeg and I went through the documentation it, but was not able to get the most out of it.
I also searched for the same on stackoverflow but could not find exactly what i want.
I need the following things to be done using ffmpeg.
inputs: file1.au, file2.au
outputs: demo.au
Merge two .au files to single demo.au file.
I need the output file's duration to be that of the longest file.
I need to merge the audio files at a specific duration i.e. file2.au should be merged with file1.au from 5th second of file1.au (if this is possible)
I need the seperate answers for all the tasks if possible.
Thanks in advance.

Resources