Features
Pushing the Nintendo DS capabilities to the limit, the DSVideo player offers a simple and intuitive interface. The top screen is devoted to video playback, and the bottom screen contains the touchscreen navigation interface. The DSVideo encoder is flexible, accommodates a wide variety of source material, and is based on the widely used and highly portable ffmpeg.
Important features include:
- Video playback up to 12.5 fps
- Stereo Audio playback (MPEG-1 Layer 2 @ 112kbps / 32kHz)
- Full seeking support
- Feature-complete video playback controls
- File browser
The player and controls
The touchscreen interface displays the video name and duration. It also has standard play/eject/fast forward/rewind buttons and a seek bar. Screen brightness can be dynamically controlled using the icon in the lower left of the screen. File selection mode is accessed via the red eject button.
While playing videos, the left and right shoulder buttons are used to fast forward and rewind. When the NDS lid is closed, playback is stopped, the screen is turned off and the buttons are disabled to prevent accidental activation.
Button overview:
- A - Play/Pause
- X - Cycle backlight brightness
- L/R shoulder & L/R D-Pad - Seek forward/backward
- Start/Select - Change to file browsing mode
To see the player in action, head over to the gallery section and have a look at the flash video walkthrough.
Hardware support
The player uses DLDI, and has been tested on both the Supercard Lite and the R4. The R4 requires a modified DLDI patch, due to the way DSVideo runs libfat on the arm7 instead of the arm9, and that can be found in the Downloads section.
The encoder
Video files are created using the standalone DSVideo encoder. Video files are encoded at 256x192, which corresponds to a 4:3 display. If the source video is widescreen, the encoded video can either use center cut-out to create a fullscreen image, or use letterboxing to maintain the original aspect ratio.
The encoder strategy is one of rate distortion optimisation. Through various combinations of command line options, you can choose to make the resulting video file either Constant Bit Rate (CBR) or Variable Bit Rate (VBR). To achieve CBR, you simply set the minimum and maximum bits per frame to the same value.
The resulting video data is encoded using a wavelet transform identical to the one found in JPEG2000. The audio is compressed as an MPEG-1 layer 2 track, at a data rate of 112 kbit/sec and sample rate of 32kHz.
The encoder can take a number of arguments to control its behaviour:
- -o - Set output filename. Default is "output.dsv".
- -f - Maximum number of frames to encode. Default is unlimited.
- -n - Minimum bits per frame. Default is 12000.
- -x - Maximum bits per frame. Default is 70000.
- -r - Scale factor for using frame complexity to allocate bits. Higher numbers use more bits per frame. Default is 1.5.
- -v - Verbose output.
- -l - Letterbox output video.
- -w - Divide input framerate by 3 instead of 2. Used for 29.97 NTSC sources.
- -k - Set Keyframe interval in seconds. Default is 5.
- -s - Use stdin for source video data.
A typical invocation of the tool would be:
dsvideo -o outfile.dsv infile.avi
Input vs. output comparison
As Wavelet codecs are fundamentally different from DCT-based codecs, they have different strengths and weaknesses when encoding and decoding video. While block artifacts plague MPEG video, and much effort is spent in smoothing them, wavelets are different. Wavelet macro-blocks are roughly star shaped, and are arranged in such a way that they overlap each other in the frame. Because of this, the resulting decoded frame should contain less obvious visible edge artifacts, and it should look 'softer' when the source frames which are difficult to encode.
Conversely, diagonal lines are difficult to represent without a number of successive frames to refine the image. Another feature of this implementation is no motion compensation, so movement tends to reduce the amount of data in the decoded frame.
Below are a number of frames which demonstrate the wavelet encoder's strengths and weaknesses.
| Source image | Encoded image | Notes |
|---|---|---|
![]() |
![]() |
Low frequency images encode extremely well. |
![]() |
![]() |
Here there is noticeable quality reduction around the face and left side of the jacket. Note that the channel ident in the lower left is still rendered sharply. |
![]() |
![]() |
Unlike a DCT-based codec, edges and lines are decoded with few artifacts. |






