The document presents VE-Match, a video encoding matching model aimed at optimizing costs and energy consumption in cloud and edge computing for video encoding applications. By employing game-theoretic principles, VE-Match achieved significant reductions, including 77.85% in cost and 45.42% in energy, while also reducing CO2 emissions by 80%. Experimental results validate the model's effectiveness in varying operational scenarios.