mozilla / mp4parse-rust

Parser for ISO Base Media Format aka video/mp4 written in Rust.
Mozilla Public License 2.0
404 stars 62 forks source link

Chunking/splitting a video file. #372

Closed osain-az closed 2 years ago

osain-az commented 2 years ago

Hi. This is not actually an issue but more of a question.

I am trying to chunk a video file given any offset. Is it possible to chunk/split a video.pm4 file ? . For example, chunk by a given offset . I have looked at the documentation but have not really seen any method for that.

Can you point to the method or other suggestions to chunking/spitting a video file.

kinetiknz commented 2 years ago

There's no support for doing so in mp4parse-rust (it's only a reader, no support for (re)writing MP4), but it is possible to split MP4 files by (approximate) byte or time offset in a couple of ways depending on your needs. Most likely, you'll want to create a "fragmented MP4". I recommend investigating ffmpeg or Bento4, as they both offer options to achieve this.

I'll close this since there's nothing actionable for mp4parse-rust.

osain-az commented 2 years ago

There's no support for doing so in mp4parse-rust (it's only a reader, no support for (re)writing MP4), but it is possible to split MP4 files by (approximate) byte or time offset in a couple of ways depending on your needs. Most likely, you'll want to create a "fragmented MP4". I recommend investigating ffmpeg or Bento4, as they both offer options to achieve this.

I'll close this since there's nothing actionable for mp4parse-rust.

Thanks for the tips