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

118 commits

Author SHA1 Message Date
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
Alf 0cd2abb60a 0.12.0 2022-07-30 01:24:49 -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
nemosupremo 00385bad0b
Writer: Set mvhd/tkhd/mdhd version to 1 if duration is greater than u32::MAX (#76) 2022-06-14 21:44:59 -07:00
TamDik cc9bf192fa
Fix code example (#75) 2022-06-02 22:21:48 -07:00
Alf 21afff228c 0.11.0 2022-06-01 21:26:07 -07:00
Alf 87933a23da 0.10.1 2022-06-01 21:24:42 -07:00
Alfred Gutierrez 80aabdf549
Update README.md 2022-05-31 20:54:29 -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
nemosupremo 33959766d4
Mp4Writer should use co64 by default, then convert to stco is possible for compatibility (#71) 2022-05-24 17:37:25 -07:00
Data Retriever 7218ada431
Proper handle display matrix (#72) 2022-05-24 17:32:31 -07:00
Data Retriever 084381bde5
Do not fail if media info fails (#70) 2022-04-20 18:43:18 -07:00
Alf 93dbb56464 lint: fix warnings from unused imports. 2022-03-25 21:06:48 -07:00
Alf 02b87d3ce7 0.10.0 2022-03-25 20:28:48 -07:00
Christopher b48066fec4
expose all box types (#61) 2022-03-25 20:13:02 -07:00
Alf b749eaa064 chore: remove travis config and badge. 2022-03-25 20:07:05 -07:00
Alex 12ba304023
Support profiles > 31 in DecoderSpecificDescriptor (#69) 2022-03-25 20:02:50 -07:00
Alf 49f9ed0432 0.9.2 2021-12-23 18:55:47 -08:00
Alfred Gutierrez e7f5f71ae3
bugfix: break reader loop if BoxHeader is size zero to prevent dead-loop. (#65) 2021-12-23 18:49:01 -08:00
Alf 7be2ebe49d 0.9.1 2021-12-21 20:08:56 -08:00
ahkrr b4e43c21c2
upgrade dependencies (#62)
bytes 0.5 -> 1.1.0
num-rational 0.3 -> 0.4.0

Co-authored-by: ahkrr <alexhk@protonmail.com>
2021-12-21 19:59:48 -08:00
Alf 2849d4d791 0.9.0 2021-07-30 20:40:19 -07:00
cTopher 60b6d56704
Emsg box (#60)
* EmsgBox implementation (#59)

* read emsgs (#59)
2021-07-30 19:20:32 -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 94f9e88b2d 0.8.3 2021-07-12 18:16:28 -07:00
Nathan Fiedler 56cc260a5c
fix: minimize assertions in non-test code (#56)
Initial effort to reduce or eliminate the use of assertions in the
production code (i.e. not test code). See issue 43 for an example of how
this can cause an application (thread) to panic when reading an unusual
file. Not all of the changes were as simple as returning an Err, since some
functions did not return a Result. Also, the error type used (InvalidData)
is just a catch-all with a message, and in some cases a more refined error
type may be in order.

cargo test passes
2021-07-12 17:28:39 -07:00
Alf 751a2221af 0.8.2 2021-04-04 12:01:21 -07:00
Alfred Gutierrez 28dd9e0a27
feat: add more audio object types (#52) 2021-04-04 11:56:02 -07:00
Kasper 335aa39f7c
Add mpeg_aac_decoder example (#50)
* Add mpeg_aac_decoder example

* Convert mpeg_aac_decoder example to it's own package
2021-02-01 17:11:35 -08:00
Alf b59758c7df 0.8.1 2021-01-31 19:30:05 -08:00
Alfred Gutierrez 0d2d2547d1
bugfix: fix size when parsing largesize box header (#49) 2021-01-31 11:47:28 -08:00
Alfred Gutierrez 75599fe561
feat: add Freq7350 to SampleFreqIndex enum (#47) 2021-01-30 00:14:40 -08:00
ninthakeey eedccec776
Example/mp4sample supports fragmented mp4 (#46)
* feat: mvex box中的mehd box改为可选,支持fmp4的解析

* feat: example/mp4sample supports fragmented mp4

* feat: utilize function sample_count(), extract duplicated codes as a new function

* feat: field data_offset in TrunBox is optional

* feat: remove an ".expect()"

* feat: remove an ".expect()"

* chore: re-style code
2021-01-28 19:52:35 -08:00
Alf 4d2b5acf9e Update and add example for Mp4Writer<W>.into_writer. 2021-01-27 18:53:24 -08:00
John-John Tedro 8fd133eccf
Store 4 bytes in FourCC instead of a String (#45) 2021-01-27 18:51:03 -08:00
John-John Tedro d73e80107d
Add Mp4Writer::into_writer (#44) 2021-01-27 18:07:21 -08:00
Alf 2a33b990e6 0.8.0 2021-01-26 21:18:20 -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
Alf 9e8f27be2a 0.7.2 2020-12-24 17:38:35 -08:00
Alfred Gutierrez 9c43838793
bugfix: fix update_sync_samples in Mp4TrackWriter where sync is not properly set in stss box #38 (#39) 2020-12-24 17:35:13 -08:00
Alfred Gutierrez b63522186e
Update mp4sample.rs 2020-12-16 01:14:04 -08:00
Alf 4bf4a98414 0.7.1 2020-11-23 13:55:31 -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 098de52658
Update README.md 2020-09-17 22:01:23 -07:00
Alf 95ce57363a 0.7.0 2020-09-14 20:05:03 -07: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 6ec013b7b9
Fragmented tracks (#31)
* Add trun box.

* Adding Movie Extends Box and subboxes (mvex, mehd, trex).

* Adding more support for parsing fragmented tracks. Add mp4sample example.

* cleanup

* Set default_sample_duration from moov.mvex.trex for getting fragmented samples.

* fix trex box parsing/writing.
2020-09-14 18:05:34 -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
Alf a1f7902c6c Skip serializing edts if Option::is_none. 2020-09-09 21:02:38 -07:00