Log in

View Full Version : Problem Encoding Anime From Xvid Raws


Ginta
3rd November 2003, 16:12
Well, I have quite some experience encoding Anime now, but this is the first time I'm facing this problem:

I got an anime raw in xvid and I am re-encoding it using filters in order to reduce its noise and artifacts. The problem is: while I am encoding, the codec + VirtualDub seem to be doing all their jobs properly, but when I try to play the file, the players don't run it properly, showing nothing more than 3-10% of all of the encoded frames :angry: !!!

When I go back to VirtualDub, and only on VirtualDub, and I play the file I've just encoded, apparently I can see all of the frames there, except that there's some lag between audio and video!!

I don't understand what I might be doing wrong... I've made a lot of similar encodes before, and I've never faced it. The only difference here is that this is the first raw in Xvid I'm working with (all of my previous raws were natively encoded on Divx 5.05).

Some useful information:

- Even if I encode the file in DivX 5.x I have the same problem;
- I'm using Koepi's latest unstable build;
- The problem persists even if I encode in XviD without B Frames or in DivX 3.11 SBC;
- The problem persists even if I don't use AviSynth to frameserve.

Thanks

Nic
3rd November 2003, 16:49
Can you check what directshow filters are being used to play the XviD video file you've created and report back...
(By loading it into media player classic or similar you can check the filters being used)

Ginta
3rd November 2003, 17:45
Well, the filters being used are:
- Default Direct Sound Device;
- Matrix Mixer V. 0.2a;
- a filter called Matrix Mixer 003 (don't know why it's here but it's exactly the same as Matrix Mixer V.0.2a;
- Morgan Stream Switcher;
- Morgan Stream Switcher 005 (which is the same as above);
- Video Renderer;
- XviD codec

Ginta
3rd November 2003, 20:17
Well... I've just played my files on Linux... and the problem was the same...

APF_Gandalf
4th November 2003, 03:29
could you provide a sample of the raw and eventually your avs script.
I encode anime from/to Xvid quite every day and never encounterd something like that.
also which Vdub build are you using, have you tried to "load defaults" in Xvid?
what's the original framerate of the raw?
which codec is used for the audio?
have you tried to encode it without sound? -killaudio() in avs-

Ginta
4th November 2003, 09:12
Well, now I realize what I was doing different... I am such a moron... :)

This is the first time I got a raw with 120 fps (that was the problem, and I didn' think of that before), and I didn't know how to deal with it...

I solved the problem by converting it from 120 fps to 24 fps (24 because I noticed that to every 5 frames, 4 were repeated frames)...

That's it
:D

Thank you guys!

Neo Neko
4th November 2003, 10:53
WTF? 120Fps? What is the use in that? Unless the source were some weird interlaced 60fps hybrid PAL/NTSC sources that only exist in a few isolated countries. I have gotten many raws before but never seen one like that. :confused:

MentholMoose
4th November 2003, 12:36
Originally posted by Neo Neko
WTF? 120Fps? What is the use in that? Unless the source were some weird interlaced 60fps hybrid PAL/NTSC sources that only exist in a few isolated countries. I have gotten many raws before but never seen one like that. :confused: I think this thread (http://forum.doom9.org/showthread.php?threadid=49561) explains it.

K_R
4th November 2003, 16:05
A lot of anime raws are in 120fps for some idiotic reason.

winman
4th November 2003, 18:48
That is because a lot of anime are hybrid with 30fps for the opening/ending credit and 24fps for the main content. The 120fps allows smooth playback of the hybrid content. Both XviD and DivX encoders support frame-dropping which drop the duplicate frames so 120fps does not increase the file size that much.

Problems only crops up when you try to reencode and edit the video... A couple of Decimate() should help.

Zarxrax
4th November 2003, 22:31
For dealing with this is it better to use regular decimate, or Decimate(mode=2)?
I always use mode=2, but I'm wondering if the other way would work just as good (or better)?

Neo Neko
4th November 2003, 23:05
Originally posted by winman
That is because a lot of anime are hybrid with 30fps for the opening/ending credit and 24fps for the main content. The 120fps allows smooth playback of the hybrid content.

But I guess what I am wondering is how 30fps does not? I mean after all if that is indeed what they are doing how can the final result honestly be smoother than the original. It was 30fps after all. 60fps would mean you are turning fields into frames which is of questionable usefullness as is. So I utterly fail to see the benefit of 120fps. I don't care if the codec uses more drop frames and keeps the file size close. It just seems utterly useless. You are not realistically going to get any smoother than the original.

Originally posted by winman
Problems only crops up when you try to reencode and edit the video... A couple of Decimate() should help.

Well that is as I understand it what most people do with raws. So why then the useless 120fps step?:confused:

Ginta
4th November 2003, 23:12
After testing the modes, I figured out that the mode 2 was the best mode, 0 and 1 caused the motion not to be smooth sometimes, and tended to decimate incorrectly...

winman
5th November 2003, 02:14
So far, these setting provide the best result for me when doing 120->24. The mode=3 helps keep the opening/ending smooth when running at 24fps.

Decimate(cycle=2)
Decimate(cycle=2)
Decimate(cycle=5,mode=3,threshold=1)


The MultiDecimate(pass=1) filter log (mfile.txt) is very usefull for checking for duplicate pattern (before and after decimation). I don't use MultiDecimate for the actual decimating process because it tend to kill static scenes even with the "protect static scenes" mode on. Also, the current verion does not support YV12.

ConvertToYUY2()
MultiDecimate(pass=1)

Enraging_Angel
5th November 2003, 08:51
If you're dealing with 120fps then you're probably dealing with hybrid material. But it isn't REALLY 120fps. That is what the drop frames are for. 120fps with null frames aren't quite the same as actually adding in a REAL blended, duplicated or interpolated frames. Making hybrid material into pure 30fps won't make it smoother, but making it a "pseudo"-120fps hybrid will (if you know what you're doing)

To see what I mean by "pseudo"-120fps...play your 120fps file in wmp and go to File->Properties->Advanced(tab) and double click Video Renderer. If you look at the "Average Frame-Rate Achieved" You will notice that it will say 24fps or 30fps and not 120fps. It will also switch between 24fps and 30fps throughout the video. Whereas if you actually converted it to 30fps then it will say 30fps throughout.