DPG Converter for linux
FAQ:
Q: how do i keep aspect ratio for 16:9 movies?
A: add --height 144
A: with 9 and up use --keep-aspect
A script to transcode video files to DPG format suitable for
Nintendo DS (tm)
dpgconv.py file1 file2 file3 ... fileN
command line options:
--dpg
0,1,2,3,4 sets DPG version.. default is DPG4
--pf
sets pixel format, default is 3
0 RGB15
1 RGB18
2 RGB21
3 RGB24
-2,--tp
extra high quality 2-pass encoded video
-q,--hq
high quality video
-l,--lq
low quality video(takes no effect when --hq,-q is set)]
default is normal quality
-v,--vbps xxx
sets video stream bps in kb/s(default: 256)
-a,--abps xxx
sets audio stream bps kb/s (default: 128)
-f,--fps xx
sets video frames per second (default:15)
-z,--hz
sets audio frequency (default:32000)
-c,--channels
2 - stereo, 1 - mono
default is to leave as is unless input audio channels
number is bigger then 2 ... then default is stereo
--aid n
use audio track n
--volnorm
normalize volume
--height xxx
destination video height (default: 192)
--width xxx
destination video width (default: 256)
--keep-aspect
try to keep aspect ratio
NOTE: width/height have no effect when --keep-aspect is set
--mv
additional parameters for mencoder for video
--ma
additional parameters for mencoder for audio
Video Thumbnail
--thumb xxx
you can use this option if you convert only one video, or if
you want the same preview for all videos.
thumbnails are only in DPG4 videos.
all formats supported by python imaging library can be used.
the image will be resized and converted automically.
NOTE: thumbnail will be generated autimatically
from input video if you won't set this parameter
Hardcoding subtitles
--nosub
do no try autoloading of subtitles
(default is to try to load subtitle with matching filename)
--sub,-s xxx
Specify subtitles for hardcoding into video output
(is obviously only usable if you specify one file at a time)
--sid n
use subtitle track n
--subcp xxx
specify subtitles encoding
--font xxx
specify font for subtitles
EXAMPLE:
--font ~/arial-14/font.desc
--font ~/arialuni.ttf
--font 'Bitstream Vera Sans'
You can specify font, subcp and other additional mencoder parameters in
~/.mplayer/mencoder.conf
EXAMPLE:
font=/usr/local/share/fonts/msfonts/comic.ttf
subcp=cp1251
Download
dpgconv 0.1
Initiall release.
dpgconv 0.2
Fixed output file frames count calculation.
(fixes audio/video out of sync when seeking)
dpgconv 0.3
Added progress percentage output.
dpgconv 0.4
Added support for DPG1 and DPG2.
Pixel format settings for DPG1 and DPG2.
Now using mpeg_stat for calculating frame count and GOPs.
Cleanup on SIGINT and SIGTERM. dpgconv 0.41
Minor cleanup dpgconv 0.42
GOP list creation patch from oofrab dpgconv 0.43
Added --sid and --aid parameters dpgconv 8
Changed versioning scheme(just incrementing number)
out-of-sync issues fixed
temporary files are created in a nice way
do not depend on 'cat'
dpgconv 9
--keep-aspect for keeping aspect ratio
--volnorm for volume normalization
DPG4+preview thumbnail by Guillaume Bedot
doublepass encoding by NorQue
dpgconv 10
patch from Chris to fix aspect ratio on certain movies