mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 03:11:24 +00:00
Add collision and video transcode documenation
This commit is contained in:
parent
12de990dee
commit
8abb177984
1 changed files with 19 additions and 0 deletions
|
@ -270,9 +270,28 @@ For all configuration options regarding media, see the example
|
|||
|
||||
### Improved Collision Resistance
|
||||
|
||||
Previously, pict-rs relied on a sha256 hash of uploaded media's bytes in order to detect which files
|
||||
where the same, and which were unique. I have not heard of any existing problem with this behavior,
|
||||
however, as pict-rs becomes more widely deployed I want to ensure that deduplication does not happen
|
||||
erroneously. In the event of a hash collision between two different pieces of media, pict-rs would
|
||||
consider them duplicates and discard the newly uploaded file in favor of the one it already stored.
|
||||
This would lead to the wrong media being served for a user. In order to reduce the chances of a
|
||||
collission, pict-rs 0.5 now includes the media's file length and a marker indicating it's content
|
||||
type as part of it's unique identifier. This maintains the behavior of identical media being
|
||||
deduplicated, while making collisions far less likely to occur.
|
||||
|
||||
|
||||
### Optional Video Transcoding
|
||||
|
||||
In pict-rs 0.4, all videos that were uploaded were transcoded from their original format to either
|
||||
pict-rs' default format, or a format specified with configuration. pict-rs 0.5 removes the default
|
||||
"vp9" video codec, and allows uploaded videos to maintain their original codec and format, provided
|
||||
pict-rs supports it. This means uploaded h264, h265, vp8, vp9, and av1 videos no longer need to be
|
||||
decoded & encoded during the upload process aside from detecting their metadata.
|
||||
|
||||
This behavior is enabled by default, but for administrators who have configured a non-default video
|
||||
codec, this can be enabled by removing the video_codec and audio_codec configurations.
|
||||
|
||||
|
||||
### Library API Changes
|
||||
|
||||
|
|
Loading…
Reference in a new issue