I have been fooling around with GBA video lately and have had a hard time finding any info other than what I see here:
http://www.gameboy-advance.net/video/
http://www.gameboy-advance.net/video/meteo_avi-2-gba_video_codec.htm
So I thought I would share my findings and hope for some more discussion.
First of all, a little history. I have a Gameboy Advance SP (the newer model with the superbright backlit screen). I also have a GBA Flashcart so I can flash my own roms and play them on the GBA.
The videos I am playing with are Betty Boop cartoons which run about 6-7 mins. They are b/w and mono sound. I wrote a script in AviSynth which inverse telecines it and sizes it to fit the GBA screen. Here is my script.
Here is a breakdown of my script:Code:LoadPlugin("C:\Programs_DPH\dgMPEGdec\DGDecode.dll") v=MPEG2Source("D:\BETTY_BOOP\she wronged him right.d2v") a=wavSource("D:\BETTY_BOOP\she wronged him right_441.wav") #v=decomb522(v) #Code below reflects changes made in order to encode for GBA v=audiodub(v,a).convertToMono v=manualIVTC(v) v=v.trim(223,0)# trim off the 'Platinum' logo v=v.bilinearResize(240,160) v=v.crop(8,0,232,160).addborders(4,0,4,0) v=v.changeFPS(12) return v function decomb522(v) { last=v LoadPlugin("c:\program files\AVIsynth 2.5\plugins\decomb522.dll") Telecide(guide=1,post=2) Decimate(cycle=5) v=last return v } function manualIVTC(clip v) { # Sync pulldown pattern v=duplicateframe(v, 0) # split five frames movie_aa=selectevery(v,5, 0)#.subtitle("a") movie_bb=selectevery(v,5, 1)#.subtitle("b") movie_bc=selectevery(v,5, 2) movie_cd=selectevery(v,5, 3) movie_dd=selectevery(v,5, 4)#.subtitle("d") # fix the C-frame movie_cc=manualdecomb(movie_bc, movie_cd)#.subtitle("c") v=interleave(movie_aa, movie_bb, movie_cc, movie_dd) # remove extra frames used for correction of pattern #v=deleteframe(v,39414) #v=movie_cc #use this for error checking return v } # The heart of a manual inverse telecine function. This function fixes the C-frame. function manualdecomb(clip movie_bc, clip movie_cd) { c2=selecteven(separatefields(movie_bc)) c1=selectodd(separatefields(movie_cd)) #assumeframebased(c1) #assumeframebased(c2) return weave(interleave(c1,c2)) }
Basically, I first tried to inverse telecine it using Decomb. It was not perfect, so I wrote my own function to manually inverse telecine. The downside to my manual way is that the pattern has to start at the right spot. So I had to insert a duplicate frame in there. Also, the pattern must remain constant, which luckily it does with this cartoon.
Then, after trimming off some unwanted video, I resized it to fit the GBA's small screen. I also cropped some black off the left side and added some to the right so that the image was centered.
Finally, I changed the FPS to 12 (half the original framerate). I had to do this in order to keep the visual quality. Every attempt to use 24 fps resulted in poor quality video.
So then I loaded the video into Virtual Dub, saved an avi file so I could convert it in Meteo.
Here are my settings in Meteo:
Bitrate: 75
Manual Settings>Manual Settings
Trimming: No Trim - Manual Resize
Resize: Maintain Aspect Ratio (checked)
Framerate: Original
Prefilter: 4x Dithering/15-bit Filter
The result was a gba rom file which was 32,170 KB (roughly 32 mb). It was very watchable. The motion was very smooth and the details were sharp. Only the occasional frame showed any major signs of blocking artifacts.
I've been testing my encodes in the VisualBoyAdvance emulator. I've come to understand that the emulator has limitations with larger videos. That might explain the troubles I had with my first encodes, which were 24 FPS 160 kbps.
Now that I have the process down and the quality looking pretty good, I am going to start experimenting to see how low I can go with the bitrate and still achieve good quality. I'd say the settings above are for max quality.
Here is a screen cap:
Any comments? Does anybody else have any experience converting videos for GBA?
Darryl
+ Reply to Thread
Results 1 to 1 of 1
Similar Threads
-
need Video player with 1 frame advance
By zimbot in forum ProgrammingReplies: 2Last Post: 26th Mar 2011, 18:30 -
convert video with Photo JPEG codec and MS IMA APMCD audio codec
By devil_doll in forum Video ConversionReplies: 3Last Post: 21st Jan 2011, 14:10 -
Can Codec ID/Codec Hint make a difference on the video?
By dzsoul in forum Video ConversionReplies: 2Last Post: 1st Jun 2009, 19:40 -
Please help with migrating mp3's. This is weird. Thanks in advance.
By gary11364 in forum ComputerReplies: 3Last Post: 16th Jan 2008, 08:06 -
Subtitling. Thanks in advance.
By shr3dd3r in forum SubtitleReplies: 4Last Post: 11th Sep 2007, 14:21