Daala Quickstart Windows

From XiphWiki
Revision as of 17:45, 10 December 2014 by RandomGuy (talk | contribs) (Created page with "= Getting Started Windows = This is a simple guide to getting the code and encoding a simple video. === Pre-requisites === * Visual Studio 2008 or Visual Studio 2010 * git * l...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Getting Started Windows

This is a simple guide to getting the code and encoding a simple video.


Pre-requisites

  • Visual Studio 2008 or Visual Studio 2010
  • git
  • libogg (v1.3 or later)


Visual Studio

The solution files were created using Visual Studio (VS) 2008 Team System and Visual Studio 2010 Ultimate, even though the provided solutions might work with the express versions of VS this has not been tested.

Libogg

The soultion files were tested with libogg 1.3.2; this can be downloaded from this link downloads.xiph.org


Installation Procedure

  • Clone Daala repository
   git clone https://git.xiph.org/daala.git

Note that the git clone can take several minutes to complete.

  • Unpack libogg into a folder named "ogg" without the quotes.

If you cloned Daala repository into a folder named Daala in the root of your C drive, your folder structure should look like this:

   C:\daala
   C:\ogg

Make sure you run the git clone operation on the same machine where you intend to use the code. Checking out a copy on Windows and then trying to use it on Linux will not work, as executable permissions and line-endings will not be set properly.

Building the executables

  • Open the file Daala_static.sln located at \win32\Visual Studio\VSXXXX\ folder.
  • Build the solution.

this will generate 3 static libraries and 2 executables:

  • Libdaalabase.lib
  • Libdaalaenc.lib
  • Libdaaladec.lib
  • encoder_example.exe
  • decoder_example.exe

Encoding a Video

If you do not have one, get a sample video or two in .y4m format from media.xiph.org. These videos are relatively large and will take a long time to encode. There are also subsets of 1 second long videos for faster encoding:

We also maintain a set of still-image collections in .y4m format:

  • Subset 1 (50 images, small training set)
  • Subset 2 (50 images, small testing set)
  • Subset 3 (1000 images, large training set)
  • Subset 4 (1000 images, large testing set)

Encode the video:

   ./examples/encoder_example -v 30 video.y4m -o video.ogv

where

  • video.y4m is the input video you want to encode,
  • video.ogv is the name of the encoded video file to output,
  • -v specifies the quality (currently from 0 to 511, where 0 is lossless)

Decoding a Video

you can decode the video back to .y4m with

   ./examples/dump_video video.ogv -o decoded_video.y4m

Many other players can play back these .y4m files, and other tools can convert them to various other formats.


Creating y4m from other formats

You can use the ffmpeg tool to generate y4m from any of it supported video formats:

   ffmpeg -i video.webm -pix_fmt yuv420p video.y4m

Note that ffmpeg is optimized for speed. You may not get repeatable results across machines.