diff --git a/releases/0.5.0.md b/releases/0.5.0.md index 0b04294..acfcb5b 100644 --- a/releases/0.5.0.md +++ b/releases/0.5.0.md @@ -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