diff --git a/README.md b/README.md index ba5d14f..ce81c7e 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,17 @@ The inspiration came from the following ffmpeg command ``` -Although the final usage will not be quite like that +Although the final usage will not be quite like that in fact `recorder.js` will give the full picture, but when recording the resultant equiavalent +command line script is the following (with `out.flac` replaced with a filename with an iso timestring it it). This is the command for the +scarlett 2i2, but a very similar command is used with a yeti blue microphone. +``` +ffmpeg -hide_banner -f alsa -acodec pcm_s32le -ac:0 2 -ar 192000 -i hw:CARD=USB -filter_complex asplit=2[main][vol],[vol]showvolume=rate=25:f=0.95:o=v:m=p:dm=3:h=80:w=480:ds=log:s=2[vid] -map [main] -f s32le -acodec flac pipe:1 -map [vid] -preset ultrafast -g 25 -an -sc_threshold 0 -c:v:1 libx264 -b:v:1 1000k -maxrate:v:1 1100k -bufsize:v:1 2000k -f hls -hls_time 4 -hls_flags delete_segments+temp_file -strftime 1 -hls_segment_filename volumes/volume-%Y%m%d-%s.ts volumes/volume.m3u8 | ffmpeg -hide_banner -f s32le -i pipe:0 recordings/out.flac +``` + +At this point in time the web client is a very limited *proof of concept* page, but the server is very much close to working. The various api calls +support to concept of a user **take** control of an interface, which in essence locks it from another client doing the same. This control lasts for 5 minutes unless **renew**ed by the client. The client can voluntarily **release** control. A *jwt* is used to provide some very rudementary security to this api. When taking control, assuming noone else has already done so, an *jwt* is created and returned. That must be provided on all subsequent commands (including **start** and **stop** recording as well as the *release* and *renew* commands mentioned above). + +We also use *sse* to provide a subscription service to clients. Events are provided to keep the client aware of the state of the server **status** events enumerate the current state **add** and **remove** events are fired when a microphone/interface is *plugged in* or *removed* and **take** and **release** events are fired when a user (including the client itself) *takes* or *release* control through the api. Again we use a very crude token for the user to provide his subscription just using `Date.now()`, since this is likely to be a private service with mostly one client and occassionally a couple, so the max we assume is an iPad, maybe a phone and or a PC as well all operated bu the same person. -ffmpeg -hide_banner -f alsa -acodec pcm_s32le -ac:0 2 -ar 192000 -i hw:CARD=USB -filter_complex asplit=2[main][vol],[vol]showvolume=rate=25:f=0.95:o=v:m=p:dm=3:h=80:w=480:ds=log:s=2[vid] -map [main] -f s32le -acodec flac pipe:1 -map [vid] -preset ultrafast -g 25 -an -sc_threshold 0 -c:v:1 libx264 -b:v:1 1000k -maxrate:v:1 1100k -bufsize:v:1 2000k -f hls -hls_time 4 -hls_flags delete_segments+temp_file -strftime 1 -hls_segment_filename volumes/volume-%Y%m%d-%s.ts volumes/volume.m3u8 | ffmpeg -hide_banner -f s32le -i pipe:0 out.flac +I am considering how to proceed with a more complex client that the one currently provided.