ffmpeg stills to GIF: workflow streamlining











up vote
0
down vote

favorite












I'm having a great time revisiting ffmpeg and tinkering about, but can anybody assist me with streamlining the 'still image/add cross-fade/save as gif' process, please?



I'm trying to eradicate the need to convert still pictures to an intermediate video file (to add a cross-fade) before reading through the video to extract a gif palette file and then reading through it a second time to convert the video to gif. (My efforts are unpleasant to see and the palette file is, so far, unreadable).



Can anybody tell us if it's feasible to use the video creation routine below to feed the palette creation, and then the final gif, directly? (Or to pick up the palette stream and get the thing done in one pass?)
It isn't that rm and del aren't options, system depending, but the fewer intermediate processes, the less to go wrong when my back's turned.



 ffmpeg -i "nlm%2d.png" -vf 
zoompan=d=4/3:fps=1/3,framerate=25:interp_start=0:interp_end=255:scene=100 -
c:v mpeg4 -b:v 5M -q:v 0 out.mp4

F:UsersQuinBWF - ffmpegcrossfade>dir

13/11/2018 21:35 28,553 nlm01.png
13/11/2018 21:35 26,351 nlm02.png
13/11/2018 21:35 28,400 nlm03.png
13/11/2018 21:35 31,235 nlm04.png
13/11/2018 21:35 34,553 nlm05.png
14/11/2018 11:50 1,177,150 out.mp4


Having created the mp4 file, we're using the well-known (and almost unmodified) sequence:



ffmpeg -v warning -i out.mp4 -vf fps=10,palettegen -y out_palette.png

ffmpeg -v warning -i out.mp4 -i out_palette.png -lavfi "fps=10[x]; [x][1:v] paletteuse" -y out.gif


With thanks to the forum folk who've shared their knowledge and been responsible for much of my ffmpeg education already.
QB



Sources:
FFMPEG An Intermediate Guide/image sequence



High quality GIF with FFmpeg










share|improve this question


























    up vote
    0
    down vote

    favorite












    I'm having a great time revisiting ffmpeg and tinkering about, but can anybody assist me with streamlining the 'still image/add cross-fade/save as gif' process, please?



    I'm trying to eradicate the need to convert still pictures to an intermediate video file (to add a cross-fade) before reading through the video to extract a gif palette file and then reading through it a second time to convert the video to gif. (My efforts are unpleasant to see and the palette file is, so far, unreadable).



    Can anybody tell us if it's feasible to use the video creation routine below to feed the palette creation, and then the final gif, directly? (Or to pick up the palette stream and get the thing done in one pass?)
    It isn't that rm and del aren't options, system depending, but the fewer intermediate processes, the less to go wrong when my back's turned.



     ffmpeg -i "nlm%2d.png" -vf 
    zoompan=d=4/3:fps=1/3,framerate=25:interp_start=0:interp_end=255:scene=100 -
    c:v mpeg4 -b:v 5M -q:v 0 out.mp4

    F:UsersQuinBWF - ffmpegcrossfade>dir

    13/11/2018 21:35 28,553 nlm01.png
    13/11/2018 21:35 26,351 nlm02.png
    13/11/2018 21:35 28,400 nlm03.png
    13/11/2018 21:35 31,235 nlm04.png
    13/11/2018 21:35 34,553 nlm05.png
    14/11/2018 11:50 1,177,150 out.mp4


    Having created the mp4 file, we're using the well-known (and almost unmodified) sequence:



    ffmpeg -v warning -i out.mp4 -vf fps=10,palettegen -y out_palette.png

    ffmpeg -v warning -i out.mp4 -i out_palette.png -lavfi "fps=10[x]; [x][1:v] paletteuse" -y out.gif


    With thanks to the forum folk who've shared their knowledge and been responsible for much of my ffmpeg education already.
    QB



    Sources:
    FFMPEG An Intermediate Guide/image sequence



    High quality GIF with FFmpeg










    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm having a great time revisiting ffmpeg and tinkering about, but can anybody assist me with streamlining the 'still image/add cross-fade/save as gif' process, please?



      I'm trying to eradicate the need to convert still pictures to an intermediate video file (to add a cross-fade) before reading through the video to extract a gif palette file and then reading through it a second time to convert the video to gif. (My efforts are unpleasant to see and the palette file is, so far, unreadable).



      Can anybody tell us if it's feasible to use the video creation routine below to feed the palette creation, and then the final gif, directly? (Or to pick up the palette stream and get the thing done in one pass?)
      It isn't that rm and del aren't options, system depending, but the fewer intermediate processes, the less to go wrong when my back's turned.



       ffmpeg -i "nlm%2d.png" -vf 
      zoompan=d=4/3:fps=1/3,framerate=25:interp_start=0:interp_end=255:scene=100 -
      c:v mpeg4 -b:v 5M -q:v 0 out.mp4

      F:UsersQuinBWF - ffmpegcrossfade>dir

      13/11/2018 21:35 28,553 nlm01.png
      13/11/2018 21:35 26,351 nlm02.png
      13/11/2018 21:35 28,400 nlm03.png
      13/11/2018 21:35 31,235 nlm04.png
      13/11/2018 21:35 34,553 nlm05.png
      14/11/2018 11:50 1,177,150 out.mp4


      Having created the mp4 file, we're using the well-known (and almost unmodified) sequence:



      ffmpeg -v warning -i out.mp4 -vf fps=10,palettegen -y out_palette.png

      ffmpeg -v warning -i out.mp4 -i out_palette.png -lavfi "fps=10[x]; [x][1:v] paletteuse" -y out.gif


      With thanks to the forum folk who've shared their knowledge and been responsible for much of my ffmpeg education already.
      QB



      Sources:
      FFMPEG An Intermediate Guide/image sequence



      High quality GIF with FFmpeg










      share|improve this question













      I'm having a great time revisiting ffmpeg and tinkering about, but can anybody assist me with streamlining the 'still image/add cross-fade/save as gif' process, please?



      I'm trying to eradicate the need to convert still pictures to an intermediate video file (to add a cross-fade) before reading through the video to extract a gif palette file and then reading through it a second time to convert the video to gif. (My efforts are unpleasant to see and the palette file is, so far, unreadable).



      Can anybody tell us if it's feasible to use the video creation routine below to feed the palette creation, and then the final gif, directly? (Or to pick up the palette stream and get the thing done in one pass?)
      It isn't that rm and del aren't options, system depending, but the fewer intermediate processes, the less to go wrong when my back's turned.



       ffmpeg -i "nlm%2d.png" -vf 
      zoompan=d=4/3:fps=1/3,framerate=25:interp_start=0:interp_end=255:scene=100 -
      c:v mpeg4 -b:v 5M -q:v 0 out.mp4

      F:UsersQuinBWF - ffmpegcrossfade>dir

      13/11/2018 21:35 28,553 nlm01.png
      13/11/2018 21:35 26,351 nlm02.png
      13/11/2018 21:35 28,400 nlm03.png
      13/11/2018 21:35 31,235 nlm04.png
      13/11/2018 21:35 34,553 nlm05.png
      14/11/2018 11:50 1,177,150 out.mp4


      Having created the mp4 file, we're using the well-known (and almost unmodified) sequence:



      ffmpeg -v warning -i out.mp4 -vf fps=10,palettegen -y out_palette.png

      ffmpeg -v warning -i out.mp4 -i out_palette.png -lavfi "fps=10[x]; [x][1:v] paletteuse" -y out.gif


      With thanks to the forum folk who've shared their knowledge and been responsible for much of my ffmpeg education already.
      QB



      Sources:
      FFMPEG An Intermediate Guide/image sequence



      High quality GIF with FFmpeg







      ffmpeg images video-conversion






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 14 at 17:15









      Quin Benson

      32




      32






















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          Use



           ffmpeg -i "nlm%2d.png"
          -filter_complex "zoompan=d=4/3:fps=1/3,framerate=25:interp_start=0:interp_end=255:scene=100,
          fps=10,split=2[pal][vid];[pal]palettegen[pal];[vid]fifo[vid];
          [vid][pal]paletteuse" -y out.gif





          share|improve this answer





















          • Better than I ever hoped – thanks for sharing.
            – Quin Benson
            Nov 14 at 19:51











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "3"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1375391%2fffmpeg-stills-to-gif-workflow-streamlining%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          0
          down vote



          accepted










          Use



           ffmpeg -i "nlm%2d.png"
          -filter_complex "zoompan=d=4/3:fps=1/3,framerate=25:interp_start=0:interp_end=255:scene=100,
          fps=10,split=2[pal][vid];[pal]palettegen[pal];[vid]fifo[vid];
          [vid][pal]paletteuse" -y out.gif





          share|improve this answer





















          • Better than I ever hoped – thanks for sharing.
            – Quin Benson
            Nov 14 at 19:51















          up vote
          0
          down vote



          accepted










          Use



           ffmpeg -i "nlm%2d.png"
          -filter_complex "zoompan=d=4/3:fps=1/3,framerate=25:interp_start=0:interp_end=255:scene=100,
          fps=10,split=2[pal][vid];[pal]palettegen[pal];[vid]fifo[vid];
          [vid][pal]paletteuse" -y out.gif





          share|improve this answer





















          • Better than I ever hoped – thanks for sharing.
            – Quin Benson
            Nov 14 at 19:51













          up vote
          0
          down vote



          accepted







          up vote
          0
          down vote



          accepted






          Use



           ffmpeg -i "nlm%2d.png"
          -filter_complex "zoompan=d=4/3:fps=1/3,framerate=25:interp_start=0:interp_end=255:scene=100,
          fps=10,split=2[pal][vid];[pal]palettegen[pal];[vid]fifo[vid];
          [vid][pal]paletteuse" -y out.gif





          share|improve this answer












          Use



           ffmpeg -i "nlm%2d.png"
          -filter_complex "zoompan=d=4/3:fps=1/3,framerate=25:interp_start=0:interp_end=255:scene=100,
          fps=10,split=2[pal][vid];[pal]palettegen[pal];[vid]fifo[vid];
          [vid][pal]paletteuse" -y out.gif






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 14 at 19:12









          Gyan

          13.8k21641




          13.8k21641












          • Better than I ever hoped – thanks for sharing.
            – Quin Benson
            Nov 14 at 19:51


















          • Better than I ever hoped – thanks for sharing.
            – Quin Benson
            Nov 14 at 19:51
















          Better than I ever hoped – thanks for sharing.
          – Quin Benson
          Nov 14 at 19:51




          Better than I ever hoped – thanks for sharing.
          – Quin Benson
          Nov 14 at 19:51


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1375391%2fffmpeg-stills-to-gif-workflow-streamlining%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Список кардиналов, возведённых папой римским Каликстом III

          Deduzione

          Mysql.sock missing - “Can't connect to local MySQL server through socket”