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

23 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 85b8209d5e
Export all boxes to allow more flexible use for writing (#108)
Co-authored-by: Alfred Gutierrez <alfg@users.noreply.github.com>
2023-08-02 20:57:20 -07:00
Alfred Gutierrez 9f10bd335e
clippy: fix warnings from latest stable rust 1.67.0 (#93) 2023-01-30 20:33:32 -08:00
jensenn 9c0f6534bd
Feature/tfdt box (#90)
* Add Tfdt box parsing

* Derive Default for TfdtBox

* Derive Eq for TfdtBox
2023-01-11 20:21:49 -08:00
Jessa 16c1b5d67f
Don't subtract overflow when 64-bit box size is less than 8 (#89)
* don't subtract overflow when 64-bit box size is less than 8

* fix largesize of 8 being conflated with a size of 0
2023-01-09 23:12:14 -08:00
rolleifx c26bdcab59
fix "mdat size too large" (#80)
* fix "mdat size too large"

* fix clippy

* Fix clippy::derive-partial-eq-without-eq
2023-01-05 18:19:47 -08: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
cTopher 60b6d56704
Emsg box (#60)
* EmsgBox implementation (#59)

* read emsgs (#59)
2021-07-30 19:20:32 -07:00
Alfred Gutierrez 0d2d2547d1
bugfix: fix size when parsing largesize box header (#49) 2021-01-31 11:47:28 -08:00
John-John Tedro 8fd133eccf
Store 4 bytes in FourCC instead of a String (#45) 2021-01-27 18:51:03 -08:00
ninthakeey 00b50636b6
example/copy supports vp9-in-mp4 and example/dump supports fmp4 (#41)
* feat: mvex box中的mehd box改为可选,支持fmp4的解析

* feat: support to copy mp4 with vp9 codec, but not support to copy fmp4 with vp9 codec

* Update types.rs

undo unnecessary changes.

* Update types.rs

undo reduce unnecessary changes.

* Update types.rs

* Update mp4copy.rs

Add vp9 code after h265

* Update stsd.rs

Add vp09 after the Hevc

* Update types.rs

Add after the HevcConfig.

* fix: Track.rs add vp9 support

* feat: mp4 writer set vp09 box into stsd box
2021-01-26 19:31:32 -08:00
Jun, Byungwan 8af11652f1
Fix the playback bug in QuickTime and Safari (#34)
* Add dinf box

* Fix desc size bug

* Default value of track flag is TrackEnabled

* Set optional UrlBox in DrefBox
2020-11-23 13:38:05 -08:00
Alfred Gutierrez fba770a00e
Updating docs (#32)
* Updating docs.

* Fix docs tests and update to 0.7.0.
2020-09-14 19:48:00 -07:00
Alfred Gutierrez f8f767dc07
Fragmented boxes (#30)
* Add trun box.

* Adding Movie Extends Box and subboxes (mvex, mehd, trex).
2020-09-13 00:25:08 -07:00
Alfred Gutierrez 0f373b03db
Box summary and to_json traits. (#29)
* Add Mp4Box traits for getting json or text summary for each box.

* fix test and serde version.

* skip serializing entries

* skip serializing sample_sizes

* Add custom serializer for FixedPoint types.
2020-09-08 22:24:34 -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 b4b4dbd49f add support for hev1 box 2020-09-01 20:41:34 -07:00
Alf 4df1097948 Update mp4dump example and update box_size to method in all boxes. 2020-08-24 21:49:58 -07:00
Ian Jun 0abb242037
Refactoring (#17)
* 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

* Rename I/O position moving functions

* skip_read() to skip_bytes()
* skip_read_to() to skip_bytes_to()
* skip_write() to write_zeros()

* Rename I/O position moving functions

* skip_read() to skip_bytes()
* skip_read_to() to skip_bytes_to()

* Ensure skip_bytes() does not go back.

Co-authored-by: Byungwan Jun <unipro.kr@gmail.com>
2020-08-06 20:35:08 -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
Renamed from src/atoms/mod.rs (Browse further)