Please note: There is no warranty or support for the applications below. They are supplied free of charge. We cannot be held responsible for damage caused to your computer. If you are unsure about any aspect of installing this software then please do not proceed.

Goal: This cource code (in C) uses the SDL or AquaTerm libraries to display a YUV video. So far, the player only displays 4:2:0 YUV format.





The YUVplayer is right here.


2 versions are available:
- A Simple DirectMedia Layer (SDL) based player
- An Aquaterm based player

Note: The "AquaTerm" player is a Mac-only app.
    The Aqua_YUVplayer has very limited options so far.
     This version is still under development.
     It plays the video but cannot quit or fast forward / rewind.
     However, the SDL version is cross-platform (tested on Mac/Windows XP).


Sourceforge project:
A sourceforge project has been created for the SDL player.
The sourceforge project includes new features, such as zoom-in & zoom-out.


  • Compilation:

You will need to install:
 - SDL (http://www.libsdl.org/)
 OR
 - Aquaterm (http://sourceforge.net/projects/aquaterm/).

On Unix-like systems, a "make" should work.

On MS Windows OS, please refer to the explanations here.


  • Running the player:

First, you'll need to get a yuv file (you can try this one), unzip it and place it in your YUVplayer folder.

Here's how to launch the program:

Unix:
./SDL_YUVplayer foreman_qcif.yuv 144 176


MS Windows:
SDL_YUVplayer.exe foreman_qcif.yuv 144 176

1st argument is the yuv file name.
2nd argument is the frames height.
3rd argument is the frames width.

This opens a black window, then, hit "Return" to start playing.

Once the video is playing, you can:

- Play "Rewind" by pressing the "left" arrow.
- Play "Forward" by pressing the "right" arrow.
- "Fast forward" by pressing the "up" arrow -> Decreases by 10ms the time between 2 consecutive frames.
- Play in "Slow motion" by pressing the "down" arrow -> Increases by 10ms the time between 2 consecutive frames.
- Use "up" and "down" as many times as needed to speed up / slow down the video.
- Press "o" anytime to go back to a normal speed (40 ms between frames).
- Pause by pressing the "space bar" (press "Return" to start again playing or "space bar" again to play frame-by-frame)
- Save any Y,U&V frame (each as a PGM image) by pressing "s" while in pause mode (space bar), the saved images will go in the "Images" folder.
- Quit by pressing "escape".


The program can store each frame (Y, U and V components) in the Images folder, you'll have to set "SaveImges" to 1 in SDL_YUVplayer.c
Beware, this may use a lot of space or your hard drive.

  • Interface:
In this zip file there is a "SDL_YUVplayer_bns" exe file, this one is experimental.
It displays on the bottom of the video the common play, pause stop, fast forward and rewind buttons.
Just press the "PLAY" icon to start playing.
You can still use the keyboard input (see above) with this program.

This version of the program needs  SDL_Image (http://www.libsdl.org/projects/SDL_image) to load the icons.

NOTE: this program was just quickly written for testing purpose, it is an experimental version, and the code is *really* dirty/messy/not-optimized... expect some bugs !


Various yuv videos can be downloaded from:
http://trace.eas.asu.edu/yuv/index.html








Polytech'Nantes
IRCCyN