#1  
Old 09-10-2005, 11:07 AM
nhyone nhyone is offline
Talking mascot animal
 
Join Date: Mar 2003
Location: Singapore
Posts: 276
Default Encoding anime to view on the road (optimize for size)

I want to encode my anime to put in my notebook so that I can view them when I travel to work.

As one series can be rather long, 12 to 20+ episodes, the main constraint is size. Assuming I set aside 10 GB, it's sufficient for one series, but I want to squeeze as many into it as possible. [img]/images/graemlins/happy.gif[/img] However, I also want decent full-screen quality -- some macro blocking is fine in fast paced/dark scenes, but not all the time.

I'm using 2-pass XviD, recommended settings from the Gordian Knot tutorial, which I don't see any reason to deviate from.

My first try was quite conservative: 512x384 24 fps at 650 kbps with hardcoded subs; audio 96 kbps VBR. This resulted in 110+ MB for a 22-minute episode. The result was pretty good.

I wanted to go lower, but without much success. I tried 320x240, 416x304 at 350 kbps and 450 kbps, but there were too many artifacts at these rates. I don't know if the encoder is not optimized for such low bitrates, or am I simply asking for the impossible.

On the audio side, I wasn't able to use 64 kbps (either CBR/VBR); the sound came out weird after joining with the video; it played fine on its own. (The sampling rate was set automatically to 24 kHz; don't know if this was the cause.) 80 kbps works fine, but I'll prefer 64 kbps if possible (anime is mostly talking and BGM, not music).

I prefer hardcoded subs for ease-of-setup, but I'm going to remove the subs to see if it helps at low bitrates.


Has anyone tried to encode anime as compact as possible? [img]/images/graemlins/happy.gif[/img]

I'm thinking of something like 80 MB per 22-minute episode. Is it doable? [img]/images/graemlins/happy.gif[/img]
__________________
(void *) &NHY;

What does "Fond Zhramazhrista Spasityelya" mean? From this <a href="http://www.smallapple.net/tmp/russian_lost_in_xlat-tn.jpg" target="_blank">image</a>.
Reply With Quote
  #2  
Old 09-10-2005, 08:46 PM
Skywise's Avatar
Skywise Skywise is offline
Moderator Emeritus
 
Join Date: Mar 2003
Posts: 10,952
Default Re: Encoding anime to view on the road (optimize for size)

While I can't exactly give that much specific advice, at this point the only way you're going to be able to squeeze more out of the encode is by using filters. As we all know noise is the biggest obstacle to compression. Filters reduce the detail, and thus noise, in the image and makes it easier to compress.

There's a couple of types of filters that's relevant - one is a duplication filter. What it does is examine the difference between two frames, and if the difference is found to be small, it drops one of the frames and instead repeats it. This works particularly well for anime since the animation rate is lower than the frame rate usually. You will definitely need to run a IVTC filter (and deinterlacer) to convert the 30fps interlaced source to something progressive as well. Finally - get rid of any kind of composite noise and artifacts.

Try some of the ones on this page:

http://nullinfo.s21.xrea.com/

Experiment with them to find out what works best for you and the particular source material.
__________________
/skywise
No Blu-ray, no buy. No lossless audio, no buy.
Casual videophile
Reply With Quote
  #3  
Old 09-10-2005, 09:21 PM
nhyone nhyone is offline
Talking mascot animal
 
Join Date: Mar 2003
Location: Singapore
Posts: 276
Default Re: Encoding anime to view on the road (optimize for size)

It seems there isn't much room to experiment.

I tried 512x384 @ 500 kbps without hardsubs, there were too much macro blocking and mosquito noise.

The next thing to try is 600 kbps, and since it's so close to the previous 650 kbps I tried, I enabled hardsubs (to make viewing easier). It passed my visual test; it's not perfect, but it's not distracting.

Lowering the resolution would help at 500 kbps, but I have already tested that 416x304 @ 450 kbps doesn't look that great, so I'm not going that route.

Seems like 550-600 kbps is the lower limit.

The 64 kbps VBR works with the video once I set the sampling rate to 32 kHz.

The resultant bitrate (video + audio) is 4.88 MB/min. Seems to be the best I can do.


Just for info, the two titles I tested are Captain Tylor R1 and Macross R1. Captain Tylor R1 can be IVTC to 24 fps; Macross R1 is 24 fps.
__________________
(void *) &NHY;

What does "Fond Zhramazhrista Spasityelya" mean? From this <a href="http://www.smallapple.net/tmp/russian_lost_in_xlat-tn.jpg" target="_blank">image</a>.
Reply With Quote
  #4  
Old 09-10-2005, 09:30 PM
Skywise's Avatar
Skywise Skywise is offline
Moderator Emeritus
 
Join Date: Mar 2003
Posts: 10,952
Default Re: Encoding anime to view on the road (optimize for size)

Well that's just it - you're really pushing the boundaries. The only way you're going to be able to squeeze more out of it is by using filters. Even then there's a certain limit to how much you can do.
__________________
/skywise
No Blu-ray, no buy. No lossless audio, no buy.
Casual videophile
Reply With Quote
  #5  
Old 09-11-2005, 12:58 AM
raistlinmajere raistlinmajere is offline
Mysterious Thief
 
Join Date: Apr 2003
Location: Massachusetts
Posts: 3,889
Default Re: Encoding anime to view on the road (optimize for size)

Use x264 if your laptop is 800MHz or better. 1GHz+ if it's a Celeron. On2's VP6/VP7 are also good for low bandwidth, as is RealVideo 10. x264 will give you good enough 640x480 at as low as maybe ~60MB if you crank up the deblocking and don't mind the detail drop it will cause.

Also, if you're encoding with Virtualdub, try either SmartSmoother (or the HiQ version of it), or 2d cleaner plugins (neither built in), followed by temporal smoother (built in) or temporal cleaner (not built in) to make the video more compressible. I don't use those anymore, but I'm not going to give an in-depth encoding lesson.
Reply With Quote
  #6  
Old 09-12-2005, 12:44 AM
nhyone nhyone is offline
Talking mascot animal
 
Join Date: Mar 2003
Location: Singapore
Posts: 276
Default Re: Encoding anime to view on the road (optimize for size)

[ QUOTE ]
Raistlin said:
Use x264 if your laptop is 800MHz or better. 1GHz+ if it's a Celeron. On2's VP6/VP7 are also good for low bandwidth, as is RealVideo 10.

[/ QUOTE ]
I'm worried about long term support. Are the codecs available for different OS? Will the codecs be available for the next platform? RM is probably safe, but I've not heard of VP6/7.

Also, higher CPU usage would eat the battery fast.


[ QUOTE ]
x264 will give you good enough 640x480 at as low as maybe ~60MB if you crank up the deblocking and don't mind the detail drop it will cause.

[/ QUOTE ]
I will be interested to see the quality at 60 MB! I've seen some 320x240 RM files encoded at 3.33 MB/min (150 MB for 45 mins). Watchable, but absolutely no details!


[ QUOTE ]
Also, if you're encoding with Virtualdub, try either SmartSmoother (or the HiQ version of it), or 2d cleaner plugins (neither built in), followed by temporal smoother (built in) or temporal cleaner (not built in) to make the video more compressible.

[/ QUOTE ]
I'm using GKnot, which loads Avisynth script in VDubMod, so no VD filters?

I searched and found LoadVirtualdubPlugin(), convert to RGB, run the filter, and convert then back to YUY2. Don't know if it would work.
__________________
(void *) &NHY;

What does "Fond Zhramazhrista Spasityelya" mean? From this <a href="http://www.smallapple.net/tmp/russian_lost_in_xlat-tn.jpg" target="_blank">image</a>.
Reply With Quote
  #7  
Old 09-12-2005, 05:58 AM
nhyone nhyone is offline
Talking mascot animal
 
Join Date: Mar 2003
Location: Singapore
Posts: 276
Default Re: Encoding anime to view on the road (optimize for size)

Some screencaps.

Sample 1 (640x480 @ 990 kbps)
Sample 2 (512x384 @ 600 kbps)
Sample 3 (512x384 @ 600 kbps)
Sample 4 (512x384 @ 600 kbps)
Sample 5 (512x384 @ 650 kbps)

I don't think JPEG makes a difference, but if you think it does, you can change tn.jpg to .png to load the PNG version.

You can compare them against the original DVD source here.

600 kbps works well for Captain Tylor (since it's so low-motion and devoid of details), but not as well for Macross. I wussed out and used 650 kbps for it.
__________________
(void *) &NHY;

What does "Fond Zhramazhrista Spasityelya" mean? From this <a href="http://www.smallapple.net/tmp/russian_lost_in_xlat-tn.jpg" target="_blank">image</a>.
Reply With Quote
  #8  
Old 09-13-2005, 03:08 PM
 
Posts: n/a
Blog Entries: 1
Default Re: Encoding anime to view on the road (optimize for size)

I see you're encoding an old, Cel series.

XVid really likes to balk on these; film grain mostly just gets turned into blocking -_-

Yeah, x264 is an easy option. Especially if you turn the motion detection settings up, it deals with grain a lot better than XVid (and it has the deblocker).

Putting together an AVISynth script would be a slightly harder option. I can recomend a few things that are easy to do to clear away a chunk of the film grain/crap (and detail) if you like.

If you're still using XVid, there are a couple of settings that really improve quality that derrive from the defaults. Are you?

Edit: if you switch to .mkv over .avi you can use .ogg audio. 64kps? Pffft, you can push it below that if your speakers aren't too good and your hearing doesn't mind [img]/images/graemlins/tongue.gif[/img]
You could use soft subtitles too which would slightly decrease filesize needed. But I'm not sure what you're doing for subtitles now, so I'm not sure what making softsubs for .mkv would entale exactly.
Reply With Quote
  #9  
Old 09-14-2005, 08:35 AM
nhyone nhyone is offline
Talking mascot animal
 
Join Date: Mar 2003
Location: Singapore
Posts: 276
Default Re: Encoding anime to view on the road (optimize for size)

[ QUOTE ]
SirCanealot said:
Putting together an AVISynth script would be a slightly harder option. I can recomend a few things that are easy to do to clear away a chunk of the film grain/crap (and detail) if you like.

[/ QUOTE ]
Raistlin suggested some filters, and after googling, I found how cool filters are! [img]/images/graemlins/sdsmiley.gif[/img]

[ QUOTE ]
If you're still using XVid, there are a couple of settings that really improve quality that derrive from the defaults. Are you

[/ QUOTE ]
I suppose so. Doom9's GKnot guide gave pretty good explanations. I turned on those that I think would increase quality, but I don't use adaptive quantization, qpel and gmc.

[ QUOTE ]
Edit: if you switch to .mkv over .avi you can use .ogg audio. 64kps? Pffft, you can push it below that if your speakers aren't too good and your hearing doesn't mind [img]/images/graemlins/tongue.gif[/img]

[/ QUOTE ]
No alternative containers (worried about forward compatibility), and I think 64 kbps is low enough for now.

While I want low bitrate, it turns out that I place higher weight on quality than I expected.


[ QUOTE ]
You could use soft subtitles too which would slightly decrease filesize needed.

[/ QUOTE ]
I'm doing hardsubs to make playback as simple as possible. I can accept a little mosquito noise for the subs.

I know I'll regret this decision in the future, but by then, I'll need to re-encode to take advantage of newer codecs. [img]/images/graemlins/happy.gif[/img]
__________________
(void *) &NHY;

What does "Fond Zhramazhrista Spasityelya" mean? From this <a href="http://www.smallapple.net/tmp/russian_lost_in_xlat-tn.jpg" target="_blank">image</a>.
Reply With Quote
  #10  
Old 09-12-2005, 03:50 PM
raistlinmajere raistlinmajere is offline
Mysterious Thief
 
Join Date: Apr 2003
Location: Massachusetts
Posts: 3,889
Default Re: Encoding anime to view on the road (optimize for size)

A simple smoother decent for anime for AVISynth is MSmooth. Once again, I'm not going to make an AVISynth tutorial here, so I'm just giving you one that's simple to use.

VP6/VP7 are proprietary so little support unless FFMPEG eventually supports them. H.264 is an MPEG-4 standard (version 7) just like XviD is (version 2) and can be played by anything based on FFMPEG: FFDShow (codec for Windows), mplayer (multi-platform player), or VLC (multi-platform player).

For H.264, I'm not saying 60MB @ 640x480 will produce a very good file, but for most people, it's still quite watchable.
Reply With Quote
Reply

  Anime/Manga > Technical Forums > DVD & Home Theater Hardware


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 03:01 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.