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

12 commits

Author SHA1 Message Date
emkman99 19e4eaa3c8
Extract esds box from wave box (#96)
* Extract esds from wave box

* Allow empty, multi-byte, and arbitrary NUL terminated strings

* Skip unsupported avc1 sub-boxes

* Fixed non-integer framerates

* Fixed bitrate calculation

* Fixed format issue

* Public read sample offset

* Fix lint warning.

---------

Co-authored-by: Alfred Gutierrez <alfg@users.noreply.github.com>
2023-08-02 21:13:58 -07:00
jensenn b90e43dd9c
Fix getting samples from movie fragments (#106)
* Fix getting samples from movie fragments

* Add a function to the reader to read in fragments from a different reader

---------

Co-authored-by: Alfred Gutierrez <alfg@users.noreply.github.com>
2023-08-02 20:53:43 -07:00
Ririsoft ace2799c75
read metadata from udta (#77)
This introduces the 'Metadata' trait to enable access
to common video metadata such
title, year, cover art and more.

Reading 'title', 'description', 'poster' and 'year'
metadata is implemented here.
2022-07-20 19:05:38 -07:00
Ririsoft 5d648f1a72
fix clippy & enhance CI/CD (#78)
* fix clippy::unused_io_amount

See related clippy documentation,
but in short some partial reads can occur
in particular with io on the networl.
read_exact/write_all transparently handle such errors.

The fix actually revealed a bug
in 'mp4a' atom parsing, but this is a dangerous change:
Parsing bugs that were transparently ignored
are now failing with error (unattended io eof).

* fix trivial clippy errors

* fix clippy error with always 0 value

* run ci/cd with clippy and latest rust version
2022-07-07 20:02:00 -07:00
Data Retriever 3ecfd0cc9d
Cargo fmt and clippy (#73)
* Run cargo clippy --fix

* Run cargo fmt --all
2022-05-31 20:50:49 -07:00
Alex 12ba304023
Support profiles > 31 in DecoderSpecificDescriptor (#69) 2022-03-25 20:02:50 -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 8def228352 Add support for reading/writing fragmented mp4 (fMP4) boxes. 2020-09-03 21:33:45 -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
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