Daala Quickstart Windows: Difference between revisions

From XiphWiki
Jump to navigation Jump to search
mNo edit summary
Line 4: Line 4:


=== Pre-requisites ===
=== Pre-requisites ===
* Visual Studio 2008 or 2010
* '''[http://git-scm.com/downloads Git]'''
* git
* '''[http://downloads.xiph.org/releases/ogg/?C=M;O=D libogg]''' (v1.3 or later) - The VS solution files were tested with '''[http://downloads.xiph.org/releases/ogg/libogg-1.3.2.zip libogg-1.3.2.zip]'''
* libogg (v1.3 or later)
* '''[http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx Visual Studio]''' (2008 or 2010)


==== Visual Studio ====
The VS solution files were created using '''Visual Studio 2008 Team System''' and '''Visual Studio 2010 Ultimate'''.<br />
 
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.
Even though the provided solutions might work with the express versions of VS, this has not been tested.
==== Libogg ====
The solution files were tested with '''libogg 1.3.2'''.
This can be downloaded from this link: [http://downloads.xiph.org/releases/ogg/libogg-1.3.2.zip downloads.xiph.org]


=== Installation Procedure ===
=== Installation Procedure ===
Line 26: Line 19:
* Unpack libogg into a folder named '''ogg'''.
* Unpack libogg into a folder named '''ogg'''.


If you cloned the Daala repository onto the root of your C drive, your folder structure should look like this:
If you cloned the Daala repository onto your C-drive root,<br/>
your folder structure should now look like this:


     C:\daala
     C:\daala
Line 32: Line 26:


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


== Building the executables ==
== Building the executables ==


* Open the file Daala_static.sln located at \win32\Visual Studio\VSXXXX\ folder.
* Open the file '''Daala_static.sln''' located at '''daala\win32\Visual Studio\VS????''' folder.
* Build the solution.
* Build the solution.


Line 49: Line 44:
== Encoding a Video ==
== Encoding a Video ==


If you do not have one, get a sample video or two in .y4m format from [https://media.xiph.org/video/derf/ 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:
Get a sample video or two in .y4m format from [https://media.xiph.org/video/derf/ media.xiph.org].<br />
* [https://people.xiph.org/~tdaede/video-1-short/ video-1-short]
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: [https://people.xiph.org/~tdaede/video-1-short/ video-1-short]
 
Xiph also maintains a set of still-image collections in .y4m format:


We also maintain a set of still-image collections in .y4m format:
* [https://people.xiph.org/~tterribe/daala/subset1-y4m.tar.gz Subset 1] (50 images, small training set)
* [https://people.xiph.org/~tterribe/daala/subset1-y4m.tar.gz Subset 1] (50 images, small training set)
* [https://people.xiph.org/~tterribe/daala/subset2-y4m.tar.gz Subset 2] (50 images, small testing set)
* [https://people.xiph.org/~tterribe/daala/subset2-y4m.tar.gz Subset 2] (50 images, small testing set)
Line 63: Line 61:


where
where
* video.y4m is the input video you want to encode,
 
* video.ogv is the name of the encoded video file to output,
* '''video.y4m''' is the input video you want to encode,
* -v specifies the quality (currently from 0 to 511, where 0 is lossless)
* '''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 ==
== Decoding a Video ==
you can decode the video back to .y4m with
 
You can decode the video back to .y4m with


     ./examples/dump_video video.ogv -o decoded_video.y4m
     ./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.
Many other players can play back these .y4m files and other tools can convert them to various other formats.
 


== Creating y4m from other formats ==
== Creating y4m from other formats ==


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


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


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

Revision as of 15:56, 3 January 2015

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

There is also a Daala Quickstart page for Linux/MacOS.

Pre-requisites

The VS solution files were created using Visual Studio 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.

Installation Procedure

  • Clone the Daala.git repository (this can take several minutes)
   git clone https://git.xiph.org/daala.git
  • Unpack libogg into a folder named ogg.

If you cloned the Daala repository onto your C-drive root,
your folder structure should now 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 daala\win32\Visual Studio\VS???? 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

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: video-1-short

Xiph also maintains 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 its 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.