Skip to content
USRADIOGUY

USRadioguy.com

Welcome to USRadioguy.com – Unlocking the Potential of Software Defined Radio

  • Home
    • Home of USRadioguy
    • USRadioguy Newsletter
    • Tried and Tested Hardware
    • What is RTL-SDR?
    • Global Weather Data
  • Satellite Reception
    • Geo Stationary Satellites
      • Geo-stationary Satellite Imagery Reception
      • GOESTOOLS on the PI
      • Update Goestools for GOES 18,19
      • Receiving GOES with SatDump CLI Mode
      • GOES receiving in Windows for SatDump GUI
      • Decoding EWS-G1/EWS-G2
      • GOES GRB Reception WIP
      • Optimizing a WIFI Grid Antenna for Maximum Efficiency
    • APT Satellites
      • APT RECEPTION
      • Satdump for Meteor and NOAA decoding
      • METEOR M2- Series
      • WxtoImg Fix
      • Converting to new TLE format
      • Layering Fire and Hotspot Data on Meteor Sat Imagery
      • HRPT Satellite Tracking and Capture
    • Receiving Other Satellites
      • Inmarsat Decoding
      • Receiving the Funcube Amateur Satellite
    • User Maps and Dish Pointers
      • Satellite Dish Pointer
      • User Global Ground Station Maps
      • Usermap rendered with Cesium
      • Global Map of Govt Dish Stations
    • Satellite Details & Information
      • ORBITAL DYNAMICS 101
      • HRIT/EMWIN & GRB Defined
      • Mesoscale Imagery Defined
      • Viterbi, R/S Errors, Packets
      • GOES BAND IMAGERY
      • Stray Light Zone (SLZ)
      • Drifting a geostationary satellite
      • GOES-R Series Multimedia Tour
      • Online Satellite Imagery and Information
      • Satellite Frequencies
      • Solar and Space Weather
  • Satellite Imagery
    • IMAGERY- Current GOES East & West HRIT Satellite Imagery
    • IMAGERY- GOES 16&18 – Past 96 Hours of Imagery
    • High Resolution Imagery
    • Daily 3D view of Earth
    • NOAA APT Satellite imagery
    • PlanetMaker
    • GOES16 A full year of received imagery
  • Imagery Processing
    • Custom Color Lookup Table & Gradients
    • GOES-R Custom Imagery Scripts
    • Global geo-ring composites
    • MODIS VIIRS Global Coverage
    • 3D Satellite Tracking
    • The quest for True Color Imagery
    • 3D animation of realtime data
    • Layering Geo-Spatial Fire Data into Satellite Imagery
    • Orbital dynamics and the Moon
    • National Hurricane Data
  • News, VLOGS & BLOGS
    • News & USRadioguy Blogs
    • USRadioguy VLOGS
  • Project Lab
    • Orbital Information and Visualizations
      • Enhanced Planet Earth
      • Satellites in Orbit
      • Solar System
      • Objects in Orbit
    • Current Station Weather
      • Current Groundstation Weather
      • Global Weather Data
      • Space Weather
    • WWII RADIO
      • WWII K-24 Aerial Camera
      • WWII RADIO
      • RADIO SET SCR-284
      • VS-3 VIBRATOR CONVERSION
      • VIBRATOR CONVERSION MODULE
      • BD-71 Field Switch Board and EE-8B Field Telephones
      • R-100/URR 1944 MORALE RADIO
      • A PORTABLE WWII ERA “MORALE RADIO”
      • AN/GRR-5 THE ANGRY 5
      • WWII Audio Page
    • Raspberry Pi Projects
      • ADS-B Reception
      • Allsky Camera
      • Pi Based Picture Frame
      • PI Based Broadcastify Server
      • Solar Power for PI
    • Hubble Space Telescope Data Processing
    • Zombie Satellites
    • DRONES
  • About Me
    • About Usradioguy
      • SETEC Astronomy
    • Tried and Tested Hardware
    • Rare Captures
    • My Other Interests
    • Presentations
    • Merchandise
    • Privacy Policy
  • Home
  • 36-Hour Imagery Processing script

36-Hour Imagery Processing script

Here is the Batch file I use to create my 36-hour animations of GOES 16 (or 18) Imagery.
Link to 36-hour imagery generated with this script

Requirements:

IMAGEMAGICK
FFMPEG
WINSCP

Youtube vlog where I talk about this script.

:: USRADIOGUY GOES 16 36 HOUR ANIMATION 12/12/2022 FULL DISK NOMAP CUSTOMLUT  

:: TESTING BLOCK IGNORE IF NOT NEEDED
	GOTO TEST
	:TEST

:: TIME BLOCK- NOTE THIS TIME BLOCK IS RE USED IN MULTIPLE SCRIPTS, SO I LEAVE IT IN IT'S ENTIRETY, EVEN THOUGH ONLY SOME OF THE RESULTS ARE USED.
:: GET UTC times:

	for /f %%a in ('wmic Path Win32_UTCTime get Year^,Month^,Day^,Hour^,Minute^,Second /Format:List ^| findstr "="') do (set %%a)
		Set Second=0%Second%
		Set Second=%Second:~-2%
		Set Minute=0%Minute%
		Set Minute=%Minute:~-2%
		Set Hour=0%Hour%
		Set Hour=%Hour:~-2%
		Set Day=0%Day%
		Set Day=%Day:~-2%
		set /a "Twodaysago=1%Day%-2"
		)
		set twodaysbefore=%Twodaysago:~-2%
		set /a "daybefore=1%Day%-1"
		)
		set Yesterday=%daybefore:~-2%
		Set Month=0%Month%
		Set Month=%Month:~-2%
		set goestoolsdate=%Year%-%Month%-%Day%
		set SanchezTime=%Year%-%Month%-%Day%T%Hour%:%Minute%:%Second%
		set UTCTIME=%Hour%%Minute%%Second%
		set UTCDATE=%Year%%Month%%Day%
		set filetime=%Year%-%Month%-%Day%
		set starttime=%Year%-%Month%-%twodaysbefore%
		set midday=%Year%-%Month%-%Yesterday%
		set curTimestamp=%UTCDATE%%UTCTIME%

:: SHOW TIMES ON SCREEN	
		echo Current Date and time is %UTCDATE%.%UTCTIME%
		echo Goestools Current Date and time is %goestoolsdate%
		echo Sanchez Current Date and time is %Year%-%Month%-%Day%T%Hour%:%Minute%:%Second%
		echo Current File Date and time is %filetime%
		echo Yesterdays File Date and time is %midday%
		echo Yesterdays File Date and time is %starttime%


:: COPY BLOCK-36 HOURS OF IMAGERY
:: USES A RECURSIVE FOR LOOP TO SEARCH EACH SPECIFIED FOLDER BY THE DATES CREATED IN THE TIME BLOCK AND MOVES THEM TO THE TEMP FOLDER
	for /R "D:\GOES  DATA CENTER\goes16\fd\CUSTOMLUT\%starttime%\" %%f in (*.jpg) do copy "%%f" "D:\TEMPPROCESSING\GOES16Web_video\"
	for /R "D:\GOES  DATA CENTER\goes16\fd\CUSTOMLUT\%midday%\" %%f in (*.jpg) do copy "%%f" "D:\TEMPPROCESSING\GOES16Web_video\"
	for /R "D:\GOES  DATA CENTER\goes16\fd\CUSTOMLUT\%filetime%\" %%f in (*.jpg) do copy "%%f" "D:\TEMPPROCESSING\GOES16Web_video\"
	for /R "F:\Satellite Imagery\goes16\fd\CUSTOMLUT\%filetime%\" %%f in (*.jpg) do copy "%%f" "D:\TEMPPROCESSING\GOES16Web_video\"


:: IMAGE OPTIMIZATION BLOCK AND ADD FILE TIME STAMP TO BOTTOM OF EACH IMAGE
:: REDUCE FULL DISK IMAGE SIZE FROM 5424X5424 TO 1000X1000 AND REDUCE FILESIZE SIGNIFICANTLY

	for /r "D:\TEMPPROCESSING\GOES16Web_video\" %%a in (*.jpg) do "C:\Program Files\ImageMagick-7.1.0-Q16-HDRI\magick.exe"  mogrify -path "D:\TEMPPROCESSING\GOES16Web_video\AUTORESIZE" -type TrueColor -filter Triangle -define filter:support=2 -thumbnail 1000 -unsharp 0.25x0.25+8+0.065 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB -strip  -gravity south -stroke none -pointsize 28 -fill orange -font Ailerons -annotate 0 %%t "%%~a"

:: APPLY USRADIOGUY WATERMARK TO EACH IMAGE

	magick mogrify -path "D:/TEMPPROCESSING/GOES16Web_video/FDWATERMARKED/" -format jpg -gravity northwest -draw "image over 15,15 0,0 'F:/Satellite Imagery/GOESFULLDISKWHITE250x50.png'" "D:/TEMPPROCESSING/GOES16Web_video/AUTORESIZE/*.jpg"

:: ENABLE DELAYED EXPANSION AND RENUMBER IMAGERY  FFMPEG PROCESSING WITHOUT GIF

	cd /D D:\TEMPPROCESSING\GOES16Web_video\FDWATERMARKED
		@echo off
		setlocal enabledelayedexpansion
		set "index=000000"
		for /f "delims=" %%a in ('dir /a-d /b *.jpg^|findstr /rxc:"......[0-9][0-9][0-9][0-9][0-9][0-9]\.jpg"') do (
		set "name=%%~na"
		if "!name:~-6!" gtr "!index!" set "index=!name:~-6!"
		)

		set /a i=1%index%
		for /f "delims=" %%a in ('dir /a-d /b *.jpg^|findstr /rxvc:"......[0-9][0-9][0-9][0-9][0-9][0-9]\.jpg"') do (
		set /a i+=1
		set "name=%%~na"
		ren "%%~a" "!name:~,6!!i:~-6!%%~xa"
		)
		move /Y D:\TEMPPROCESSING\GOES16Web_video\FDWATERMARKED\*.jpg D:\TEMPPROCESSING\GOES16Web_video\TEMPVIDEO

:: CREATE INTERPOLATED MP4 RENUMBERED IMAGERY

		cd /D D:\TEMPPROCESSING\GOES16Web_video\TEMPVIDEO\
		ffmpeg -y  -framerate 4 -i "GOES16%%06d.jpg" -filter "minterpolate='mi_mode=blend:me_mode=bidir:fps=25:mc_mode=obmc:me=ds:vsbmc=1'" -c:v libx264 -pix_fmt yuv420p "D:\TEMPPROCESSING\GOES16Web_video\FINAL\GOES36Hours.mp4"

:: DELETE ALL TEMPORARY FILES
		del "D:\TEMPPROCESSING\GOES16Web_video\*.jpg" /s /f /q
		del "D:\TEMPPROCESSING\GOES16Web_video\AUTORESIZE\*.jpg" /s /f /q
		del "D:\TEMPPROCESSING\GOES16Web_video\FDWATERMARKED\*.jpg" /s /f /q
		del "D:\TEMPPROCESSING\GOES16Web_video\TEMPVIDEO\*.jpg" /s /f /q

:: Copy a file to location for uplaoding to web "G:\Satellite Related\GOES STUFF\GOES36hours\"
	for /R "D:\TEMPPROCESSING\GOES16Web_video\FINAL\" %%f in (*.mp4) do copy "%%f" "G:\Satellite Related\GOES STUFF\GOES36hours\"

:: Copy a file to Vitality GOES "C:\xampp22\htdocs\videos\"
	for /R "D:\TEMPPROCESSING\GOES16Web_video\FINAL\" %%f in (*.mp4) do copy "%%f" "C:\xampp22\htdocs\videos\"

::Upload video to server. (HANDLED BY TASK SCHEDULER)

rem "C:\Program Files (x86)\WinSCP\WinSCP.exe""/log=C:\Users\crein\Documents\WinSCPusradioguyG16upload.log" /loglevel=1 /ini=nul /command "open ftp://USERNAME@YOURSITE.com:PASSWORD@YOURSITE.com" "put -latest ""D:\TEMPPROCESSING\GOES16Web_video\FINAL\GOES36Hours.mp4"" /GOES16DATA/" "mv /GOES16DATA/GOES36Hours.mp4 /GOES16DATA/GOES1636Hoursnow.mp4" "exit"


rem del "D:\TEMPPROCESSING\GOES16Web_video\FINAL\*.mp4" /s /f /q

Here are some changes that could be made to speed things up and optimize the script as well. Replacing the appropriate sections of course.

Change from copy to Xcopy:

xcopy /S /Y "D:\GOES DATA CENTER\goes16\fd\CUSTOMLUT\%starttime%\*.jpg" "D:\TEMPPROCESSING\GOES16Web_video\"
xcopy /S /Y "D:\GOES DATA CENTER\goes16\fd\CUSTOMLUT\%midday%\*.jpg" "D:\TEMPPROCESSING\GOES16Web_video\"
xcopy /S /Y "D:\GOES DATA CENTER\goes16\fd\CUSTOMLUT\%filetime%\*.jpg" "D:\TEMPPROCESSING\GOES16Web_video\"
xcopy /S /Y "F:\Satellite Imagery\goes16\fd\CUSTOMLUT\%filetime%\*.jpg" "D:\TEMPPROCESSING\GOES16Web_video\"

USING VARIABLES



set "IMAGEMAGICK=C:\Program Files\ImageMagick-7.1.0-Q16-HDRI\magick.exe"
set "SOURCE_DIR=D:\TEMPPROCESSING\GOES16Web_video"
set "DEST_DIR=D:\TEMPPROCESSING\GOES16Web_video\AUTORESIZE"

for /r "%SOURCE_DIR%" %%a in (*.jpg) do (
    "%IMAGEMAGICK%" mogrify -path "%DEST_DIR%" -type TrueColor -filter Triangle -define filter:support=2 -thumbnail 1800 -unsharp 0.25x0.25+8+0.065 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off -define png:compression-filter=5 -define png:compression-level=9 -define png:compression-strategy=1 -define png:exclude-chunk=all -interlace none -colorspace sRGB -strip  -gravity south -stroke none -pointsize 28 -fill orange -font Ailerons -annotate 0 %%t "%%~a"
)

Here’s what was changed:
The ImageMagick path and source/destination directories were stored in variables to make it easier to change them if needed.
The for loop was simplified and the ImageMagick command was moved inside the loop. This way, the command is only executed once for each file, rather than launching ImageMagick for every file in the directory.

Hardware Humor Imagery Processing Interesting stuff you should know! Launch News Life News Product Review Satellites Science Software Space Weather Uncategorized VLOG

Satellite And Weather Related Feeds

  • CIMSS Satellite Blog
  • USRadioguy.com
  • wildfires
  • NASA Earth Observatory
  • SPC Particularly Dangerous Situation (PDS) Tornado/Severe Thunderstorm Watch
  • satellites
  • Satellites News -- ScienceDaily
  • Satellite Liaison Blog
Wildfire in Ontario produces a large pyrocumulonimbus cloud
Wildfire in Ontario produces a large pyrocumulonimbus cloud
American Samoa’s Wettest Year Gets Wetter
American Samoa’s Wettest Year Gets Wetter
Deadly flash flooding in Ruidoso, New Mexico
Deadly flash flooding in Ruidoso, New Mexico
Global cloud layers on your Devices
Global cloud layers on your Devices
End Of Life for NOAA 15 and 19?….not so fast…
End Of Life for NOAA 15 and 19?….not so fast…
Vitality GOES
Vitality GOES
The fire cycle
Unmasking the complicated chemistry of wildfire smoke: What's in it?
Unmasking the complicated chemistry of wildfire smoke: What's in it?
NOAA unveils powerful convergence of AI and science with revolutionary Next-Generation Fire System technology
NOAA unveils powerful convergence of AI and science with revolutionary Next-Generation Fire System technology
The Salty Lake of Gas Hure
The Salty Lake of Gas Hure
Greenland’s Bejeweled Ice Sheet
Greenland’s Bejeweled Ice Sheet
Manitoba Burning
Manitoba Burning
SPC PDS Severe Thunderstorm Watch 399
SPC PDS Severe Thunderstorm Watch 399
Five historically huge solar events
Five historically huge solar events
65 years since the world’s first weather satellite
65 years since the world’s first weather satellite
Investing in America: NOAA's Science, Service and Stewardship in Action
Earth’s weather satellites just spent 10 years watching Venus — here’s what they found
Record-breaking 10-billion-year radio halo just rewrote the universe’s origin story
Massive thread of hot gas found linking galaxies — and it’s 10 times the mass of the Milky Way
The Need for Speed: OCTANE Cloud-Top Winds at SPC
The Need for Speed: OCTANE Cloud-Top Winds at SPC
Summer Storms, Flooding Target Mid-Atlantic
Summer Storms, Flooding Target Mid-Atlantic
Southwest Thunderstorms – Late June 2025
Southwest Thunderstorms – Late June 2025
  • Facebook Geo Stationary Satellites
  • Usradioguy Facebook
  • Instagram
  • Reddit
  • Github
  • Linkedin

Copyright © 2025 USRadioguy.com - All Rights Reserved. All material protected by Fair Use Section 107 of the Copyright Act. This site is Verified and Secured with 256 bit SSL encryption