# -*- coding: UTF-8 -*-
import winsound
winsound.PlaySound("01.mp3",winsound.SND_ASYNC)



#coding:utf8
from playsound import playsound
playsound('ohayou.wav')


from pygame import mixer
import time
mixer.init()
mixer.music.load('output.wav')
mixer.music.play()
time.sleep(5)
mixer.music.stop()











# -*- coding: UTF-8 -*-
import subprocess,sys,os
import re
#reload(sys)
#sys.setdefaultencoding("utf-8")


ffmpegPath=r"D:\LenovoC\ffmpeg\bin\ffmpeg.exe"
ffplayPath=r"D:\LenovoC\ffmpeg\bin\ffplay.exe"
ffprobePath=r"D:\LenovoC\ffmpeg\bin\ffprobe.exe"

def getVideoData(path):
cmd= ffplayPath + " -nodisp " + path
cmd=cmd.encode(sys.getfilesystemencoding())
if "?" in cmd:
cmd=cmd.replace("?","")
print cmd
subprocess.call(cmd , shell=True)

path=r"C:\Users\Administrator\Desktop\sound\01.mp3"
getVideoData(path)
#调用ffmpeg,成功播放音乐,但有GUI界面,加上“-nodisp ”去除GU界面。