ve
/
Videncode
An application that takes video, audio, and an image
and combines them into one within a limited file size
Installation:
  1. Prerequisites: Java and a .7z archive extractor

  2. Download these files into a new folder:

  3. Open the ffmpeg.7z archive, navigate to /bin/, extract both ffmpeg.exe and ffprobe.exe into the folder

  4. Run Videncode.jar

* If you aren't using Windows, or want a different version, check here.

Advanced:

You can also install the ffmpeg files into a directory and add the /bin/ directory to your path environment variable rather than put the files directly with Videncode.jar.

This way, Videncode.jar can run from any directory without error.

Use:

Videncode can be used to make images that act like .gif, but with more features and more quality.

It requires Java and FFmpeg to run.

Separate Video and Audio:

Video and audio tracks can be completely separate from eachother, both in terms of quality and length.

If they are different lengths, you can choose how they will sync up with eachother during playback.

Auto Quality:

The automatic quality detection will try to select the best resolution for you based on the available space.

Different modes allow different levels of quality depending on the available bitrate.

Note that in the end, the encoder may need to use a certain minimum quality, and your file size limit may be ignored.

File Size:

Getting the file size perfectly within the bounds hasn't proved to be an exact art.

Thus, if an output winds up being slightly over your file size limit, try decreasing the limit by a small amount.

That failing, decrease your output quality.

Interface:
Full preview of the GUI

Videncode comes with a simple tabbed interface:

  • Image selection
  • Audio / video selection and cropping
  • Audio and video synchronization
  • Output and settings
Image Tab
  • The preview image for the file; the bar at the bottom selects the time from the video
  • The quality can also be changed; in the case of an external image, the quality can be set to "Original," which means use the original image unchanged

The image tab lets you select the source of the preview image.

It can come from a frame of the video, or a separate external image.

Quality and size selections are available.

Video Tab
  • Video settings appear on the left, audio on the right
  • Previews of the start/end frames of the video are available
  • Additionally, 5 second previews of the audio start/end positions are available

The video tab lets you select the video and audio sources and encoding times.

You can also select the encoding settings related to the audio and video.

Sync Tab
  • Video/audio synchronization times. The smaller of the two bars can be dragged to select the starting time
  • There are also some additional settings at the bottom related to the shorter of the two tracks

The sync tab displays the encoding times of the video and audio.

If the audio and video are from the same source, this panel doesn't need to be used.

Encode Tab
  • Videncode is currently encoding, and thus the button says "Cancel" rather than "Encode"
  • 6 status logs also appear on the left. They can be safely ignored most of the times, as they are mainly for debugging
  • Application settings are located on the right, and can be saved to be used on subsequent runs

The encod tab provides the file name editor, tag editor, and a button to encode.

For advanced testing, FFmpeg logs appear on the bottom left.

Application settings are on the right.

Output
  • 3:54.2 of audio and video encoded in under 3 MB
  • The output file size limit did have to be adjusted to be slightly smaller, or it would produce a ~3.01 MB file

And like magic, after the encoding process is done, a 4 minute long video with audio has been encoded in under 3 MB.

The quality is recognizable, but less than desirable. The reason for this is obviously because it was a 4 minute long file.

Making sane choices about video/audio length and quality can lead to nicer results.

Settings:

Settings are saved in a file called settings.json which is located inside Videncode.jar, or you can place one in the folder.

You can also safely delete the external settings file without consequence.

Finally, there are a few advanced settings in the file which can't be edited in the application, such as the GUI color.

Change log:
Github:

If any bugs or problems are found with Videncode or the Javascript API, they can be reported on this page.

Source:

Videncode is written in Java and its source files are available on Github. It comes with a makefile if you want to compile and test for yourself.

The Javascript API source files are located under the gh-pages branch; a better description of what files are related to the API can be found on the API page.

About:

Videncode is a program designed to encode sound/video into an image file. The basic idea is "like .gif, but better" and also with sound.

Content:

Videncode creates a format that stores audio and/or video inside of an image. The image is used as a preview for the content.

The typical file extension is .ve*, where the * is replaced with the extension of the image file.

The video file type is .webm; if the video is omitted, the file is an audio-only container.

The audio file type is .ogg Vorbis, either multiplexed into the video, or standalone.

Format:

v1
n bytes
Image file
The source image file; unmodified from the original image.
In this case,
n = the byte length of the image.
8 bytes
Signature
The starting signature, .ve.snd\x00.
1 byte
Version
The version of the file format.
1 byte
Flags 1
Primary flags for the file:
\x01 - has video
\x02 - has audio
\x04 - reserved
\x08 - reserved
\x10 - video fade ina
\x20 - video fade outa
\x40 - audio fade inv
\x80 - audio fade outv
1 byte
Flags 2conditional

Secondary flags for the file:
\x01\x02 - video playback style, before audioa
\x04\x08 - video playback style, after audioa
\x10 - audio playback style, before videov
\x20 - audio playback style, after videov
\x40 - reserved
\x80 - reserved

Video playback style:
\x00 - Display nothing
\x01 - Loop video
\x02 - Display stopped video frame
\x03 - Display image
(After right shifting to get into the appropriate \x00 to \x03 range)

Audio playback style:
\x00 - Play nothing
\x01 - Loop audio
(After right shifting to get into the appropriate \x00 to \x01 range)

Condition: flags1 has \x01 and \x02 set

v bytes
Tag length
The length of the tag in bytes.
n bytes
Tag
The tag for the file, encoded in UTF-8.
In this case,
n = the length of the tag as found from the previous section.
v + 2 bytes
Synchronization offsetconditional

The synchronization offset of the video and audio data, in seconds.
In this case, the
v encodes the integer part of the number, and the extra 2 bytes encode the decimal portion, as a fixed point number.

Condition: flags1 has \x01 and \x02 set

v + n bytes
Videoconditional

This section includes the byte length of the video using v bytes, and the video itself encoded using n bytes.

Condition: flags1 has \x01 set

v + n bytes
Audioconditional

This section includes the byte length of the audio using v bytes, and the audio itself encoded using n bytes.

Condition: flags1 has \x02 set

Sections marked "conditional" won't appear unless a certain condition is met.

Flags with a superscripted letter are only relevant if there are separate video and audio tracks.

Furthermode, Flags subscripted with "a" are only relevant if the audio is the main track, and similarly, flags subscripted with "v" are only relevant if the video is the main track.

Motivation:

VP8 can encode much more efficiently than .gif images, allowing longer files, larger resolutions, more colors, and potentially audio.

The aim of .ve* images is to basically have higher quality .gif-style functionality with a few extra features.

API:

There is currently an encoding, decoding, and playback API written for HTML5 using Javascript.

API Testing:

You can test the API on this page; the test includes encoding, decoding, and playback.

You can test files you've created to make sure they work to your liking.

API Files:
  • ve_api.js - github / raw
    The main API file
  • api_test.js - github / raw
    The demonstration file used on the test page; also uses jquery.js
  • api_test.css - github / raw
    The stylesheet used on the test page
Other:

The main API file, ve_api.js, is documented in the file itself. Reading the comments and/or looking at the test code should explain how it's used.

The file is also designed such that it has 3 segments: Videncode, Videcode, and VPlayer. Each section can run on its own, with the exception that VPlayer uses a Videcode object.

For example, if you want to use the Videcode part, but not the Videncode part, you can cut that code out. Alternatively, you can name each of the three classes to whatever you like without error.

API / test: