The fifth generation of mobile communication networks (5G) is an emerging paradigm that can accommodate more audiovisual entertainment video sites from mobile applications and the video quality can be greatly improved by reducing latency. Due to the limited multimedia resources and insufficient bandwidth, it is of great importance to allocate multimedia resources reasonably and enhance user experience. Although researchers have proposed many resources allocation mechanisms, most of them focus only on maximizing system efficiency. Considering system efficiency, transmission delay and the profit of service providers, an optimal multimedia resources allocation algorithm in the 5G edge cloud networks is proposed from the perspective of service providers. Based on the Lyapunov stochastic profit maximization algorithm, system efficiency, transmission delay and the profit of service providers are regarded as performance indicators and the multimedia resources allocation problem is transformed into queue stability issues. Finally, rigorous analyses and simulation experiments show the performance of Lyapunov stochastic profit maximization algorithm in multimedia resources allocation.