Reputation: 5012
I have a high quality .mp3 file (512 kbps), now depending on the internet connection of the user, I wish to stream the files in different qualities
Eg: A Internet user with a high speed internet connection would be streamed a 256kbps whereas a one with a slow internet connection would be streamed a low quality .mp3 file
Is it possible to do so on the go (while the file is streaming, instead of storing different qualities of sound files of the same track)
Thanks
Upvotes: 2
Views: 3937
Reputation: 5386
It is certainly possible, but I'd say the approach is inefficient. Unless you cache the various files that will be produced, this approach would result in files being transcoded every single time a request is made. If you cache the transcoded files, but a cached version is not available (have not been created yet), the client would have to wait the time it takes to transcode a file (which can easily be 10 or even 20 seconds depending on the length of the file and the speed of the server).
I'd rather just create a low quality version which all clients would receive, say 112 kbps, in advance. It will be a "one size fits all" solution. The files will have a streaming sound quality good enough for most purposes, and most clients. Then I'd have the high quality version available for download.
There might be more advanced solutions out there, but you'll probably end up paying quite a bit for it without gaining too much.
Upvotes: 2