You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm having trouble figuring out all the settings I should send to the mp4 crate. Could you provide a small example on how to write encoded bytes to a container such as mp4?
For example, there was an issue on the inactive repo mentioning how you must trim the first 4 bytes off of the sps and pps fields when getting them from x264. I feel like an important detail such as that should be given an example. I also little understanding of the major_brand and minor version fields.
I would like to use higher-level apis and not deal with containers, but I only see the crate video-rs, which isn't too much less complicated and pulls in a bunch of unneeded dependencies. If there is another crate that can easily transform rgb bytes to video that would also be helpful.
Thanks!
The text was updated successfully, but these errors were encountered:
Unfortunately, in my experience, there simply are no good options when it comes to Rust APIs for video manipulation. If the overhead is acceptable for your use case, I would recommend creating images for each frame and shelling out to ffmpeg to produce a video. I wrote the bmff and mp4-stream crates a while ago, and while I'm not particularly proud of the APIs or code, they might be worth a try. I'm not very familiar with h264 internals like sps and pps, but if you'd like a copy of the (880 page) H.264 standard, I could send you that in private.
Hi, I'm having trouble figuring out all the settings I should send to the
mp4
crate. Could you provide a small example on how to write encoded bytes to a container such as mp4?For example, there was an issue on the inactive repo mentioning how you must trim the first 4 bytes off of the sps and pps fields when getting them from x264. I feel like an important detail such as that should be given an example. I also little understanding of the major_brand and minor version fields.
I would like to use higher-level apis and not deal with containers, but I only see the crate video-rs, which isn't too much less complicated and pulls in a bunch of unneeded dependencies. If there is another crate that can easily transform rgb bytes to video that would also be helpful.
Thanks!
The text was updated successfully, but these errors were encountered: