Nowadays, video-on-demand (VoD) providers offer multiple-quality video streaming services to users, called as multi-version VoD. Unlike traditional VoD, multi-version VoD providers should consider to allocate bandwidth resource and transcoding computation resource simultaneously. However, most of existing resource allocation works only focused on cost reduction or bandwidth optimization, and they did not consider to allocate transcoding computation resources for multi-version VoD systems. Therefore, how to allocate bandwidth resource and transcoding computation resource simultaneously for multi-version VoD systems is still one major challenge. In this paper, we propose a queue-based and learning-based dynamic resources allocation strategy (QLRA) for virtual streaming media server cluster of multi-version VoD system. First, we analyze the user behavior habits and build the virtual streaming media server cluster as an M/G/n queue system. Based on queueing theory, we can allocate initial resources for virtual streaming media server cluster of multi-version VoD system. Second, taking the changes of the user arrival rate and the workload of multi-version VoD system as feedbacks, we introduce learning automaton to allocate resources dynamically for virtual streaming media server cluster. Third, we evaluate QLRA with other methods, and results show the correctness and effectiveness of our strategy.