M
M
mrxakerrus2018-06-24 22:22:38
Programming
mrxakerrus, 2018-06-24 22:22:38

How to parse media container using documentation?

5b2fee99e4d06617680849.png
There is some documentation, I already accept the file from it, but the question is how to parse it, it was an assumption to simply throw away the first 24 bytes (Frame), but you need to get the Type field to find out whether it is video or audio, and then just write it to a file , the question is how it can be done and what kind of magic, hexdump walked through the file and didn’t find it

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
wAML, 2019-02-02
@wAML

I would do 2 passes.
1) I ran through the content, took out the type, and put it side by side in the file
handle=fopen(filename, 'ro');
type=fseek (handle ,1,4) ;
fclose(handle);
2) I cut off the content and put it next to it without ext
3) I went through the ffmpeg content and would get additional information: codec, bitrate, size, container and put it in the same file and type.
4) Based on p 3, I would rename the file with a normal extension.
The magic field most likely contains info p3

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question