How to play audio file on windows from command line?

前端 未结 11 1004
臣服心动
臣服心动 2020-12-10 02:41

In Windows, is there a simple way (i.e. something you could type on a single command line) to just play a couple of .mp3 files and then exit on its own?

wmplayer, f

11条回答
  •  一个人的身影
    2020-12-10 03:27

    You can use fmedia to play audio files from Windows terminal:

    fmedia file1.mp3 file2.mp3
    

    This command will start the playback of file.mp3, then file2.mp3, and then quit after the files have finished playing.

    If you wish to do it in background, add --background switch to your command:

    fmedia file.ogg --background
    

    This command will start a new process in background and detach from your console immediately.

    fmedia is a portable application (works without installation) and consumes very small amount of system resources. Also, its startup time is instantaneous.

    P.S. Use command fmedia.exe --install to add it to your %PATH% environment variable, otherwise you need to execute it with full path, e.g. D:\fmedia\fmedia.exe

提交回复
热议问题