Skip to content

zeriyu/fansub-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Fansubbing and Encoding Guides Index

Fansubbing Overview

Theory Anime Fansubbing History and The State of Fansubbing: It's Dead [PDF].

Capping

Capping Theory

The idea is to obtain the source media.

The best sources are usually raw Digital Video Disc (DVD) or raw Blu-ray Disc Movie (BDMV) but uploads are not always available.

If not, then capping can also mean buying the retail media. Consider buying Anime DVDs/BDs to support the industry. Otherwise, existing VHS/LD/DVD/BD or web rips can be of acceptable quality.

For broadcast streams, capping means recording the analog stream and then digitizing it with special hardware or, for internet simulcasts (digital), means stream copying with special software. Sometimes raws can also be obtained from invite-only private trackers. See the "Remux" section for capturing subtitles.

Links

For Analog TV, 8mm, VHS and LD, see Analog Video

To extract subtitles, please see the Muxing and Remux sections.

For general subtitle conversion: Subtitle Edit and their documentation.

For simple stream extraction: MKVToolNix + gMKVExtractGUI, or even just FFMPEG. Also see Muxing section.

Digital TV/Cable/Satellite

Digital Signal Processing. Have fun.

Digital Video Disc (DVD)

DVD-Decrypter, a DVD Decrypter Guide, PDF and a second guide.

DVD/Blu-ray Disc (BD)

MakeMKV, and Handbrake and MakeMKV Guide.

Webrips

DVD raws, BDMVs, and webrips can also be obtained second hand from other people. See the Distribute section.

Encoding

Video Theory (Basic)

Video can be described as a series of pictures shown quickly in succession.

The most basic reasons to encode video are to preserve complex changes (such as any filtering) and to make the video stream smaller. Even a minute of raw uncompressed video is several GigaBytes (GB) in size. The basic idea is to reduce the file size to subjective "acceptable" levels while retaining the highest quality possible.

Motion Picture Engineering Group (MPEG) video encoding works by compressing one picture (known as a "key frame") and then recording any changes between that frame and the next frame. And then recording the changes between that second frame and the frame after and so forth. To display any given frame, every frame before it must be decoded starting from the nearest previous key frame.

Video Theory (Complete)

Following encoding guides without understanding the theory is just asking for trouble, but, with so much background necessary, there is just not a good place to starting learning about video encoding. This one is close: A&E's Technical Guides to All Things Audio and Video (v3), PDF. Read this in its entirety.

No excuses.

A&E's guide is dated but very good for theory. More modern workflow guides are found further below.

Codec and Container Theory

Luma and Color Theory

Framerate Theory

Interlacing Theory

Codec Bit Allocation Theory

Resolution Theory and Standards

Audio Theory

Encoding and Release Standards

These exist to ensure client hardware decoding compatibility. Please note that compatibility is not emphasized in the Anime community.

Concrete Guides (completely random)

Specific Software

(near top means easier to use, near bottom means full featured)

FFMPEG

x264/x265

Audio Encoding

QC (?)

Bitrate Viewer Able to estimate the quality of MPEG1 and MPEG2 streams. I do not know how this is useful but Etzimal said to add it. o_o*

Playback

Computer

HTPC

Muxing and Demuxing

Muxing and Demuxing Theory

For muxing, the idea is to take multiple discrete files (video, audio, subtitles, fonts) and merge them together into a single file for playback. For demuxing, the idea is to take one file that contains multiple streams and extract out at least one of them.

Muxing typically means shortening, lengthening or delaying streams for syncing. Shortening and delaying are compatible with stream copying techniques. However, any lengthening or modifications done mid-stream will typically require transcoding the entire stream. Thus, the two tasks (encoding and muxing) overlap somewhat.

Demuxing is usually necessary to obtain sources to work from and can be thought of as part of Capping.

The typical containers used are either Matroska (.mkv) with softsubs, fonts and possibly multiple audio streams, or standard MPEG-4 (.mp4) containers with hardsubs and a single audio stream.

Muxing tools

Filtering

Preface

To avoid transcoding multiple times or transferring losslessly encoded video, ideally, Filtering and Encoding should be done by the same person.

Filtering Theory

Filtering tasks beyond IVTC can be thought of as an optional sub-task for encoders. Common filtering tasks include triming length, cutting out advertisements, correcting various studio mistakes and improving subjective visual quality.

Encoders that worry about compatibility may also need to hardsub OPs/EDs, or the entire script, into the video stream prior to distro. This can be done at either the Filtering or Encoding stages.

Beyond basic tasks, filtering has diminishing returns. It is very time consuming to both learn and implement.

Examples

Understanding and Identifying Artifacts

Frameworks

Alternative to AviSynth with many cross-compatible filters. Requires Python 3.6.

Additional programs used

Further reading

Scene Filtering

This is an optional subcomponent of filtering which is an optional sub-component of encoding, which is an optional sub-component of capturing. In other words, stay away.

Working with Groups of Pictures (GOPs)

Scene filtering can also be done in Photoshop or Gimp one frame at a time. Manually editing each frame could be described as an optional component of scene-filtering.

Mandatory reading: Understanding FFMPEG's Group of Pictures (GOP) Options.

  • Cambridge colour's Photo Editing Tutorials and Digital Photo Restoration.
  • Adobe's Photoshop Retouch and repair photos user guide.
  • Panorama basics and How to Auto-Align Layers. Useful for later reanimating panning scenes in Premiere.
  • Example: Maybe-not-so-sane workflow diagram.
  • Special Note: When converting between YUV and RGB, double-check for color distortions manually through every step in the workflow where colorspace conversions between color families occur. This especially applies to denoising algorithims like waifu2x and BM3D (including when using it inside of mvsfunc's wrapper).
  • Exporting/Importing Images:
    • FFMPEG image sequence guide 1, guide 2, guide 3.
      • ffmpeg -i myvideo.mkv "output\out_%06d.png" #Defaults to rgb24 output and will convert VFR to CFR.
      • ffmpeg -i myvideo.mkv -pix_fmt rgb24 "output\out_%06d.tif" #Specify a colorspace with tif or will export native yuv.
      • ffmpeg -r 24000/1001 -i "out\op-%06d.tif" myvideo.mkv #Always use -r to specify input framerate for image sequences.
      • ffmpeg -r 30000/1001 -i "out\op-%06d.png" -c:v huffyuv myvideo.mkv #Encode losslessly.
      • ffmpeg -r 30000/1000 -i "out\ed-%05d.png" -crf 0 myvideo.mkv #Encode losslessly (h264).
    • VirtualDub "File-Open video file...," or "File-Export-Image sequence..." (not recommended).
    • mplayer example and see the -vo "jpeg" or "png" section of MPlayer's Video Output Drivers (MPlayer Only) documentation (not recommended).
    • AviSynth:
  • Image Viewers: InfranView or your favorite graphical HTTP client.
  • For batch image procesing: Photoshop Macros, ImageMagick (very advanced) and waifu2x-caffe.

Masktools

  • Masktools, PDF, provides an efficent way to select parts of a video frame but not others. If combined with other concepts, like motion compensation and edge detection, masktools allows filters to selectively target aspects within a frame for many consecutive frames. Neither scene filtering techniques, which are clip-based, nor image editing techniques allow for the flexibility and efficency that Masktools can provide.
  • tp7's MaskTools 2 theory, PDF.
  • tp7's MaskTools for beginners and generally: Translation from Russian: PDF. Original link:
    • http://web.archive.org/web/20160312025423/http://tp7.ruanime.org/masktools/index.html
  • 06_taro's MaskTools guide. Translation from Chinese PDF - Page 1 and PDF - Part 2.
  • Further reading: Edge Masks in Vapoursynth by Kageru.

Real-time filtering

The idea is to get playback without having to transcode the video.

  • SmoothVideo Project (SVP), example, for frame interpolation to 60fps. Note: Avisynth/Vapoursynth plugins also available.
  • Media player GPU accelerated "shaders": MPC-HC, [mpv]. Includes sharpening and scaling filters.
  • MadVR has quite a few.
  • With a powerful enough computer and a computationally light enough filter chain, .avs files (AviSynth) can be played directly.

Translating (TL) + Translate Check (TLC)

  • Transliterating: Change the words (and maybe grammar) to a new language. vs
  • Translating: Change what was said, including metaphors, to convey the same meaning.

Timing, Fine Timing, Scene Timing, Key Frame Timing (KFT), Karaoke Timing (KT)

Editing + Quality Check (QC)

  • Editing: Editors make sure the translation can be easily understood, sounds natural, is consistent and either localized or unlocalized (depending on preference).
  • The only requirement for editing is the one must speak the target language fluently, which can be a high bar.
  • Personally, I also listen to the foreign audio to make sure the post-edited dialogue stays as literal as possible and make sure the dialogue word choice and typesetting are compatible with speed reading techniques.
  • Random: For comprehension, it deosn’t enve mttaer in waht oredr the ltteers in a wrod are bscsaue the hamun brian is well adeptad to roecginze pettarns. Speed reading is the same concept, but applied to sentences instead of individual words. With "visual reading" in English, shorter words (to, a, be, are, by) are grammar that can be skipped by parsing only the longer words. Any "missing" meaning is derived from context. Try reading by skipping all the smaller words. If the sentence does not make sense, change the order and words used so it does make sense. Within this context, contractions are evil.
  • tun's Fansub Editing Guide, PDF.
  • Collectr's editing tips:
  • Important: Figure out what type of editing you like. 1) Standard-Informal English, 2) Unlocalized literal, or 3) Localized memesubs. PNG GUIDE. Summary:
    1. Unlocalized-Literal: Doki/Eclipse.
    2. Official Standard or Informal English: Crunchyroll, Funimation, official DVD-BD are a close second.
    3. Localized: Commie/DesuYo/FFF are heavily localized memsubs. Avoid unless you knowingly like localization. They are good sources for sign typesetting when combined with dialogue from 1-2 above.
    4. Hadena subs are so not even funny to the point where it is not even not funny anymore and becomes funny again.
      • Note: The point here is not to comment on Hadena, but rather as to counter editorial minimalism. If the subs are good, leave them alone, but if they are really bad, then change everything.
    5. A lot of remuxers combine existing subs with better/worse Audio and Video (A/V). The subs quality is usually the same as whoever they ripped them from.
    6. Censoring exists (sex-gore), in both dialogue and in A/V. Be wary of this from broadcast streams, especially non-Japanese ones, including older DVDs.
  • Use Crymore's Translation Parties to figure out what type of editing you like, start with this one. They take a while but will save time later on by being able to start from "better" subs and having to edit them less overall.
  • Blog about fansub drama and editing: crymore.net.
  • QC: Collectr's Curmudgeonly Guide to QC.

Typesetting

Styling Theory

In summary:

  1. Use white as the primary color.
  2. Have a very dark border (black).
  3. Use a readable font, like Arial or Roboto, in bold.
  4. Make it large enough to see without squinting.

Styling Links

Check out Underwater's Styling Guide [PDF].

Typesetting Theory

Typesetting is mostly making sure the subtitle dialogue is visually legible and signs look like they are natively part of the video. Typesetting can also extend to styling the opening, ending and insert songs, including fancy karaoke.

More theory. The most important part of typesetting is also the simplest: make sure the dialogue is readable.

While Typesetting is actually quite strait-forward, doing it efficiently and well is something else entirely.

Typesetting Links

Karaoke Effects (KFX)

Theory: This is an optional subcategory of typesetting that adds additional special effects to karaoke. Usually, KFX refers to effects beyond simple k-timing. KFX can be added to k-timed lines by applying a KFX template, modifying existing effects, or creating new effects.

Some KFX can exist in softsub.ass but others must be pre-rendered (hardcoded) either because the tool to create them draws on the video stream directly, independent of k-timing, or because dynamically rendering the effect would cause severe stuttering during playback.

As with all typesetting, applying KFX can actually be quite strait-forward, but creating and modifying new and visually appealing KFX is something else entirely. More intro.

Prerequisite reading

Working with templates

Kara Effector

Kara Effector is a lua plugin for Aegisub that focuses on modifying provided templates. It has a lot of them and basic modifications (shapes, colors, duration, quantity) are strait-forward. Most of the documentation, PDF, is in Spanish.

Creating KFX

Distribute (Distro)

#1: Torrents

#2: Hyper Text Transport Protocol (HTTP) (+ Transport Layer Security (TLS))

  • Client:
  • File Server Cloud - Direct Download (DDL):
    • Cloud storage providers like Mega provide substantial but limited duration storage.
    • Anime Tosho mirrors the contents of English translated torrents on Nyaa and TT to cloud storage providers.
    • Amazon, Google, and Microsoft provide limited long-term storage at affordable rates.
    • If you own or do not mind purchasing a domain, consider Google's G Suite for cost effective cloud storage.
  • Web Server Cloud:
    • See: "Misc: The Group Blog."
  • Selfhosting (HTTP):
    • See "Distro: Seedboxes" and "Misc: Distro For DIY People" sections.

#3: Internet Relay Chat (IRC)

File Transfer Protocol (FTP)

  • No. This protocol needs to die. Use HTTP instead.

Newsgroups

  • TODO: stuffs goes here.

Random Distro Tools

The Group Blog

  • Theory: Provide a way to centralize knowledge about your group including the following:
    • Latest release information, project archive, download options (Torrents/HTTP/XDCC/fserve), contact information (IRC/Email), community feedback mechanisms (chatbox), declared waifus, guides for the community, and donation solicitation.
  • Getting Started:
    1. (optional) Read The Internet and Hosting Providers to know how the internet works and how much services cost.
    2. (optional) Purchase a mygroup.moe domain from Hover for ~$20 (yearly). Alternative registrars: get.moe.
    3. Start a blog on Blogger or Wordpress.
      • Note: Wordpress and Weebly charge for custom domains and Blogger will disable TLS.
    4. Post releases. Example.
  • Markdown (formatting for blog posts):

Distro For Do It Yourself (DIY) People

General Mandatory Reading

DNS/Dynamic DNS (DDNS)

Raspberry Pi

Seedbox Software

HTTP File Server

  • List of Static HTTP Server Software.
    • Consider using the asynchronous "HTTP-Server" implemented using Node.js. See: this guide.
  • Apache and Nginx have various issues recursively auto-indexing mounted Fat32 formatted volumes via directory junctions. Just FYI~

TLS

Remux

Remuxers typically focus on improving work done by other groups, combining work done by multiple groups and/or combing subs with better Audio/Visual (A/V) sources.

Subtitle Preprocessing Tools

Workflow

  1. Obtain raws (See: Capping).
  2. Obtain scripts.
    1. Find out which groups did the series:
    2. Obtain the subs or files.mkv from the group.
      • Check their website for HTTP or torrent links.
      • Check the BitTorrent tracker the group uses.
      • Check their IRC channel and look for an XDCC bot.
      • If you can find out the exact name of their files, use @find in rizon.net's #news and give it to Google.
      • Ask the group over IRC or email (unlikely to work).
      • This one russian site sometimes has scripts.
        • Use Notepad++ to change the character encoding to UTF-8 if necessary.
    3. If you can obtain the files.mkv, then stream copy or extract them out. (See: Muxing)
  3. Fix any issues (like localizations and syncing issues) (See: Filtering, Encoding, TLC, Editing, Timing, Typesetting).
  4. Mux to preserve the changes (See: Muxing).
    • It is considered rude to use an existing groups tag in the filename, even if only minor changes were made. Use any other tag, none, a throw-away one, or your own nickname. To give them credit, label the tracks with the original source group name and credit them in any descriptions.
    • Remember to put the CRC32 in [ ] at the end of the filename (e.g. myfile_[1BA919D7].mkv). (See: Random Distro Tools for details.)
  5. Distro (See: Distro).

In Service of Chaos: Analog

Digital is an exercise in precision, while analog was an exercise in controlled chaos." -digitalfaq.com, Forums.

Analog Video Broadcasting History (fascinating btw)

Analog Decoding and Artifacting

Consumer Media Overview and Resources

Analog Capture Guides

The idea is to digitize the analog audio and video signals.