Added new endpoints to support chunked response and to avoid ffmpeg zombie processes:
/cache/[videoId]: Returns the same stream for requested audio
until processing finishes. Useful to avoid multiple requests from creating
zombie instances of ffmpeg. This happens in Chrome, which makes a document
request first and then a media request. The document request makes ffmpeg
to start processing but never finishes.
Firefox properly loads the audio with just one request and allows seeking.
/chunk/[videoId]: Saves mp3 file to disk and returns a stream to it.
This allows data chunks to be sent to the client, which will be able to seek
across the file. Enables Chrome and VLC, for example, to do seeking.
Added new endpoints to support chunked response and to avoid ffmpeg zombie processes:
/cache/[videoId]
: Returns the same stream for requested audio until processing finishes. Useful to avoid multiple requests from creating zombie instances of ffmpeg. This happens in Chrome, which makes a document request first and then a media request. The document request makes ffmpeg to start processing but never finishes. Firefox properly loads the audio with just one request and allows seeking./chunk/[videoId]
: Saves mp3 file to disk and returns a stream to it. This allows data chunks to be sent to the client, which will be able to seek across the file. Enables Chrome and VLC, for example, to do seeking.