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
ffmpeg images video-conversion
add a comment |
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
ffmpeg images video-conversion
add a comment |
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
ffmpeg images video-conversion
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
ffmpeg images video-conversion
asked Nov 14 at 17:15
Quin Benson
32
32
add a comment |
add a comment |
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
Better than I ever hoped – thanks for sharing.
– Quin Benson
Nov 14 at 19:51
add a comment |
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
Better than I ever hoped – thanks for sharing.
– Quin Benson
Nov 14 at 19:51
add a comment |
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
Better than I ever hoped – thanks for sharing.
– Quin Benson
Nov 14 at 19:51
add a comment |
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
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
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
add a comment |
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
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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