tom
tom

Reputation: 19

What can I do with atomic parsely and where can I get documentation to understand the API?

I want to be able to parse an h.264 mov file, extract the atoms and modify it myself without using an encoder tool like ffmpeg. Atomic Parsley seems to be the way to go but it seems to have very sparse documentation (or I’m just stupid enough not to have found it)

Would I be able to use it to modify an h.264 encoded mov stream on the fly? By this I mean I would like to parse the moov atom, extract the duration of the movie , change the duration of the movie, go to the edits table or sync table (or use a combination of both depending on the logic which I have to read up on), use the timing information in terms of the time scale to stream data from a particular point. And modify all the length and header information of the parent atoms that contain the edits table all the way to the first mov atom length and its header. The reason I have to do so is because any flash player that decodes an h.264 requires properly defined meta information contained in the moov atom before it can play it. I plan on implementing pseudo streaming.

What I require is the capability to parse any atom, their headers and other information they might hold. So it would really help if i knew if atomic parsley would allow me to parse the information I need. I’m tempted to create my own parser but that would definitely be fool hardy. oh and fyi they have the code for just this in apache's mod h.264 streaming module, in case anyone wanted to know.

Upvotes: 1

Views: 853

Answers (1)

Shakkhar
Shakkhar

Reputation: 199

If you want to parse MOV / MP4 files in client-side javascript, qtfaststart.js is a good place to start.

Strictly speaking, you cannot modify the stream on the fly right now. You can control playback through scripting to some extent, but that's pretty much it. Media Source Extension is designed to address this issue, but last time I checked it wasn't capable of handling H.264.

P. S. I don't consider writing your own parser "foolhardy". MOV is very modular in design, so you can parse what you need and ignore the rest. I am writing my own parser to probe the MOV file in client side and extract informations such as frame rate, duration, resolution, etc.

Upvotes: 0

Related Questions