Omnimaga

Calculator Community => Casio Calculators => Topic started by: ProgrammerNerd on April 13, 2014, 05:08:52 pm

Title: MPEG2 player for casio prizm
Post by: ProgrammerNerd on April 13, 2014, 05:08:52 pm
This is more of a front-end to libmpeg2
The source code can be found at https://github.com/ComputerNerd/Casio-prizm-mpeg2-player
You can download the file here http://www.casiopeia.net/forum/downloads.php?view=detail&df_id=146
The latest version is 1.031 which fixes a scaling bug that causes some pixels to be ignored.
Version 1.3 fixed an issue on real hardware where the screen would get corrupt. It is highly recommend that you run the latest version. Running 1.2 or older is a bad choice.
To use this program you will see a file browser
I have it set to show *.m2v files because there is no audio but it may play mpeg2 with audio (untested) but it will be ignored
As for what resolution you should make the video I would not go over half of screen resolution it should support 384x216 maximum but malloc errors are encountered
While the video is playing press exit to go back to the file browser if you want to do such.
In the readme I have included compiling instructions if you are interested in using libmpeg2 in one of your own projects.
To encode video I used
the following avisynth script
AviSource("FILE PATH HERE")
BilinearResize(176,96)
ChangeFPS(128,13)
AssumeFPS("ntsc_video")
ConvertToYV12()

To encode the video I used HC encoder http://hank315.nl/

There are some settings that you should be aware of please use 1:1 ratio for pixels
Also if you want height to be a multiple of 16 instead of 32 make sure progress sequence is checked (In settings 2)

Icon from http://www.pubzi.com/f/Movie-icon.svg
Title: Re: MPEG2 player for casio prizm
Post by: Juju on April 14, 2014, 12:27:12 am
Sounds nice, I'll try it soon. I doubt you'd be able to put anything longer than a short music video on the calculator, but still. For the sound, you can always try something with the serial port.
Title: Re: MPEG2 player for casio prizm
Post by: DJ Omnimaga on April 16, 2014, 03:39:30 pm
Seems nice, although I probably won't try it yet, since like every other video player for calcs, creating the actual calc videos is a major nightmare (either they use command prompt/lacks GUI or they take several hours to figure out how to get it to work), which is probably why rarely anybody use them, even Nspire ones. Probably during my Summer vacations when I have time to sit down for a few hours. >.<
Title: Re: MPEG2 player for casio prizm
Post by: ProgrammerNerd on April 16, 2014, 04:52:36 pm
DJ Omnimaga I think you are mistaken. MPEG2 is a standard format. See https://en.wikipedia.org/wiki/MPEG-2
All you need to do is encode the video in MPEG2 format which is very easy to do and many free programs will do it for you.
Title: Re: MPEG2 player for casio prizm
Post by: Juju on April 16, 2014, 09:26:30 pm
Yeah, unlike other video players it directly takes standard .mpg files.
Title: Re: MPEG2 player for casio prizm
Post by: DJ Omnimaga on April 16, 2014, 11:07:07 pm
Yeah that was the good part about this particular player. All other ones used weird formats that required special, hard to find softwares that didn't work. However, the other video players also had the disadvantage of requiring the user to use command prompt, and unfortunately, the target audience of a video player (mostly kids who just want to show off and are either not tech-savy or lack the extra patience that command prompt requires) is most likely gonna get turned away by this. Of course, I haven't checked if this MPEG2 player has a GUI or not, but if it lacks one, it might be a good idea to add one.
Title: Re: MPEG2 player for casio prizm
Post by: Streetwalrus on April 17, 2014, 03:34:57 am
Butbutbut CLI. D: CLI stuff is awesome, I smoke weed use it everyday. :P
Title: Re: MPEG2 player for casio prizm
Post by: ProgrammerNerd on April 17, 2014, 05:30:44 pm
Yes the player does have a gui. See the attachment if you want to see what it looks like. Also I see nothing wrong with command line. Even though it is not necessary for my program I don't see any reason to avoid learning it.
Title: Re: MPEG2 player for casio prizm
Post by: DJ Omnimaga on April 17, 2014, 10:10:38 pm
Aah that's cool to hear. :D As for command line I don't have troubles using it but I just find it takes much longer on the user end to navigate to the right folder then type the program name with commands than when double-clicking an icon then selecting one or two options. >.<
Title: Re: MPEG2 player for casio prizm
Post by: Streetwalrus on April 18, 2014, 07:02:30 am
That's because you don't use Zsh. :P
/me pokes DJ to switch to Linux.
Title: Re: MPEG2 player for casio prizm
Post by: DJ Omnimaga on April 18, 2014, 07:13:32 am
But... but... Battle.net 1.0/ICCup  D:
Title: Re: MPEG2 player for casio prizm
Post by: bb010g on April 27, 2014, 03:46:58 pm
Dual-booting is your friend.
Title: Re: MPEG2 player for casio prizm
Post by: Streetwalrus on April 29, 2014, 01:37:47 pm
^That. That's what I do and it works pretty well. Windows for games and emulation because GPU (performance and feature set), and Linux for pretty much everything else. :P
Title: Re: MPEG2 player for casio prizm
Post by: Eiyeron on May 05, 2014, 08:27:32 am
Linux now has good performances with nvidia drivers, they even support Optimus! Oo I saw Melee on Dolphin running in 1080p on a Manjaro.

I should try this addin on my calc, it seems quite the fun project.
Title: Re: MPEG2 player for casio prizm
Post by: Streetwalrus on May 05, 2014, 12:57:22 pm
I have an AMD GPU and the catalyst drivers don't perform as good on Linux as they do on Windows. Or so it would seem. :/
Title: Re: MPEG2 player for casio prizm
Post by: Hayleia on May 05, 2014, 01:07:03 pm
I have a nvidia GPU and... Linux can't even set the brightness -.-
Meanwhile, Windows runs Melee, Brawl, Project M (same thing) and Mario Kart Wii in 1080p in Dolphin, on the same laptop...
Title: Re: MPEG2 player for casio prizm
Post by: Streetwalrus on May 05, 2014, 01:14:13 pm
But which drivers do you use ? Open source or proprietary ones ?
Title: Re: MPEG2 player for casio prizm
Post by: Hayleia on May 05, 2014, 01:27:32 pm
For Windows, I use proprietary ones, and for Linux, I tried to install proprietary ones but the result was a 4:3 640x480 screen and brightness still didn't work o.o
So I just used no drivers (or the ones installed by default by this stupid Ubuntu) because not any more brightness control but, at least, 1920x1080.
Title: Re: MPEG2 player for casio prizm
Post by: Eiyeron on May 06, 2014, 03:34:56 am
Yeah, AMD are quite bad supported in Linux world... Sorry.
Title: Re: MPEG2 player for casio prizm
Post by: Streetwalrus on May 06, 2014, 06:58:11 am
Well, even though it performs worse on Linux, it still gives much better 3D performance than xf86-video-ati.
Title: Re: MPEG2 player for casio prizm
Post by: ProgrammerNerd on May 10, 2014, 01:35:29 pm
Anyways speaking of mpeg2 player...
Title: Re: MPEG2 player for casio prizm
Post by: ProgrammerNerd on May 24, 2014, 09:11:34 pm
Sorry for the double post but I have updated my program. My update addresses crashing the calculator. Now it searches for the Save/load VRAM address and finds where it really is. The address is different depending on firmware versions. The download link is the same.