JPHiP Radio (21/200 @ 128 kbs)     Now playing: Melon Kinenbi - Kousui

Author Topic: Video Encoding  (Read 12692 times)

Offline maliciel

  • Subcru
  • Member+
  • Posts: 5336
Video Encoding
« on: November 28, 2009, 04:52:55 AM »
So I decided to try my hand at encoding x264 to put this Q6600 to good use. I ended up with this. I would appreciate some input from you guys as 'users' as well as encoders to see if I'm going wrong anywhere. I used meGUI with the following .avs:

Code: [Select]
yadifmod(order=1,edeint=nnedi(field=-1))
That first PV (Watanabe Mayu's) was encoded to 60fps with a 100mb limit on bitrate. Of course, this was before I learned that 60fps only makes a difference on a 30i source off the DVD as opposed to just the DVD itself. Which this wasn't. Lol. But it was good to see how fast the encode went. I'm uploading another encode that uses constant quantizer instead of bitrate to determine quality, and I think it works better. It's also 30fps, which makes it way better in that sense.

I've tried TGMC besides yadifmod, and while the results look fucking awesome I'm not keen on encoding at 2.5fps on a Q6600..

Offline Datalanche

  • ecchi
  • Member+
  • Posts: 2439
Re: Video Encoding
« Reply #1 on: November 28, 2009, 07:14:24 AM »
I've tried TGMC besides yadifmod, and while the results look fucking awesome I'm not keen on encoding at 2.5fps on a Q6600..

Indeed. Still green to x264, but wanting to learn, I tried Akiba Online's Megu IV that simplifies the process. It took about an hour and a half for 5 1/2 minutes of video. The result is pretty stunning picture, but it would take a whole day to do a one hour video on my 3GHz dual core. Sheesh.  :nervous

Your encodes look pretty flawless to me. I can't really recommend much since you've taught me the little I know so far. XD

Offline atskv9

  • ecchi
  • Member+
  • Posts: 1335
Re: Video Encoding
« Reply #2 on: November 28, 2009, 10:29:07 AM »
I downloaded the Miyazawa Sae focus PV. Not sure if you caught it, but shouldn't the video be resized to a 4:3 resolution? It was still 720x480 resulting in a 5:4 aspect ratio. Corrected that with my media player easy enough. After watching a bit I realized you were using a newer version of x264 (as everyone should!) when I started seeing artifacts due to CoreAVC not being able to support weightp.  But everything looks good imo. Great detail on plenty of features XD I'm guessing you're one of the encoding guys that participates in the "IV Encoding Tips & Tricks" on A-O so you're likely more fluent than I am at encoding...

I actually have a question myself. I know that you are doing a double rate bob with yadifmod but what do you mean by "source off the dvd" versus "the DVD itself"?
That first PV (Watanabe Mayu's) was encoded to 60fps with a 100mb limit on bitrate. Of course, this was before I learned that 60fps only makes a difference on a 30i source off the DVD as opposed to just the DVD itself. Which this wasn't.

Lol, you're complaining about 2.5fps for TGMC! I'd likely run it at .3fps. It already takes me 6 hours to encode something on my centrino duo (slower preset and no deinterlacing!).

Offline maliciel

  • Subcru
  • Member+
  • Posts: 5336
Re: Video Encoding
« Reply #3 on: November 28, 2009, 03:44:33 PM »
Not sure if you caught it, but shouldn't the video be resized to a 4:3 resolution? It was still 720x480 resulting in a 5:4 aspect ratio.

I did, but didn't. I was looking for a reason as to why my encodes were slightly larger, but guess who forgot to resize his video? Fuck you DAR, fuck you up the ass.

Quote
I'm guessing you're one of the encoding guys that participates in the "IV Encoding Tips & Tricks" on A-O so you're likely more fluent than I am at encoding...

I'm not, as seen by my newbie-ish mistake. Also, I happen to know someone who does, so I get him to explain shit to me. Lol. I guess I said it all wrong with that DVD thing. What I meant is, all DVDs are interlaced, but the source itself needs to be 30i for 60fps to look any different. As it is the Mayu PV looks exactly the same as 30fps (because the 'interlacing' is really just each frame repeated), but requires more power, because the media player needs to play it at 60fps. If i'm making any sense at all.
« Last Edit: November 28, 2009, 03:57:30 PM by maliciel »

Offline LaJon

  • King Lurker
  • ecchi
  • Member+
  • Posts: 1878
Re: Video Encoding
« Reply #4 on: November 28, 2009, 04:00:46 PM »
Oo a video encoding thread.  8)

I should do some 60fps encoding.  Haven't done it in a while, and I just got a Core i7 3GHz not too long ago.

Update:  x264 insane profile + MCBob on Takahashi Ai's making of for "I" = ~3.9fps

Quite a bit faster than the last time I did this stuff lol
« Last Edit: November 28, 2009, 04:54:38 PM by LaJon »

Offline maliciel

  • Subcru
  • Member+
  • Posts: 5336
Re: Video Encoding
« Reply #5 on: November 28, 2009, 05:19:04 PM »
Ok, I posted a new encode, this time with actual resizing done so it doesn't get stretched. Atskv9, can you cap what you mean? Or does it only work if it's in a video? I read up on the weightp issue, but I can't see a difference using CoreAVC/ffdshow..

Offline atskv9

  • ecchi
  • Member+
  • Posts: 1335
Re: Video Encoding
« Reply #6 on: November 29, 2009, 01:24:55 AM »
Here's an example of CoreAVC not being able to support weightp:


Supposedly CoreAVC 2.0 will be able to support it but I have no clue if it's out yet. I haven't been to Doom9 in a week or so. Just to test, I played the video with ffdshow and it works fine (since it supports this feature).

What I meant is, all DVDs are interlaced, but the source itself needs to be 30i for 60fps to look any different. As it is the Mayu PV looks exactly the same as 30fps (because the 'interlacing' is really just each frame repeated), but requires more power, because the media player needs to play it at 60fps. If i'm making any sense at all.
Yeah it makes sense. I knew the source needed to be 30i for 60fps to make a difference but I wasn't sure if I was missing something :)

Offline maliciel

  • Subcru
  • Member+
  • Posts: 5336
Re: Video Encoding
« Reply #7 on: December 14, 2009, 11:15:06 AM »
A 60fps encode, this time from an interlaced source.

Using TempGaussMC. It took 2 hours, but the results are pretty sweet. Save for that one line I missed while autocropping orz.

Offline atskv9

  • ecchi
  • Member+
  • Posts: 1335
Re: Video Encoding
« Reply #8 on: December 20, 2009, 05:39:20 AM »
2 hours for 3.5 min, totally worth it! XD :twothumbs

Maliciel, you were mentioning figuring out how to cut a TS file over here... just in case you hadn't found it before, there's some tools at VideoHelp that will help you out.

Offline maliciel

  • Subcru
  • Member+
  • Posts: 5336
Re: Video Encoding
« Reply #9 on: December 22, 2009, 04:08:37 AM »
Ah yes! Thank you.

I tried a few of those, namely mpg2cut (which didn't work at all) and Project X. Project X worked fine; the interface sucked balls (no thanks to Java), but it did the work. So now I can upload more .ts files! I tried encoding the .tses, but that resulted in bigger files that looked shittier..

:nervous

Offline Silverbolt

  • Member+
  • Posts: 149
Re: Video Encoding
« Reply #10 on: March 19, 2010, 06:51:55 PM »
Here's something fun for the community here: a video blind test!

I have two copies of the same clip. One was deinterlaced with TempGaussMC_beta2 and the nnedi2 interpolator, and the other was deinterlaced with TDeint and its default kernel interpolator. Both were encoded with the same x264 settings:
x264 --crf 23 --sar 40:33 --profile main --tune film --aq-mode 2 --colormatrix smpte170m

I would like everyone to answer the following questions:
  • Did you notice a quality difference between the clips?
  • If so, which did you like better?
  • While watching, did you even really care about the quality difference between the two?
  • Do you think that the quality difference is worth a 20x slowdown in encoding speed?
There are a few rules to this test:
  • Watch from a normal viewing distance away from your display device. Don't sit just a few inches away from the monitor. Sit back and relax in your seat.
  • Watch the videos at full-speed. Don't pause the videos and compare stills.
  • Pay attention to the content of the videos. Don't analyze the videos for video quality issues. In other words, behave as if you are actually just watching the video.
Now that you know all the rules, here is the link to the test videos: http://www.mediafire.com/?zm1zznoo4gz
It's a making-of for AAA's Break Down PV. (I had the HEARTFUL DVD sitting on my desk)

Have fun :) and don't forget to tell your friends, even the not-familiar-with-video-encoding people. I want to see feedback from a lot of different people.

Offline maliciel

  • Subcru
  • Member+
  • Posts: 5336
Re: Video Encoding
« Reply #11 on: March 21, 2010, 07:26:07 AM »
Did you notice a quality difference between the clips?

A little, but not much.

If so, which did you like better?

The second one. This being what I think is the TGMC encode.

While watching, did you even really care about the quality difference between the two?

Not particularly.

Do you think that the quality difference is worth a 20x slowdown in encoding speed?

Not in this case. I think the quality difference gained from using tgmc is worth it for image videos, but overkill for everything else.

As an aside, why do you use the --tune switch? Is there much of a difference?

Offline Amplifier

  • Global Moderator
  • Member+
  • *
  • Posts: 10119
Re: Video Encoding
« Reply #12 on: March 21, 2010, 10:49:05 PM »
Did you notice a quality difference between the clips?
Yes

If so, which did you like better?
The second

While watching, did you even really care about the quality difference between the two?
Not especially, because it wasn't terribly significant of a difference

Do you think that the quality difference is worth a 20x slowdown in encoding speed?
Definitely not, at least if I was doing it myself. I might consider it if I had a dedicated computer for that sort of thing.

Offline daigong

  • Communist Master of Ass
  • Administrator
  • Member++
  • *
  • Posts: 50223
    • daigong
    • daigong
    • daigong
    • 111403287599703511524
Re: Video Encoding
« Reply #13 on: March 22, 2010, 12:36:09 AM »
Did you notice a quality difference between the clips?
Not really

If so, which did you like better?
The second one seemed crisper.

While watching, did you even really care about the quality difference between the two?
Nope, both seemed pretty sharp esp. when they were off set.

Do you think that the quality difference is worth a 20x slowdown in encoding speed?
It's not, unless you encode really fast lol

Offline maliciel

  • Subcru
  • Member+
  • Posts: 5336
Re: Video Encoding
« Reply #14 on: March 22, 2010, 02:38:01 AM »
I finally got motivated to mess around with MT Avisynth..



:cow:

Offline Silverbolt

  • Member+
  • Posts: 149
Re: Video Encoding
« Reply #15 on: March 22, 2010, 03:52:17 AM »
^Wow... At least you're getting good use out of all of your cores. I like to use --tune film because it lowers deblocking and increases Psy-Trellis, both of which I used to do manually. Plus, the developers recommend it for live action footage.

Keep the test results coming, guys. :)

Offline maliciel

  • Subcru
  • Member+
  • Posts: 5336
Re: Video Encoding
« Reply #16 on: March 22, 2010, 01:27:51 PM »
Indeed.

It's a whole 100% improvement on tgmc encoding without Avisynth MT. I've been wrestling with MT for a while, and someone explained it to me in simple terms so I was finally able to get it up and running. I'd been using Akiba-Online's MeguIV to do my tgmc encodes - since it uses MT and other speed options - but for some reason it stopped co-operating, and since it was a sandbox environment I couldn't change anything. My last adventure with tgmc was done at a blazing 2fps average, and took about 18 hours. So I welcome any sort of speed improvement.

Nonetheless, I think I'll wait till a nice IV pops up to give my comp a full day's work with tgmc.

Offline Silverbolt

  • Member+
  • Posts: 149
Re: Video Encoding
« Reply #17 on: March 24, 2010, 05:34:19 AM »
Honestly, I'm not really that big a fan of pre-encode deinterlacing. If the source is really interlaced, I very much prefer to just encode it interlaced and use deinterlacing during playback. Pretty much every video card made within the past 5 years has a decent deinterlacer. Modern video cards from ATI and NVIDIA (even the low-end ones) have really high-quality deinterlacers. Quality-wise, they probably fit somewhere in between the deinterlacers used in the test videos. Plus, encoding interlaced requires less bitrate than encoding 60 FPS progressive. The same AAA video with the same x264 settings (aside from --tff) ended up being 32.3 MB, compared to the 44.6 MB and 40.2 MB for the test videos.

Offline atskv9

  • ecchi
  • Member+
  • Posts: 1335
Re: Video Encoding
« Reply #18 on: March 29, 2010, 06:54:46 AM »
Did you notice a quality difference between the clips?

A little.

If so, which did you like better?

Second clip looked a little better.

While watching, did you even really care about the quality difference between the two?

Not especially.

Do you think that the quality difference is worth a 20x slowdown in encoding speed?

Not in this case. I'm sure there may be sources though that will look much better if TGMC is used and it may be worth it, but that's coming from another encoder, where I've trained myself to look for defects in encodes.

Offline Silverbolt

  • Member+
  • Posts: 149
Re: Video Encoding
« Reply #19 on: April 05, 2010, 06:32:31 AM »
It has been a few weeks, so I'll close the test. The results are pretty much as I expected... Everyone picked the TGMC clip as the better looking one, and I agree. TGMC is an excellent deinterlacer that creates a very crisp image. But, everyone pretty much agreed that, at least for this source, there wasn't a big difference between TDeint and TGMC, and under normal viewing conditions, no one's really gonna care.

So, what was the point of this test? Well, I've been encoding video for years, and I've seen the trend move slowly but surely towards more and more filtering, which I am not a big fan of. It might be because I was in the scene from way back during the DivX 3 days, but my mindset when encoding video is and has always been to reduce file size while trying to preserve the source video. Nowadays, the mindset of a video encoder seems to be to try to find a magical set of Avisynth filters that "improve" upon the source video.

My complaint isn't totally against deinterlacers because I agree that 60 FPS is better than 30 FPS for pure interlaced sources. I'm glad to see more and more encoders realizing the smooth motion that 60 FPS videos provide, but this is something that I have been preaching for a very long time, just in a different way. Like I said above, I prefer to encode interlaced and deinterlace during playback. Again, it's all about the different mindsets: encoding interlaced (preserving the source) vs pre-encode deinterlacing to 60 FPS ("improving" on the source).

My real complaint is with noise reduction filters. Time and time again, especially with fansubbing groups, I see videos that have been over-filtered, completely destroying fine detail and giving the video a really muddy look. I understand the need for noise reduction filters when dealing with sources that are overly noisy or blocky, but I don't really think it's necessary for most video sources. People tend to forget that the human eye likes a little noise in the video. It likes to see that very fine detail, yet so many encoders filter it out in their attempts to "improve" on the source video. That's why I really like the x264 developers. They understand what the human eye likes to see, and their psychovisual enhancements (AQ, Psy-RD, Psy-Trellis) are all designed to help preserve the fine detail found in the source video. Again, the key here is preserving the source.

Maybe I'm just "old-fashioned," but I can't justify spending so much CPU time filtering video when my current encoding settings blaze along at 2x realtime and still produce high-quality encodes. :D

BTW, activating hardware deinterlacing during playback is pretty simple in ffdshow:

It reads the flags in the video, so it knows when to deinterlace and when not to. I'm not sure how to do it in other decoders, but it's probably even simpler than this.

JPHiP Radio (21/200 @ 128 kbs)     Now playing: Melon Kinenbi - Kousui