Shoebox
This article is a stub. You can help the IndieWeb wiki by expanding it.
Shoebox is the name of a future p3k application that manages files and acts as a micropub media endpoint. This page currently exists to collect brainstorming ideas and requirements for the project and document its progress.
Views
The main application will have the following primary views for interacting with media.
Recently Added / Uncategorized
- Show recent files added, grouped by source
- Screenshots from laptop
- Photos from phone
- Photos from camera (eye-fi card?)
- Scanned documents
- Provide an interface that allows quick selection of multiple files and add tags to the selection
- Mark files as "complete" to remove them from this view
Tag View
Albums
- Like Flickr albums
File Details
The following file types are supported natively. Any other file can be uploaded, although Shoebox will not know how to present it or generate thumbnails and will just appear as an unknown file.
- Images (jpg, png, gif, heic?)
- requires ImageMagick
- Video (mp4, mov)
- requires ffmpeg
- Audio (mp3, wav, m4a)
- requires bbc/audiowaveform
- PDFs
- requires ImageMagick
- txt
Properties
- Name
- Description
- Transcription (text of a PDF, video, audio. used for search)
- Tags
- Associated with one or more URLs
- e.g. when used in a blog post or photo post
- Meta Attributes
- EXIF data (shutter speed, aperture, ISO, camera name, lens name)
- Dimensions
- Duration
- Pages (PDF)
- Source
- user-created name of source device
- may be automatically set via which access token was used to upload a file
- e.g. Scanner, Digital Camera, Phone, Screenshot
Micropub Support
This application can also be used as a Micropub media endpoint.
Brainstorming
Unorganized braindump thoughts that should be pulled out into separate sections later.
- A file's unique identifier is the hash of its contents
- The file can live anywhere on the filesystem. This is specifically so that the user can rearrange the files on disk however makes sense, and Shoebox will be able to find it again.
- The DB index knows where to find the file data by looking up the hash in the table
- Associated files (thumbnails, etc) can be stored on disk named with this hash
- Link the JPG and RAW versions of a file
- Should this allow linking any number of files? e.g. an edited photo and its original?
- Look for matching filename in the same folder, e.g. IMG0001.JPG and IMG0001.ARW
- Automatic tagging of images like Flickr
- Might need to send photos to a third-party API for tagging, such as https://developer.clarifai.com/
- Could upload a backup to Flickr as well, and pull down the automatic tags they add
- Folder structure:
/2019/11 Nov/Event Name
/2019/11 Nov/Event Name/Sub Event
- add tags to photo based on folder names (e.g. "Event Name", "Sub Event" above)
- should year and month be mandatory? or just ignored when creating tags?
Video Previews
Create a scaled-down preview of a video file:
ffmpeg -i input.mov -c:v libx264 -b:a 96k -s 480x270 -r 30 -strict -2 -movflags faststart -pix_fmt yuv420p preview.mp4
This takes a 124mb 1080p 10bit video and turns it into a 516kb mp4 file.
Todo
- How to handle multiple versions of a file?
- Probably only worry about storing the latest
- Does the file URL change based on the version or based on ...?