Results 1 to 7 of 7

Thread: how to get ffplay to play multiple files one after the other

  1. #1
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan Norwich
    Beans
    2,326
    Distro
    Lubuntu 22.04 Jammy Jellyfish

    how to get ffplay to play multiple files one after the other

    i cannot seem to manage this


    it is not important but i am curious how to get ffplay to play multiple files in a folder one after the other



    it wants a filename and does accept wildcard *


    so i tried

    Code:
     for in *.m4a ; do ffplay "$f" "${f%.m4a}.*" ; done
    and

    Code:
    while true ; do ffplay *m4a ; done

    and no dice


    would any of you who actually know how to get this to work


    i just want to know if it can be done easily
    Last edited by shantiq; October 9th, 2012 at 11:43 AM.
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community ie 50 brains are better than one
    Playing with Slackware too now ...
    ShanArt

  2. #2
    Join Date
    Jan 2008
    Location
    Manchester UK
    Beans
    13,573
    Distro
    Ubuntu

    Re: how to get ffplay to play multiple files one after the other

    Code:
    for f in *.m4a ; do ffplay -autoexit "$f"; done

  3. #3
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan Norwich
    Beans
    2,326
    Distro
    Lubuntu 22.04 Jammy Jellyfish

    Re: how to get ffplay to play multiple files one after the other

    in the name of Ffmpeg thank you so much nothingspecial


    can see it now in the --help but would never have spotted it as what i was looking for
    this gives one yet another command-line music player in effect


    may add other formats too and done


    for f in nocaseglob nullglob *.{flac,ape,wv,m4a,aac,mp4,mp3,shn,tta,wma} ; do ffplay -nodisp -autoexit "$f"; done

    ffplay --help
    ffplay version N-35917-ge4fe4d0 Copyright (c) 2003-2012 the FFmpeg developers
    built o....................
    -skipframe
    -skipidct
    -idct algo set idct algo
    -ec bit_mask set error concealment options
    -sync type set audio-video sync. type (type=audio/video/ext)
    -autoexit exit at the end
    -exitonkeydown exit on key down
    -exitonmousedown exit on mouse down


    and multiple folders therefore [say cd Music]



    for i in */
    do
    cd "$i"
    for f in nocaseglob nullglob *.{flac,ape,wv,m4a,aac,mp4,mp3,shn,tta,wma} ; do ffplay -nodisp -autoexit "$f"; done
    cd ..
    done
    Last edited by shantiq; October 9th, 2012 at 08:09 PM.
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community ie 50 brains are better than one
    Playing with Slackware too now ...
    ShanArt

  4. #4
    Join Date
    Sep 2006
    Beans
    3,713

    Re: how to get ffplay to play multiple files one after the other

    Adding -nodisp to disable graphical display might be useful here. Otherwise the display will appear for each track and may steal focus, as in pop up in front of your current window; probably depending on your windows manager.

  5. #5
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan Norwich
    Beans
    2,326
    Distro
    Lubuntu 22.04 Jammy Jellyfish

    Re: how to get ffplay to play multiple files one after the other

    Quote Originally Posted by FakeOutdoorsman View Post
    Adding -nodisp to disable graphical display might be useful here. Otherwise the display will appear for each track and may steal focus, as in pop up in front of your current window; probably depending on your windows manager.

    thank you Fake was thinking that on music files that have a picture in them it can be a pain will add it
    Last edited by shantiq; October 10th, 2012 at 09:35 AM.
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community ie 50 brains are better than one
    Playing with Slackware too now ...
    ShanArt

  6. #6
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan Norwich
    Beans
    2,326
    Distro
    Lubuntu 22.04 Jammy Jellyfish

    Set up a player with ffplay...

    =================================================


    That gives us quite a decent ffmpeg command-line musicplayer

    FIRST install
    sudo apt-get-install gnome-open-terminal
    and /or nautilus-terminal



    TO SET UP


    enter in terminal and return


    alias ff='for f in nocaseglob nullglob *.{flac,ape,wv,m4a,aac,mp4,shn,tta,wma} ; do ffplay -nodisp -autoexit "$f"; done'
    then

    Code:
    gedit  ~/.bashrc
    and place

    alias ff='for f in nocaseglob nullglob *.{flac,ape,wv,m4a,aac,mp4,shn,tta,wma} ; do ffplay -nodisp -autoexit "$f"; done'
    at the bottom of page and save


    then
    Code:
     . ~/.bashrc
    in terminal


    From now on you open any music folder right-click choose open with terminal and enter
    Code:
    ff
    THAT IS A QUICK MUSIC PLAYER

    ctrl+c to move to next tune ctrl+z to quit







    ================
    Now all added to guide on how to play music from command-line
    Last edited by shantiq; October 11th, 2012 at 09:02 AM.
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community ie 50 brains are better than one
    Playing with Slackware too now ...
    ShanArt

  7. #7
    Join Date
    Jul 2009
    Location
    Hippiesoldierstan Norwich
    Beans
    2,326
    Distro
    Lubuntu 22.04 Jammy Jellyfish

    Re: how to get ffplay to play multiple files one after the other

    will also play AOB inside a DVDA [as i found out also does VLC]

    so you can use this for more functionality

    for f in nocaseglob nullglob *.{flac,ape,wv,m4a,aac,mp3,mp4,shn,tta,wma,AOB} ; do ffplay -nodisp -autoexit "$f"; done

    read post above to trigger with
    ff
    Last edited by shantiq; November 8th, 2012 at 09:27 PM.
    Linux is Latin for off-the-beaten-track
    what I like MOST about our Ubuntu ... The Community ie 50 brains are better than one
    Playing with Slackware too now ...
    ShanArt

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •