[FFmpeg-user] FFPLAY

Anatoly anatoly at kazanfieldhockey.ru
Wed Sep 20 03:10:18 EEST 2023


On Tue, 19 Sep 2023 15:08:18 +0700
faut_voir <fautvoirplusclair at gmail.com> wrote:

> Hello,
> 
> 
> _I've spent a lot of time to look for an answer about my 2 questions 
> whithout success_ :
> 
> 
> *# QUESTION 1*
> 
> I would like to play a movie's file on my computer, but select and
> play directly by the command line, the audio and subtitle files.
Read this (-map):
https://ffmpeg.org/ffmpeg.html#toc-Stream-selection
...snip...
> *# QUESTION 2*
> 
> _In one folder, call "music"_, I have more than 1.000 folders. Each 
> contains the songs of one CDs in .wav audio format, I ripped.
> 
> For on file only, I've found this command line wich works well, BUT
> ONLY SONGS INSIDE ONE FILE ONLY !!!  ==>
> 
> /for f in *.wav .flac .ogg ; do ffplay -nodisp -autoexit -hide_banner 
> "$f"; done/
> 
> Could you please tell//me what is the command line to play musics
> files which are inside the folder "music"
This question is not about ffplay, it is about shell scripting,
however...
find /path/to/music/ -type f -exec ffplay -autoexit -hide_banner -nodisp {} \;
> and the option to add if I
> want to listen randomly ?
Two steps then.
find /path/to/music/ -type f > filelist.txt
while [ 1 ]; do ffplay -autoexit -hide_banner -nodisp "`shuf -n 1 filelist.txt`"; done
> 
> 
> When I'll get your answer, may I share it on the ubuntu and debian 
> french websites for ffmpeg documentations ?
I give you away all the text and code of personally my answer under BSD
Zero Clause License (0BSD). Or CC if you prefer.



More information about the ffmpeg-user mailing list