M5Tube is a video player for M5Stack.
M5Tube is also a video conversion utility, it can be used locally or in a Docker image.
- M5Stack
- External DAC (e.g PCM5102) connected to the I2S
- MicroSD Card
- either:
- create "/mp3", "/vid" and "/json" folders on the MicroSD Card
- use the SD-Apps-Folder folder structure from the M5Stack-SD-Updater
- either:
- install docker and start the provided docker image
- install ffmpeg + imagemagick + php locally
- run the script 'workflow.sh' to get your videos converted
- when conversion is complete, choose between:
- having the container's working dir exposed by a web server
- copying the contents of /vid, /mp3 and /json folders from the container's working dir to your MicroSD Card
The conversion utily provided with this projects makes the process of converting the video to an acceptable format for the M5Stack much less painful. The mp4 format is required for the source file and audio is mandatory for the conversion to complete. After the audio is converted and recompressed to mp3 mono @32Kbps/22Khz, the video is split into frames, and each frame is split into 4 chunks. Only one of these 4 chunks is kept, converted into JPEG with variable compression rate, and stacked into a file. Custom conversion settings are available such as video width and processed chunks per second.
- select video
- play video
- stop video
- synchronize/download playlist
- synchronize/download video/audio
- load the M5Stack-SD-Menu
All videos are played from the SD and can't be paused (only stopped but PR's accepted).
The sync/download is optional but requires to have a web server handling TLS and exposing the video/audio/json files, some editing in the .ino file, and the gathering of the TLS certificate chain for certificates.h.
Any successful sync operation will overwrite the local files.