DescriptionAlthough the eventual solution is supposed to be relatively platform agnostic, need to have a base platform to build on/test against.
The most flexible approach is probably to go with a VM with an eye to porting over to a Raspberry Pi afterwards. The VM should be relatively memory/CPU constrained to help pick up on expected issues on the Pi.
Base specs for the VM are
- 1 vCore
- 512MB RAM
- Debian 8 minimal install
- 1 NIC (to begin with)
- 20GB HD
One limitation of the Pi that will be a little hard to emulate is the effect of the NIC and USB sharing bandwidth. It's unlikely you'd want to write video segments to an SD card given the Pi's propensity for VM corruption, so the output would need to be written to either a USB stick/drive or a RAM disk.
Will start by writing direct to disk until we've got an idea of the memory usage. The Pi2 has 1GB of RAM, so depending on processing requirements and segment size, it may be feasible to create a RAM disk for output to be written to.
Activity
2015-06-16 02:33:28
- encoder/encoder
- root/toor
Before the VM image is published, will add a script to force a reset at first login.
root is not currently permitted to login via SSH, encoder can do so and then use su or sudo
2015-06-16 02:53:38
2015-06-17 02:13:08
The process_ingress script moves the file from the ingress directory into a processing directory (currently /var/inprogress) and then calls HLS-Stream-Creator against it to create an Adaptive stream in /var/www/html/output
2015-06-17 03:11:45
The FFMPEG_FLAGS set tell ffmpeg to disregard any subtitles (useful if uploading a Makostra - mkv).
Because the action is triggered by incron the process also works if you scp a file to /var/ingress.
2015-06-17 07:11:12
tmpfs egress directory
The VM is configured with a dynamically allocated disk image, so was causing a bit of a bottleneck in I/O speeds. Have edited fstab to make /var/www/html/output a tmpfs mount for faster reads/writes (though the contents are obviously lost if the system reboots).
Remote source support
Pushing a file with extension .remote will cause the file to be read. Contents are currently expected to be 1 or 2 lines:
Output bitrates are a comma seperated list (in K). If not present, a default of 128,1024 is used (arbitrary numbers picked to prove the concept).
The location string needs to be in a format that ffmpeg understands, e.g.
The uploaded file will remain in the ingress directory until the stream ends
2015-06-18 03:49:20
- start.lenkeng - start capturing and streaming
- stop.lenkeng - stop any running streams
It's not a particularly clean way of doing it, but it proves the concept until I get a web interface/API in place.
Output is to /var/www/html/output/dvd/
2015-06-18 23:15:28
2016-05-21 11:37:27
View Commit | View Changes
2019-09-09 15:59:52
Realistically, if I wanted to restart work on this, I'd probably start from scratch, so marking as Won't Fix
2019-09-09 15:59:52
2019-09-09 15:59:52