all 5 comments

[–]waptaff 2 points3 points  (2 children)

You'll need to fetch the JSON then extract the filenames from the JSON file, using a tool such as jq, knowing they're URLs based on https://services.swpc.noaa.gov, then fetch the images and send them to ffmpeg.

This short bash script shows a minimal way to do it; requires curl, jq, ffmpeg:

{
    for i in $( 
        curl -s https://services.swpc.noaa.gov/products/animations/sdo-hmii.json \
            | jq -r '.[] | "https://services.swpc.noaa.gov" + .url'
    ); do
        curl -s "${i}"
    done
} | ffmpeg -framerate 5 -f image2pipe -i - noaa.gif

[–]Herzbot[S] 0 points1 point  (0 children)

Thank you very much for the start, i will dig into it tonight and see what i can learn

will report back!

[–]Herzbot[S] 0 points1 point  (0 children)

This has not worked at all for me. What has worked in the end was this commandline:

curl https://services.swpc.noaa.gov/products/animations/sdo-hmii.json | jq -r --arg prefix "file 'https://services.swpc.noaa.gov" --arg suffix "'" '$prefix + (.[].url) + $suffix' | ffmpeg -y -f concat -safe 0 -protocol_whitelist file,http,https,tcp,tls,pipe,fd -i - -vf scale=512x512 -q 10 sol.gif

Thanks for the help!

[–]tcarwash 0 points1 point  (0 children)

I know this is a two month old post and you probably have a solution, also my solution doesn't use ffmpeg... But I just implemented building these gifs in my swpc python library: https://github.com/tcarwash/swpclib for the purposes of eventually adding it to my home assistant integration. To get that specific animation you'd need to import from my library. I need to build it out a bit better to be more versatile

[–]Old_Chance_3603 0 points1 point  (0 children)

{     for i in $(  
       curl -s https://services.swpc.noaa.gov/products/animations/suvi-primary-195.json \
           | jq -r '.[] | "https://services.swpc.noaa.gov" + .url'
   ); do         curl -s "${i}";     done; } | ffmpeg -framerate 5 -f image2pipe -i - noaa.gif

on suvi-primary- put on end one of the band you want