To all who store a large amount of media files (videos or image) ...
multi media are often static files and therefore they are by nature "sharable" and can be deduplicated however for this to be possible we all have to come up with the same method to store them.
The IPFS network is ideal for this : an index for 4726 images has only have a size of 414K
I decided to store all my movies under IPFS with the following command :
ls -1S *.mp4 | while read videofile; do
echo "$videofile
ipfs add --nocopy --raw-leaves --trickle --chunker rabin-65536-524288-1048576 -w "$videofile" | tee -a added.log
done
I decided to store all my images under IPFS with the following command :
export IPFS_PATH=/media/IPFS/IMAGES
# ipfs add --raw-leaves --trickle --chunker size-1048576 -w --hash sha1 $imagefile
WWW=/usr/local/share/doc/civetweb/public_html/
find $WWW -name *.png -exec ipfs add --raw-leaves --trickle --chunker size-1048576 --hash sha1 {} \; | tee -a added.log
find $WWW -name *.jpg -exec ipfs add --raw-leaves --trickle --chunker size-1048576 --hash sha1 {} \; | tee -a added.log
find . -name "*.jpg" -exec ipfs add --progress=false --raw-leaves --trickle --chunker size-1048576 --hash sha1 {} \;| tee -a added.log
I would be nice too to give a media file a universal name; why not choosing its "SHA1" as a basename (encoded in base36)