Add Blog

RedSuisei's Blog

February 2nd, 2011
I've seen a fair share of Blu-Ray rip releases with FLAC audio, and while I generally don't have any problem with FLAC, I just found a release where using FLAC is really a stupid choice.

For you who don't know already, FLAC stands for Free Lossless Audio Codec, and as it says, it's a lossless audio compression codec. Since it's lossless, the size will get rather large than usual lossy compression (AAC, Vorbis, MP3 etc.)

Usually, for a standard Blu-Ray rip 24 minutes episode, a stereo FLAC track will be around 100-110MB, and usually the video track for 720p will get around 300-600MB (though, the ones with FLAC are usually at least 400MB). Usually I'm fine with the FLAC size here, since it's only 14%-20% of the total size. After all, transcoding to AAC q=0.7 (where for my ears, the difference with lossless FLAC is non-existent) only cuts off 40MB per episode, less than 10% of the original size, so I just leave them be.

But I found a stupid 720p Blu-ray release with dual audio 5.1 FLAC tracks. This is really stupid because:
- For a standard 24 minutes episode, one 5.1 FLAC track is 220-250MB.
- Two tracks, so they're both 440-500MB.
- The filesizes of the actual release are around 700-900MB per episode.
So what does that mean? That means the freaking audio takes over half the filesize. That's stupid. Transcoding both tracks to Vorbis q=7 gives ~90MB each tracks, to a total of ~180MB. That cuts off ~280MB off each episode, which is quite large, more than 30% of the original size.

Encoding to Vorbis q=7, I don't hear any difference at all. Actually, q=6 and I still can't hear the difference, but maybe that's just my sound setup. And my ears are quite sensitive compared to my RL friends.

There are a lot of people who claim they can "hear the difference clearly, the compression artifacts are pretty noticeable", but I'd bet if take a FLAC track, transcode it to AAC q=0.7 , reencode it back to FLAC, then ask them to differentiate with the original FLAC track, most of them won't even be able to guess it correctly.

/rant.
Posted by RedSuisei | Feb 2, 2011 9:47 AM | 0 comments
December 8th, 2010
These are several blogs of mine regarding playback technicals. Not really important for casual user, but for those who are feeling adventurous, or find that their current playback setup is not satisfying, you might want to check out some of them.

* Knowledge Base. Some of useful knowledge about video playback.

* Advanced Playback Configuration. Covers how to properly configure your playback setup, and explains many things regarding playback-related softwares.
Posted by RedSuisei | Dec 8, 2010 11:19 PM | 0 comments
This is a knowledge base, you should read this to help your understanding of video playback. If there is anything wrong that I wrote here, please leave comment (preferably in my profile, more chance of me actually reading it).

Container: Think of it as an envelope that contains video stream(s), audio stream(s), and subtitle stream(s). MKV, AVI, MP4, OGM are examples of containers.

Encoding formats: It is a format for audio/video compression. Examples include Xvid, H.264, MPEG-1, MP3, AAC, AC3, etc.

Decoder: This is for decoding a compressed audio/video back so it can be shown properly. CoreAVC, MPC Video Decoder, madFLAC are examples of this.

Video Renderer: This is for displaying the final video into the screen. Examples: EVR, VMR7,VMR9, Overlay Mixer, Haali renderer, madVR, etc.

Audio Renderer: Sends final audio to audio device.

Splitter: Used to split a container into it's contents. Haali Media Splitter is an example of this.

Post Processing: This is to further process a decoded video/audio so it will look more like what we want it be. It can include things like sharpening, noise removal, or even a simple resize.

Filters: This is a program to process a stream of data. By definition, decoder, renderer, and splitter are all filters. There are 3 types of filters used during playback: Source Filter (splitter), Transform Filter (decoder, subtitle filters, post processing, etc.), and Renderer Filter (video and audio renderer). ffdshow is a collection of transform filter, which includes many decoding filters, post processing filters, and subtitle filter.

Filter Graph: This is the chain of filters to process a multimedia file so it can be displayed properly. Also called 'filter chain'.

This is how a filter graph looks like:

If you don't understand, it goes like this:
- First, the media file is split into it's individual streams of video, audio, and subtitle by a source filter. It's not written, but I use Haali Splitter as the source filter.
- H264 video stream is decoded by CoreAVC, now it is in a raw, uncompressed form.
- The raw video is passed through ffdshow Video decoder. Note that I don't use ffdshow to decode here, but I use it for post-processing video.
- DirectVobSub takes the video output from ffdshow and a subtitle stream, then overlays the subtitle on the video.
- The final video stream is passed on to madVR video renderer to be shown on the screen.
- FLAC audio stream is decoded by madFLAC decoder. It is now an uncompressed audo stream.
- The decoded audio stream is passed on to the audio renderer.

That's how filter graph works basically.

Hardware Accelerated Decoding
Usually, decoding is CPU's work alone. With hardware accelerated decoding, it utilizes GPU to help CPU with decoding, thus, reducing CPU's work. This might help if you have a lower end CPU that can't do the decoding job fast enough. For Windows, this includes DXVA and CUDA.

Differences between DXVA and CUDA
I won't get into the too technical issue here, so I'll just give the differences that is important for us as users.
DXVA
+No GPU brand limitations, as long as they support DXVA (Intel cards needs Vista/7).
+Generally faster than CUDA.
-No intermediate filters allowed. (No subtitle filters nor post processing allowed). Decoded video must go straight to video renderer. Post processing can only be done with MPC-HC Pixel Shader.
-Can only use MPC internal subtitle for displaying subtitle.
-Only some video renderers can use it.
-Cannot decode videos encoded with ref frame exceeds ceratin values. (not DXVA compliant)
-Requires Vista/7 to fully utilize DXVA. It'll stil run on XP, just not as good.
-On ordered chapters, if a linked video has different reference frame than the main video, video playback will stuck.

Note that Intel GPUs need to be Intel G45 chipset or Clarkdale/Arrandale CPUs to use DXVA, and must use Vista/7.

CUDA
+Can use intermediate filters.
+Can use any video renderer.
+Can decode videos encoded with any ref frame.
+Runs just as well in XP as in Vista/7.
-Generally slower than DXVA.
-Can only be used by nVidia cards that support CUDA.
-Requires CoreAVC, which is not free.

When you want to use hardware acceleration, it is suggested that you have at least 256MB memory for your video card.

Note about nVidia card:
Some nVidia card, namely those with Pure Video 3, can't use hardware acceleration to decode videos with certain widths. This widths include:769-784, 849-864, 929-944, 1009-1024, 1793-1808, 1873-1888, 1953-1968 and 2033-2048 pixel wide. If you see that DXVA and CUDA are not working for these videos, that means it's not the video's nor the software setup's fault, it's your graphics card's fault.

Scaling: Scales the video size. When you fullscreen a 480p video in a 720p monitor, that means you are upscaling. When you play a 1080p video in a smaller screen resolution, that means you are downscaling.

Aspect Ratio: The ratio between horizontal size and vertical size. This is usually 16:9 for widescreen, or 4:3 for standard TVs.

Color Range: Range at which color is presented. Full range is 0-255, but usually TV can't display full range, so instead they have 16-235 range. Using TV range in PC monitor will make black looks gray.

Ordered Chapter: A feature of the Matroska container, this enables encoder to link video files. For example, a series that have the exact same opening and ending for several episodes can have all the OP and ED cut, make a single OP and a single ED, and use ordered chapter so when you play an episode, the OP and ED will be "spliced" into the episode so it's just like playing a full episode. This can cut down a lot of file size.

In Windows, you need Haali Media Splitter to play this properly. This is why VLC can't play ordered chapters, because they can't use Haali Media Splitter.

Anamorphic: In NTSC DVDs, videos are stored with a resolution of 720x480. This is neither 4:3 nor 16:9 aspect ratio, so encoders should set an anamorphic flag in the container so the video renderer will automatically resize the video to the correct aspect ratio.

Sometimes, encoder actually resize the video in the encoding process, instead of just setting a flag and let the renderer do the resizing. This is NOT a good way for encoding, especially if you like to fullscreen/zoom low-res video on a hi-res display, as this will mean the video undergoes 2 resize steps instead of one.
=================================================

I will add new stuffs as I learn more. If there is anything wrong here, please comment in my profile or PM me.
Posted by RedSuisei | Dec 8, 2010 10:00 PM | 0 comments
First of all, this guide is only for Windows user. Mac and Linux are not supported (more like, I don't use Mac and Linux so I don't know and I don't care).

Table of Contents
Changelog
To-Do list
Preface
Required Knowledge, and Knowledge Base
Preparations
Installing Stuffs
Configuring Your Setup
- Disabling Internal MPC-HC Matroska Splitter
- Change Your Video Renderer
- Change Your Subtitle Renderer
- Change Your Codecs
Custom Filter Chains
Post Processing
Shaders
madVR
Output Levels



Changelog
04-01-2011
Updated some information.

01-15-2011
Added information ReClock.
Update for 64 bit components.
Update some information.

12-09-2010
Made the guide.


To-Do List
- Adds more information as I research more.
- Add screenshots to better illustrate the guide.

Preface



Required Knowledge, and Knowledge Base



Preparations



Installing Stuffs


Configuring Your Setup



Custom Filter Chains



Post Processing



Shaders


madVR Settings



Output Levels


ReClock



Recommendation



Conclusion


Credits
* Doom9 forums. 70% of the information here comes from there.
* imouto.my, a site that includes a lot of explanations about DXVA and CUDA.
* EADFAGLOLZ (yeah, that's the name), a guide hosted at animemusicvideos.org with lots of theories and other things.
* My own experiments.
* Google.
* Reader.
Posted by RedSuisei | Dec 8, 2010 9:43 PM | 0 comments
It’s time to ditch the text file.
Keep track of your anime easily by creating your own list.
Sign Up Login