1
0
Fork 0
mirror of https://github.com/alfg/mp4-rust.git synced 2024-05-20 01:08:06 +00:00
Commit graph

19 commits

Author SHA1 Message Date
Data Retriever 3ecfd0cc9d
Cargo fmt and clippy (#73)
* Run cargo clippy --fix

* Run cargo fmt --all
2022-05-31 20:50:49 -07:00
Data Retriever 084381bde5
Do not fail if media info fails (#70) 2022-04-20 18:43:18 -07:00
cTopher 8fe009e248
Maintain a separate indexing from track_id to index to allow for non continues track ids (#43) (#58) 2021-07-29 19:57:15 -07:00
Alf e879500c1a update mp4info example and track. 2020-09-05 13:15:31 -07:00
Alf 05e20124e0 Add support for parsing subtitle tracks (tx3g box). 2020-09-04 23:09:33 -07:00
Alf 8def228352 Add support for reading/writing fragmented mp4 (fMP4) boxes. 2020-09-03 21:33:45 -07:00
Alf 042629a88c update mp4info and mp4dump examples. 2020-09-01 20:49:55 -07:00
Alfred Gutierrez c4ff8627b0
Set optional EsdsBox in Mp4aBox. (#23)
* Make EsdsBox in Mp4aBox optional, instead of error when parsing. Also update mp4info example with some missing info that was removed.

* Update Mp4aBox test to check for optional EsdsBox.
2020-08-23 13:38:25 -07:00
Ian Jun b5367032a7
Update examples (#16)
* Add ReadBox trait

* Add boxtype macro

* Remove offset in BoxHeader

* Fix parsing error when box has largesize

* Remove duplicated codes reading version and flags

* Update examples

* Fix test failure

Co-authored-by: Byungwan Jun <unipro.kr@gmail.com>
2020-08-05 23:00:53 -07:00
Ian Jun 3104a2d95b
Feature/mp4copy (#14)
* Add ReadBox trait

* Add boxtype macro

* Remove offset in BoxHeader

* Fix parsing error when box has largesize

* Remove duplicated codes reading version and flags

* Add avc1 box

* Add mp4a box

* Add mp4a box

* Add DecoderSpecificDescriptor in esds box

* Add necessary sub-boxes to stbl box

* Improve ReadBox::read_box()

* Add smhd box

* Refactor BoxHeader

* Refactor BMFF

* Refactor

* Add some functions to get offset and size of sample

* Add Mp4Reader::read_sample() that read media samples

* Move Mp4Reader to reader.rs

* Add mandatory check when reading boxes

Add some methods to Mp4Reader, TrackReader
Format codes

* Update mp4info

* Refactor common types

* Add FixedPointX types

* Add media configuration, profile, ...

* Add initial Mp4Writer

* Run cargo fmt

* Add Mp4Writer and examples/mp4copy

* Add test codes for Avc1Box and Mp4aBox

* Remove prefix "get_" from method names

* Rename atoms to mp4box

* Fix some bugs

Co-authored-by: Byungwan Jun <unipro.kr@gmail.com>
2020-08-04 16:56:59 -07:00
Ian Jun 0df82aec5f
Feature/mp4reader (#13)
* Add ReadBox trait

* Add boxtype macro

* Remove offset in BoxHeader

* Fix parsing error when box has largesize

* Remove duplicated codes reading version and flags

* Add avc1 box

* Add mp4a box

* Add mp4a box

* Add DecoderSpecificDescriptor in esds box

* Add necessary sub-boxes to stbl box

* Improve ReadBox::read_box()

* Add smhd box

* Refactor BoxHeader

* Refactor BMFF

* Refactor

* Add some functions to get offset and size of sample

* Add Mp4Reader::read_sample() that read media samples

Co-authored-by: Byungwan Jun <unipro.kr@gmail.com>
2020-07-31 10:12:26 -07:00
Ian Jun 4df9fa1bd4
Feature/test write box (#12)
* Add ReadBox trait

* Add boxtype macro

* Remove offset in BoxHeader

* Fix parsing error when box has largesize

* Remove duplicated codes reading version and flags

* Add test code for all leaves in box tree

* Remove entry_count that is duplacated with entries.len()

* Change volume type to Ratio<u16>

Co-authored-by: Byungwan Jun <unipro.kr@gmail.com>
2020-07-28 21:29:04 -07:00
Ian Jun 8f56200dd0
Feature/writebox trait (#11)
* Add ReadBox trait

* Add boxtype macro

* Remove offset in BoxHeader

* Fix parsing error when box has largesize

* Remove duplicated codes reading version and flags

* Simplify all box size types as largesize

* Add WriteBox trait and improve compatibility with large box

* Split large atoms file into smaller ones

* Refator Error

Co-authored-by: Byungwan Jun <unipro.kr@gmail.com>
2020-07-28 09:36:17 -07:00
Alfred Gutierrez a4fd45b3e8
Add basic integration test (#10)
* Add basic integration test and update README and example. Add sample minimal.mp4 file for tests.

* Add .travis.yml file.

* Update readme.
2020-07-25 20:07:39 -07:00
Nathan Fiedler 958304a9b2
Make the example tolerant of videos missing parts (#5)
* Make the example tolerant of videos missing parts

Some videos are missing certain parts that the example was assuming would be
present. This change makes all such access conditional on the parts being
present. Also added the display of the box version and the creation time in
a human-readable format. This serves to demonstrate the logic for converting
the MP4 epoch (1904-01-01) to Unix epoch (1970-01-01).

* Show creation time as Unix time only
2020-06-04 23:10:33 -07:00
Alf 4a8c4f57b4 cleanup. 2020-01-27 21:58:19 -08:00
Alfred Gutierrez e9936e5f78
Sample boxes and mp4info example updates (#1)
* more sample boxes

* stts and sample box parsing. Update mp4info example with more details.
2020-01-27 21:32:53 -08:00
Alf b345450e19 cleanup on lib and add more mp4info example output. 2020-01-21 21:41:51 -08:00
Alf efd7ac8981 Change main.rs to lib.rs and create example mp4info project. Update readme and license. 2020-01-12 19:33:26 -08:00