howto:transcode and convert

WIP

[Back: howto:index]

Contents

Even though e6ai aims to host all works in as high a quality as possible and archive them, it is also a directly browsable website, meaning that all content uploaded should be accessible and viewable with modern up-to-date browsers. Because of this, only specific file formats are accepted and there are additional limitations on aspects like file size and resolution, meaning non-supported formats and huge files need to be transcoded into an acceptable format before they can be uploaded.

Transcoding means the conversion from digital format to another digital format.

If the material in question is already in format that e6ai supports, any kind of file alteration, modification, transcoding, etc. is generally highly discouraged!
This is because the file's MD5 hash will be altered. This breaks one way to reverse search the artwork (e.g. MD5:<MD5 Hash> status:any search), in addition to the currently-in-use duplicate detection system, resulting in accidental duplicate uploads and making it harder to verify the integrity of a post compared to its source. Transcoding also isn't always perfect and can be altering the file in some ways that are not immediately visible, resulting in us hosting an inferior quality copy of the work.

Image files

Image files are—generally speaking—the easiest ones to handle as most mainstream formats also work on browsers directly, but additionally lossless formats are extremely common because file sizes are a non-issue with modern computers and internet speeds.

The four image file formats that e6ai accepts are:

  • .jpeg/.jpg (an initialism/acronym of its developer, the Joint Photographic Experts Group; pronounced "JAY-peg"), which is a long-standing (since 1992) image format using lossy compression made to store highly detailed digital images such as photographs at a much smaller file size without losing too much image quality. Saving any image in this format will result in a loss of visual data, hence "lossy", leading to compression artifacts.
  • .gif (Graphics Interchange Format; officially pronounced "JIF" [soft 'g'] like the peanut butter brand but it's much more commonly pronounced "GHIF" [hard 'g'] as in "gift" or "graphic"), which is a bitmap format developed in the 1980s, and is used for simple graphics. It supports transparency and remains the standard raster image format for animations, despite its age and several limitations, the most notable of which is that it cannot display more than 256 colors per frame, although there are ways to get around that.
  • .png (Portable Network Graphics; officially pronounced "ping" but commonly pronounced by letter as "PEE-en-JEE"), which is an image format that's younger than the other two above (since 1996). It uses lossless compression, which means that images will not degrade upon saving, and can store higher-quality graphics than GIF does. It was made with the Internet in mind. It supports 8-bit alpha transparency, unlike GIF (where transparency has to be allocated to a space in a color palette) or JPEG (which does not support transparency at all). An extension of the format known as APNG (Animated Portable Network Graphics) adds animation support, gaining support in all five major desktop browsers. It was an unofficial extension until 2025, when the World Wide Web Consortium (W3C) made the third edition of the PNG format, which also adds HDR (high dynamic range) and Exif data support, a W3C Recommendation.
  • .webp (WebP), which is an image format developed by Google introduced in 2010 that can be lossless, lossy, static, and/or animated, and supports alpha transparency. It's designed to replace all three of the above formats by having all their features while having better compression to reduce file sizes further, and has been widely adopted across the Internet.

Source files

Source files mean file formats which are not meant for viewing, but are files containing all of the data used when creating the image. Common ones are .psd (Photoshop Document), .xcf (GIMP), .kra (Krita), .sai (PaintTool SAI) and .clip (Clip Studio Paint).

These are extremely uncommon files to bump into and are generally only accessible through first party channels or through paid channels, so make sure these aren't paid material or possibly bases, as these can be against e6ai rules and guidelines.

As these files are almost always software specific, the best way to handle these are to open these files with their native application and then exporting them as a PNG file. Many graphics editing software have ability to open source files created in other software (e.g. GIMP can open .psd). However, depending on content and what it utilizes, the importing process can alter the information or even straight up discard it, resulting in an altered file from author's original vision, so this is not recommended!

Vector files

When talking of raster image files, they generally have a specified resolution and all of the pixels on the image are determined to be specific ones. However, there are also vector files, which instead of saving individual pixels saves instructions how to draw the image in real time. What this means is that the image scales indefinitely, where regular images would need to be interpolated, resulting scaling artifacts and decreasing the quality of the image immensely.

Most universal format for vector graphics is .svg (Scalable Vector Graphics), with .ai being the Adobe Illustrator Artwork format. Additionally some file formats can have vector elements inside them including .pdf (Portable Document Format).

Unlike source files, vector files should look exactly the same regardless of what software is used to open and modify them. However, as e6ai does not support vectorized files, these would need to be rendered into lossless bitmap format PNG. This can be problematic as there is no hard rules as to what resolution to render the file at and in most instances, maximum dimension of 15000px can be excessive. However, many files should contain information of their intended resolution, some files can contain information of DPI which should tell the printing dimensions for guidance. With PDF files, sometimes there can be other bitmap elements on the page which can be used to determine the desired render resolution, utilities to decompile content from PDF files can be utilized to determine these.

Other image files

There are multitude of other file formats for images, usually these are extremely old, extremely new or formats meant for specific purpose. Some of the newer filetypes are compatible with web browsers, e.g. AVIF so these could possibly be replaced with native files in future, however for current time being, transcoding them into accepted format is the way to go.
Generally speaking, converting these file formats into PNG is usually the way to go, as metadata is considered as irrelevant data (and can be put into post description if necessary) and using lossy formats like JPEG can lead into generation loss where two different lossy compressions stack decreasing the quality further.

  • .bmp (bitmap), which is an extremely common format to save images pixel perfectly. Bitmap files can get massive because they don't use any file compression.
  • .tiff (Tag Image File Format), which is similar to JPEG in that it can include additional metadata, but it is lossless quality.
  • .heif (High Efficiency Image Format) is the newest standard for lossy image files and provides far higher image quality and lower file sizes compared to currently widespread standard JPEG. The file format can utilize different formats including HEVC (.heic), AVC (.avci) and AV1 (.avif).

Audio files

Note

Generally speaking, e6ai does not consider audio only content relevant and as such audio files are not acceptable to be uploaded and are generally deleted under uploading guidelines. However, audio data can be packaged inside of video files; when discussing formats supported by this site, we are referring to when packaged inside a video file.

The general gist of previous sections still apply; there are lossy files (AAC, Opus, MP3, etc.), lossless files (WAV, FLAC, ALAC, etc.) and "vector" formats, a.k.a. formats which are instructions to play the music (MIDI, MOD, XM, etc.).
This site supports Opus (.ogg), Vorbis (.ogg), AAC (.m4a), & MP3 (.mp3) audio codecs, although some are only supported in specific video containers.

Video and animation files

WIP

FFmpeg

This is a CLI tool.
wip

For Windows:

Installation:

In Command Prompt (/Powershell?), paste winget install --id=Gyan.FFmpeg -f and press Enter on the keyboard. That should properly install ffmpeg so you'll be able to use it from any Command Prompt instance in any folder. If that doesn't work for whatever reason, you can try following these WikiHow instructions. They should accomplish the same thing, just manually.

Preparation for usage:

Navigate to the folder with the video to convert. In the file explorer's path (the part that says C:\Program Files whatever), delete what's there, type cmd, and press Enter. That opens the command prompt and sets it to the folder you're in.

For MacOS:

WIP

Installation:

WIP

Preparation for usage:

WIP

Usage

Standard ffmpeg command that encodes relatively high quality AV1 [1] video in an MP4 file:

ffmpeg -i <input_video_file>.mp4 -c:v libsvtav1 -pix_fmt yuv420p -b:v 0 -svtav1-params tune=0 -preset 1 -crf 15 -c:a libopus -b:a 128k output.mp4

- -i <input_video_file>.mp4 -> select the input file. Use high quality files provided directly by directors (or ask for them!), not the junk Twitter/X spits out, for instance.
- -vf "colorspace=bt709:iall=bt709:fast=1" -> can be used to fix color issues when source metadata is incorrect/missing
- -c:v libsvtav1 -> select the video codec (read "codec : video"). This selects SVT's AV1 video codec [2]
- -pix_fmt yuv420p -> change the colorspace to YUV420p, which is standard for videos to save space without losing much quality
- -b:v 0 -> set the video bitrate to unlimited, to allow AV1 to make quality decisions without regard to file size
- -svtav1-params tune=0 -> tune for visual quality (0 is VQ mode -> visual quality)

- -preset 1 (0-12) -> lower number is higher quality. Has a large impact on quality vs file size vs speed. Presets 4 and 3 have the smallest file sizes while reaching acceptable quality (higher numbers are sloppier, much faster, bigger), but as a more archival-focused site we prefer higher quality for our "forever copies." Preset 0 is preferred for smaller transcodes that are expected to fit below the 100 MB upload limit and not take many hours to encode, but preset 1 is still more than acceptable. Presets 5 and above are unnecessarily low quality and replaceable.
- -crf 15 (0-63) [3] -> lower number is higher quality. Another relative quality control, trading off with file size. CRF 15 on AV1 is, subjectively, at the cliff of diminishing returns. To keep outputs below the 100 MB upload limit, preset quality is preferred and likely more space efficient than CRF scaling.

- -c:a libopus -> select the audio codec. This selects Opus (.ogg files)
- -b:a 128k -> set the audio's bitrate. 128k is good for Opus.

- output.mp4 -> the finished file's name. ffmpeg will notice the .mp4 in the output file name and adjust accordingly.

If the audio is already Opus, AAC (.m4a), or MP3, then you can copy that audio instead with -c:a copy and skip the -b:a 128k part. If the video has no audio, skip both the -c:a and -b:a parts and instead use -an to disable audio output.

[1] AV1 (in MP4) is a newer video format than VP9 (in WebM). AV1 is more space efficient for the quality provided than VP9, allocates bits more intelligently, uses smoother compression patterns, and has a higher quality ceiling.
[2] Scalabe Video Technology (SVT) for AV1 is designed with scalability in mind, and will consume much more available PC resources than libvpx-vp9 with row-mt enabled, perhaps pinning CPU usage at 100%, lagging other PC tasks, and potentially crashing if other processes spike their CPU or RAM usage.
[3] SVT AV1's CRF values, coupled with a high quality preset, should produce higher quality video than identical CRF values used with libvpx's VP9 at deadline best.

Handbrake

This is a GUI tool.
wip

See also
Glossary


  • Encoding/Codec/Filetype1: The “language” or “code” used to store the information.
    • Codecs provide a standardized ruleset for storing (encoding) & interpreting (decoding) the video's information, so that no matter what codec/encoding scheme you use, the same information that gets encoded to be put into the file is the same information that gets decoded from the file & is sent to the display and/or speakers2. e6ai supports these filetypes3. This is important because - although all videos are sent to the screen as a series of pictures composed of a 2D grid of colored pixels, & all audio is sent to the speakers as (to somewhat oversimplify) a sound wave - there’s different ways to encode information like:
  • Palette: a list of colors in the image; this can be used to decrease file sizes by referencing a palette index instead of writing the full color every time
  • Transcode: To convert from 1 encoding/file format to another.
Footnotes


  • Technically, there is a difference between a codec & a file format, but it’s best not to worry about it; they’re essentially the same thing at different levels. Some file types (e.g. WebM, MP4, MKV) are just “containers” that hold information encoded with a different format (e.g. VP8, VP9, AV1), but those file formats are still encoding what type of file that is, what each data block contained within it is (e.g. metadata, frame data, color palette), & how to read it; it’s just that some of those data blocks say “just use this other codec to read me”. Fun fact, the MP3 audio file format was originally (& still is) basically just a codec used for audio data inside of the MPEG-4 video file format; its full name is MPEG-1 Audio Layer III/MPEG-2 Audio Layer III. You can guess why we don’t use that.
  • At least to the best ability of the codec; codecs like MPEG-1/2 Layer 3 (MP3) & JPEG are lossy, so they selectively pick & tweak what information gets stored in order to minimize storage while maximizing quality, but still, whatever actually does get stored is what comes out the other end. This is also why converting from these formats to a "better" format like the lossless PNG format is highly discouraged; the information has already been discarded, and the space-efficient formulas that are used to fill back what was discarded aren't used by PNG, meaning the altered output of the JPEG is saved in a PNG of a far greater size, despite not gaining any quality.
  • Opus, Vorbis, AAC, & MP3 are audio codecs. VP8, VP9, AV1, H.264/AVC, & H.265/HEVC are video codecs. MP4, WebM, & MKV are video file formats that can contain data blocks using the aforementioned video & audio formats, along with things like captions.

[Back: howto:index]

Posts (view all)

Blacklisted

    Nobody here but us chickens!