Hacking BAG videoplayer

BassAceGold

Testicles
OP
Member
Joined
Aug 14, 2006
Messages
496
Trophies
1
XP
441
Country
Canada
2-bias wanted to convert his own videos for playing with the Rick Roll video player I created a while back, so here are the tools and an updated player!

Instructions:
-copy video to same folder as converter
-edit rip_video.bat in notepad
The video resolution must have a width of 256, and the supported frame rates are 16, 18 and 24 fps. Currently the bat file is setup for converting 720p videos (256 x 144 when scaled for nds) at 16 fps.
-run rip_video.bat and let it do its thing
-video.bag is the output file, so you can rename and copy that to your card.

Things to note:
-This is not a full fledged video player, it has no controls except exit (any key)
-This video format is not optimized at all, a full length video at 24 fps will hit 1gb in file sizes.
-There probably won't be many improvements if any at all to this video format

Editing rip_video.bat
-r sets the frame rate: 16,18, and 24 are available options for the player, frame rate is also the third argument for videobuilder.exe so it is the third value after the program name (see below for using videobuilder.exe)
-qscale sets video quality: 1 = best quality (largest file size), 10 = worst (smallest file size)
-vol sets volume of audio: default is 100
-ab sets the audio bitrate: default is 128kb/s - 320kb/s is max
-s sets the frame size: frame size must have a width of 256. Frame sizes are also needed for videobuilder.exe as arguments, see below for using videobuilder.exe

Using videobuilder.exe
videobuilder.exe width height fps



the included videoplayer.plg has arg support only, there is no in-program menu so a menu such as BAGPlug or iMenu is necessary for running your videos.
Download Here!

Some screenshots from Sweet Child O' Mine music video
11-5-21-19-25-2.jpg
11-5-21-19-25-18.jpg


Not sure how legal this is, but here is the above video converted for demo use:
http://www.qfpost.com/download.do?get=e7cd...c2e752b77ec9f27 -Fixed Audio
If there are any problems with the legality of this link, someone just report it to a moderator if I'm not around to remove it.
 

BassAceGold

Testicles
OP
Member
Joined
Aug 14, 2006
Messages
496
Trophies
1
XP
441
Country
Canada
Terminator02 said:
i was excited until i saw that videos would be 1gb and their's no music controls

Basic controls can be easily added, and if you use a frame rate of 16 fps a full length video might be around 600 - 700 mb.

But really its only good for music videos or short video clips.
 

Terminator02

ヽ( 。 ヮ゚)ノ
Member
Joined
Apr 10, 2010
Messages
4,516
Trophies
1
Location
Somewhere near monkat
XP
1,089
Country
United States
video is really good except the occasional tearing, which is always horizontal

the audio on the other hand, sound pretty terrible, is that just because you used a low bitrate or does the converter seriously lower the bitrate?

Edit: Btw i can confirm that it does work and successfully returns to iMenu after completion or if you press a button
 

BassAceGold

Testicles
OP
Member
Joined
Aug 14, 2006
Messages
496
Trophies
1
XP
441
Country
Canada
Terminator02 said:
video is really good except the occasional tearing, which is always horizontal

the audio on the other hand, sound pretty terrible, is that just because you used a low bitrate or does the converter seriously lower the bitrate?

I've had issues trying to figure out converting the audio. In standard youtube videos, it sounds fine, but in the HD ones, there is lots of clipping. If you really wanted to, you could probably setup a different program to rip the video audio.

I'll probably release a fixed video player in a few minutes which should reduce the amount of tearing and add some basic controls.
 

BassAceGold

Testicles
OP
Member
Joined
Aug 14, 2006
Messages
496
Trophies
1
XP
441
Country
Canada
Terminator02 said:
cool, and when you say standard youtube videos do you mean 360p or 480p?

Yeah the 360p and 480p sound fine. I've tried out a bunch of other videos and they all sound great. The two HD ones I've tried sounded horrible.
 

2-bias

Well-Known Member
Member
Joined
Jul 30, 2009
Messages
142
Trophies
0
Location
Germany
XP
95
Country
Gambia, The
Hell the size is very bad
frown.gif

I made a 5 minute 360p youtube mp4 to a 256x192 24fps avi with Arista on my netbook first and then used your converter with settings set to 256x192 24fps.
the mp4 is 20mb, the avi 15mb and the video.bag 60mb

but the quality is fine, i watched the avi with the iplayer plugin too and i hardly can see any difference. exept for the sound, but thats ok too.
anyway. thanks for the release but i hope the supercard team will release the source for the iplayer soon, so that anyone can add arg support
wink.gif
 

BassAceGold

Testicles
OP
Member
Joined
Aug 14, 2006
Messages
496
Trophies
1
XP
441
Country
Canada
2-bias said:
Hell the size is very bad
frown.gif

I made a 5 minute 360p youtube mp4 to a 256x192 24fps avi with Arista on my netbook first and then used your converter with settings set to 256x192 24fps.
the mp4 is 20mb, the avi 15mb and the video.bag 60mb

but the quality is fine, i watched the avi with the iplayer plugin too and i hardly can see any difference. exept for the sound, but thats ok too.
anyway. thanks for the release but i hope the supercard team will release the source for the iplayer soon, so that anyone can add arg support
wink.gif


Yeah with this format, there is no redundant frame checking, so there is lots of extra data added for scenes that may reuse frames for stills


QUOTE(Terminator02 @ May 21 2011, 08:55 PM) so i'm trying to make my videos now, what format does it have to be in and does it already have to be ???x256 before converting?

Formats supported are what ever ffmpeg supports - mpg, mp4, avi, flv. The frame size can be whatever before conversion.
 

2-bias

Well-Known Member
Member
Joined
Jul 30, 2009
Messages
142
Trophies
0
Location
Germany
XP
95
Country
Gambia, The
BassAceGold said:
Formats supported are what ever ffmpeg supports - mpg, mp4, avi, flv. The frame size can be whatever before conversion.
So i don't have to convert the files before? Thought i must use a 256 width video for conversation. But if i can skip that i'm fine with it.
smile.gif
 

BassAceGold

Testicles
OP
Member
Joined
Aug 14, 2006
Messages
496
Trophies
1
XP
441
Country
Canada
2-bias said:
BassAceGold said:
Formats supported are what ever ffmpeg supports - mpg, mp4, avi, flv. The frame size can be whatever before conversion.
So i don't have to convert the files before? Thought i must use a 256 width video for conversation. But if i can skip that i'm fine with it.
smile.gif

The rip_video.bat will re-size the video to size you specify which must have a video width of 256.

Just realized the audio issue, in rip_video.bat, there is the flag -vol 1152. Just change 1152 to something more suitable.
 

2-bias

Well-Known Member
Member
Joined
Jul 30, 2009
Messages
142
Trophies
0
Location
Germany
XP
95
Country
Gambia, The
BassAceGold said:
2-bias said:
BassAceGold said:
Formats supported are what ever ffmpeg supports - mpg, mp4, avi, flv. The frame size can be whatever before conversion.
So i don't have to convert the files before? Thought i must use a 256 width video for conversation. But if i can skip that i'm fine with it.
smile.gif

The rip_video.bat will re-size the video to size you specify which must have a video width of 256.

Ahhh Ok, its the size for the output file. Now i understand.
And convertind the mp4 directly saves me some time but in this case it adds 15mb to the video.bag. I need to find smaller files in the first place or i need a bigger mSD.
wink.gif

But i really love this, watching short movies without playing around with the iplayer or moonshell browsers and control buttons.
 

Terminator02

ヽ( 。 ヮ゚)ノ
Member
Joined
Apr 10, 2010
Messages
4,516
Trophies
1
Location
Somewhere near monkat
XP
1,089
Country
United States
how is this better than iPlayer? if you properly convert videos for the iPlayer the videos look virtually the same, the only advantage is launching videos straight from iMenu/BAGPlug

Edit: actually i want to somehow test this to see which is better
 

2-bias

Well-Known Member
Member
Joined
Jul 30, 2009
Messages
142
Trophies
0
Location
Germany
XP
95
Country
Gambia, The
Terminator02 said:
how is this better than iPlayer? if you properly convert videos for the iPlayer the videos look virtually the same, the only advantage is launching videos straight from iMenu/BAGPlug

Edit: actually i want to somehow test this to see which is better
For me the quality was never the point in asking Bass for this. It was the Click and Watch advantage. I never wanted to watch big movies with this, so for me there is no need for a GUI or control buttons. The quality is fine for me and i can live with the big files.
 

BassAceGold

Testicles
OP
Member
Joined
Aug 14, 2006
Messages
496
Trophies
1
XP
441
Country
Canada
I fixed the screen tearing, but I don't think I'm going to bother adding controls to the player. Also I'll be updating the demo video in the first post with one of better audio.
This format is pretty much a dead end and was just an experiment, so nothing more should be expected of it. Maybe I'll look into getting other video formats running on the DSTwo.
 

VatoLoco

Don't crush that dwarf, hand me the pliers.
Member
Joined
Jan 29, 2008
Messages
2,330
Trophies
1
Age
52
Location
Ya Cant Get There From Here
Website
www.backwoodzstudioz.com
XP
3,017
Country
United States
BassAceGold said:
I fixed the screen tearing, but I don't think I'm going to bother adding controls to the player. Also I'll be updating the demo video in the first post with one of better audio.
This format is pretty much a dead end and was just an experiment, so nothing more should be expected of it. Maybe I'll look into getting other video formats running on the DSTwo.
I dunno how hard it would be to do, but direct booting of .dpg files w/o having to use moonshell would be nice.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    ZeroT21 @ ZeroT21: only ps5 updated to latest firmware can go on psn, jailbroken ones just don't use psn or they...