Streaming speech to text standalone worker. Processes audio streams on an WS endpoint
Initiate the server connection by sending a json message.
{"config": {"sample_rate":16000, "metadata":1 }}
Option :
| # For all snippets, check documentation for details and settings. | |
| # encode video from a V4L2 device, using specified settings. | |
| # x265 worked somewhat better here and produced less skips (although uses 10x CPU compared to x264) | |
| ffmpeg -f video4linux2 -framerate 30 -input_format mjpeg -video_size 1920x1080 -i /dev/video6 -c:v libx265 -preset ultrafast -c:a none -crf 20 out.mp4 | |
| # Convert a raw YUYV422 frame from my USB "microscope" to PNG: | |
| # other valid pixel formats are e.g. rgb24 or yuv420p | |
| ffmpeg -f rawvideo -video_size 2592x1944 -pixel_format yuyv422 -i input_yuyv422_2592x1944.dat -f image2 output.png |