4 ms·
Thanks for the feedback. The "Create a python class that can parse MP4 headers" question is something that Phind should be able to answer well. If it doesn't gi
by rushingcreek 4y ago
Thanks for the feedback. The "Create a python class that can parse MP4 headers" question is something that Phind should be able to answer well. If it doesn't give an example immediately, following up with "give me an example" usually works well.
Running it again, I got a code example:
> Create a python class that can parse MP4 headers
> To create a Python class that can parse MP4 headers, one can use the pymp4 library available on GitHub.
The Box class from this library can be used to build and parse MP4 headers.
The following code shows an example of using the Box class to build an MP4 header and then parse it:
from pymp4.parser import Box
from io import BytesIO
header = Box.build(dict(
type=b"ftyp",
major_brand="iso5",
minor_version=1,
compatible_brands=["iso5", "avc1"]))
print(header)
parsed_header = Box.parse(header)
print(parsed_header)
- kxrm 4y agoInteresting, when I went back and did the prompt again it worked, I wonder if this is a context problem, because I just asked multiple questions in the same session on different programming topics. That question wasn't my first question. For clarity I asked different questions in the top search box assuming that would kick off a new session.
- rushingcreek 4y agoGotcha. Asking a question in the top box always clears the context and starts a new session.