© 2020 Elsevier B.V.Video streaming, whether on demand or live, has become one of the most popular internet applications. However, financial investments required for it is a severe problem since it needs more real time storage, higher data transfer and a significant amount of computation than other kinds of multimedia data. To tackle this problem, cloud computing, offering services without investing in hardware or software, emerges as a preferred technology. However, there are a large number of cloud service providers and they offer different pricing strategies for various applications in various regions. Therefore, it is of great importance for them that incoming service requests are assigned to the appropriate cloud services at minimum cost and provide maximum user satisfaction [quality of service (QoS) attributes]. Due to the issues, such as multiple cloud providers, different QoS requirements, different service level agreements and uncertainties in demand, price and availability, the optimization of resource allocation present further challenges. The objective of our study is to optimize the cost and performance of video on demand applications using cloud content delivery networks, storage and transcoders based on the QoS requirements of users. To solve the NP-hard problem, Particle Swarm Optimization (PSO) technique is used due to the easiness in its concept and coding, less sensitive to the nature of the objective function, limited number of parameters and generating high quality solution within a short time. We propose a new method in which the optimum solution is affected not only by the best solution of the particle and global best solution but also by the best solution of the neighborhood particles in that iteration. This ternary approach is implemented into the well-known discrete and constrained PSO, achieving the minimum cost with user satisfaction for allocation of video requests to cloud resources. Although the proposed method yields better results in terms of accuracy, execution time of the algorithm is not reasonable. To overcome this inefficiency; ternary approach is embedded into multi-swarm PSO and it is parallelized and combined with greedy heuristic algorithms. The results of the comparison with the benchmarking algorithms show that our proposed method yields better results from the standpoint of both accuracy and execution time.