5 ms·
A fun thing to do might be have write on on demand video thumbnail player. To do this you'd have a bunch of video files at the back end, specify which one you
by andrewstuart 5y ago
A fun thing to do might be have write on on demand video thumbnail player.
To do this you'd have a bunch of video files at the back end, specify which one you want in the URL, then get Python to run ffmpeg, extracting jpeg frames from the specified video and writing the frames to the ramdrive /dev/shm. As the user rolls the mouse over, some JavaScript changes the img tag to point to the mjpeg server and the video plays.
It should be possible to do this in only four or five extra lines I think.
See the github readme for the correct ffmpeg command line to do this.
I do wonder if there's a way to stream audio in sync.
- foxhop 5y agoI like that. Could be neat if uploaded could specify key frames to jump to to start the preview.
- nemosaltat 5y agoAlso seems like a hacky way to get video to play on my Tesla browser. I could probably couple this with a Raspberry Pi and pipe the audio to Bluetooth for the speakers, then stream the video content from the Pi to a web server that I access through the Tesla browser.