I created some scripts for batch converting videos with Meteo.
First some .bat scripts using ffmpeg.exe to convert .mp4 to .mpg that Meteo can handle.
These are based on the examples posted by
@firewood5304 on page five of this thread (
https://gbatemp.net/threads/guide-h...s-to-game-boy-advance-rom-files.520954/page-5 )
.bat script to convert all .mp4 in the same directory to Meteo compatible .mpg:
for %%a in ("*.mp4") do ffmpeg -i "%%a" -vf scale=-1:320 -c:v mpeg1video -qscale:v 1 -c:a mp3 -format mpeg "%%~na 320p.mpg"
Usage:
Use notepad or similar to put this script into a text file named something like "allmp4tompg.bat" (make sure the extension is .bat and not .txt)
Download ffmpeg.exe from
https://ffmpeg.org/download.html (if you don't know which to pick, go for the full/not shared version)
In the same directory/folder as the .bat file put:
ffmpeg.exe
.mp4 video file(s)
Then double click the .bat file, and if all goes as expected ffmpeg should start converting.
This creates mpg videos with a height of 320 pixels (GBA height x2) optimized for 16:9 source video (or other video wider than the gba) that will be cropped from the sides by Meteo to fit the GBA screen. For 4:3 video you might want to do "scale=480:-1" instead (for GBA width x2 to crop from top and bottom)
Another .bat script that converts all .mp4 to .mpg but also splits the output into 8 minute segments.
for %%a in (*.mp4) do ffmpeg -i "%%a" -vf "scale=-1:320" -c:v mpeg1video -q:v 1 -c:a mp3 -f segment -segment_time 480 -reset_timestamps 1 "%%~na part%%03d.mpg"
This is good for splitting ~24 minute shows in 3 parts so they can be encoded with higher quality, works very well for animated shows.
And an .mp4 to .mpg .bat that bumps up the contrast by 10% and saturation by 25% so the videos look less washed out on original hardware.
for %%a in ("*.mp4") do ffmpeg -i "%%a" -vf "scale=-1:320, eq=contrast=1.10:saturation=1.25" -c:v mpeg1video -qscale:v 1 -c:a mp3 -format mpeg "%%~na 320p upcontrast.mpg"
This is based on the info at
https://web.archive.org/web/20090826162117/http://wiki.pocketheaven.com/Meteo
For live action/dark videos it can also help to add ":brightness=0.8" to bump up the brightness a bit.
Second, an autohotkey 2.0 script to get Meteo to batch convert .mpg videos to .gba
This is for Meteo1.3.1 found at
https://github.com/jkotrub/mirror-meteo-avi2gba
Usage:
Download and install Autohotkey 2.0 from
https://www.autohotkey.com/
Script:
#Requires Autohotkey v2.0
Loop Files, "*.mpg" ;for all the mpg files in the same directory as the .ahk file
{
Run "Meteo1.3.1 (EN).exe" ;open meteo
Sleep 3000 ;wait a couple seconds to make sure meteo is loaded
WinActivate "METEO 1.3.1 English - GAMEBOY-ADVANCE.NET" ;bring the meteo window to the front
Sleep 5
Send A_LoopFileFullPath ;starting in the Movie File entry, enter full path to mpg source file
Send "{tab}"
Send "{tab}" ;move to GBA ROM File output entry
Send A_LoopFileFullPath ;enter full path to mpg source file
Send " 60kb 20fps.gba" ;add kbps and fps (optional) and .gba to the end of the mpg source file name for the full output filename
Send "{tab}"
Send "{tab}" ;move to ROM Title internal name entry
Send A_LoopFileName ;enter the source filename for internal rom name
Send "{tab}" ;move to Bitrate entry
Send "60" ;enter bitrate value
Send "{tab}"
Send "{Down}"
Send "{Down}"
Send "{Down}" ;move to Manual Settings
Send "{tab}" ;move to Trimming
Send "{Down}" ;one down changes to Auto Trim & Resize
Send "{tab}" ;move to Framerate
Send "{Down}"
Send "{Down}"
Send "{Down}" ;number of downs determines framerate, 1down=original,2down=24fps,3=20,4=15,5=12,6=10,7=7.5,8=6
Send "{tab}" ;move to Pre-filter and do nothing to keep as default, send down if you want to change
Send "{tab}" ;move to process button
Send "{Enter}" ;activate process button
Sleep 240000 ;wait while the conversion is processing. in milliseconds, 240000 is 4 minutes, likely more than enough
WinClose "METEO" ;close meteo
Sleep 20 ;wait a moment before opening next file
}
Use notepad or similar to put this script into a text file named something like "mpgtogba.ahk" (make sure the extension is .ahk and not .txt)
In the same directory/folder as the .ahk file put:
Meteo1.3.1 (EN).exe
.mpg video file(s)
Then double click the .ahk file, and if all goes as expected Meteo should open and the info for the first .mpg in the directory should be automatically entered and conversion started, and then all .mpg files in the directory should be converted.
The default settings are 60 kbps and 20fps, optimized for 8 minute videos and gives great quality for animated material. For videos with a lot of detail or motion you might need to take the bitrate down from 60 to 55 to fit within the GBA's 256mbit limit.
Relatedly, I also realized that it's possible to pause and resume Meteo videos on the EZ Flash ODE with savestates. Fast patching needs to be off for it to work. But the fact that Meteo makes every button reset the video means that its hit and miss to be quick enough to save/restore without accidentally resetting the video. If it was possible to hack out the reset on every button feature it would actually make the gba into a pretty capable video player.
I also have some more advanced scripts if anyone is interested, for adding subtitles that are easy to read on the gba, and for splitting videos into 2,3 etc equal length parts, but they require additional software and/or manual editing of files.