Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th April 2008, 20:41   #1  |  Link
hollywood10s
Registered User
 
Join Date: Apr 2008
Posts: 29
AVCHD and Avisynth filters?

I am making videos for my website using a AVCHD camcorder and I'm wondering what filters I should use to get the most out of my encode using x264 in Megui? If I understand it correctly avisynth filters fix up the video source before it is encoded so that x264 can work as efficiently as possible? My source files are 1440x1080 AVCHD and they will be resized to 720x405 for viewing through my website. I would like to get the highest quality possible at a somewhat low bitrate (500kbps-1500kbps) Some people have mentioned Hqdn3d and I will try it but I wanted to know if there were any other filters that work well with HD source. I have read a lot of threads about different denoisers and such but I'm a little new to this and I don’t believe there is a ton of noise or other artifacts so I don’t know if filters will help or not. Anything to help in the compression and quality I'm willing to try. I am trying to gather as much info before testing because at the moment I’m working on an older AMD that takes a long time to encode. Thanks for all of your help.
hollywood10s is offline   Reply With Quote
Old 20th April 2008, 23:42   #2  |  Link
cogman
The Crazy Idahoan
 
Join Date: Jun 2007
Location: Idaho
Posts: 249
Quote:
Originally Posted by hollywood10s View Post
I am making videos for my website using a AVCHD camcorder and I'm wondering what filters I should use to get the most out of my encode using x264 in Megui? If I understand it correctly avisynth filters fix up the video source before it is encoded so that x264 can work as efficiently as possible? My source files are 1440x1080 AVCHD and they will be resized to 720x405 for viewing through my website. I would like to get the highest quality possible at a somewhat low bitrate (500kbps-1500kbps) Some people have mentioned Hqdn3d and I will try it but I wanted to know if there were any other filters that work well with HD source. I have read a lot of threads about different denoisers and such but I'm a little new to this and I don’t believe there is a ton of noise or other artifacts so I don’t know if filters will help or not. Anything to help in the compression and quality I'm willing to try. I am trying to gather as much info before testing because at the moment I’m working on an older AMD that takes a long time to encode. Thanks for all of your help.
The best thing you can do download avsp and then look at the different filters as you apply them (with the image blown up to huge sizes).

What you will find is that in some situations one filter fixes a problem quiet well while in others it fails miserably.

That being said, I like fft3dgpu, fft3dfilter, and fluxsmootht for denoising. dfttest works pretty good as well. MVTools is supposed to be the really good as well, but it comes at the price of more complex scripts and a slower encoding time.

If you have a multi-cored computer you will definitively want to check out the MT plugin to help speed up the script processing.

Mostly, with denoising, you don't want the output picture to be hugely different from the input picture, maybe a little cleaner looking (less grain) and possibly slightly sharper (the limited sharpening filter works well I hear). The end goal is usually to get the picture to compress better (sharping usually makes the video compress worse.)

Re-reading your post, you DEFINITIVELY want to use AvsP. It will give you pictures of individual frames after denoising saving lots of time, after that encode short segments using the trim function in avisynth. Once you are happy with that, encode the full thing and marvel at the beauty of it.

One last thing, for a resizing filter I like to use Spline36resize. Some people like Lancroz4resize (I think thats how you spell it) and I have heard blackmanresize in the avisynth beta is supposed to be fairly good as well.

You should note that order of operation is important when writing scripts. I prefer to do them in the order of Noise_filter->sharpen->tweak Colors->resize. But if you are really pressed for time then you can put resize in front of all that to get a faster encode (if you are downscaling, definitively don't put it in front if you are upscaling IMO).


Good luck, Oh, btw, your soul belongs to us now
cogman is offline   Reply With Quote
Old 20th April 2008, 23:52   #3  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
I think you are going about it the wrong way, and could develop the disease called filteritis. Instead of looking at the universe of filters and asking which should I use, you should look at your video and ask what needs correcting. So, what needs correcting in your videos?
Guest is offline   Reply With Quote
Old 21st April 2008, 01:05   #4  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
Well said. Some samples are in order if you're looking at a specific case.

In general, if you're recording from an AVCHD camorder, chances are it's consumer grade, and most likely has a fair amount of noise, especially if its a single chip variety. I've found that DV cameras tend to have a lot of chroma noise, so I would imagine this extends to AVCHD cameras as well. You might want to try out fft3dfilter/ fft3dgpu in their chroma processing modes like this:

fft3dgpu(plane=3, sigma=2) #moderate strength, chroma only
fft3dgpu(plane=3, sigma=4) #aggressive strength, chroma only

Just a couple suggestions

~MiSfit
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 21st April 2008, 03:31   #5  |  Link
hollywood10s
Registered User
 
Join Date: Apr 2008
Posts: 29
Most of the videos I will be encoding are fishing videos and have a lot of moving water and some other minor movement. I also do some tutorials that are more still video. Do you guys need still samples and if so how do I capture them from my videos? Or do you want a short video clip to look at? Im sure it does need some work with noise and other things my eyes just arent trained to see the imperfections. The videos look nice and clear to me Let me know what you guys need to give some more insite. Thanks again
hollywood10s is offline   Reply With Quote
Old 21st April 2008, 04:05   #6  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
We need video samples, unprocessed. I'm not sure how to extract these from AVCHD. What type of files do you have - M2Ts?

~Misfit
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 21st April 2008, 04:53   #7  |  Link
hollywood10s
Registered User
 
Join Date: Apr 2008
Posts: 29
They are MTS files. I have ulead video studio 11 and vegas 8.0.
hollywood10s is offline   Reply With Quote
Old 21st April 2008, 06:28   #8  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
Okay, try using TSMuxer to split out a small section of video = 10 seconds or so.

~MiSfit
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 21st April 2008, 12:51   #9  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by hollywood10s View Post
Im sure it does need some work with noise and other things my eyes just arent trained to see the imperfections. The videos look nice and clear to me
Classic early onset filteritis.
Guest is offline   Reply With Quote
Old 21st April 2008, 19:04   #10  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
rofl!

It's usually safe to assume that almost anything can use at least a _little_ filtering, especially if he's trying to push 720p at under 2mbit with lots of water / motion etc... let's give the guy a chance

~MiSfit
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 22nd April 2008, 07:29   #11  |  Link
hollywood10s
Registered User
 
Join Date: Apr 2008
Posts: 29
Im getting a "cant get data stream file" error when trying to open the MTS file using TSMuxer. Is there another way to go about getting a small clip for you guys. I have tried using ulead to output a clip to the original file type but its not playable. Here is a file I made of a short clip (http://www.megaupload.com/?d=KF84S8YJ). It is saved in the original filetype AVCHD. I hope you guys can view it. If not let me know if there is another way to get a sample to you.
hollywood10s is offline   Reply With Quote
Old 22nd April 2008, 08:02   #12  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
Your sample looks great to me.

I don't think it has enough resolution to merit 1080p, so I bob-deinterlaced it to 60p with TDeint, and then resized it to 720p. Looks fantastic, great motion, little to no noise.

Code:
AVCSource("C:\Users\Misfit\Desktop\sample_fishing.dga")
MT("
assumetff()
tdeint(mode=1)")
lanczosresize(1280,720)
I MT'd the deinterlace routine, so you can do without that if you want.

Try 720p60!

Consumer grade HD Cameras are very impressive these days!

~MiSfit
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 22nd April 2008, 18:12   #13  |  Link
hollywood10s
Registered User
 
Join Date: Apr 2008
Posts: 29
I guess Im not crazy, I thought it looked pretty good! So using the deinterlace option TDeint will automatically bob-deinterlace it to 60p? I read that this means that it doubles the number of frames in the video, right? Will this method help me lower the final bitrate maybe? The way I was doing the process before was outputing the AVCHD file to HDV (1440x1080) then loading that file into Megui and using yadif to deinterlace then lanczos resize then encode. Will this new method below create a better final enocode?

So my workflow should start by editing the video file in vegas or ulead, then use debugmode avi (let it run in the background while it encodes through Megui). Set up my avisynth script similar to what you have done (tdeint deinterlace), resize and let megui do the encoding. Then Im done!!

I will try this out on a few samples and see how it looks. So I dont need to mess around with any filters then (to get the vidoe to compress more)? Thanks again for helping me understand all of this. Its a lot of information to take in but Im pretty good at learning fast. The website that Im working on is my first, along with editing the picture files in photoshop, doing all of the video editing and encoding and all of the website updates!! Its all been a very steep learning curve but its very rewarding when it comes together.
hollywood10s is offline   Reply With Quote
Old 22nd April 2008, 18:31   #14  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
Tdeint can output same rate (30p) or double rate (60p). Tdeint(mode=1) is double rate (bobbing) as is yadif(mode=1)

Double rate looks more lifelike, since it preserves the original 59.94 pictures per second inherent with 29.97fps interlaced.

It may prove too challenging to encode / decode. 720p60 isn't easy. If that's true, you can just do tdeint() - which will same rate deinterlace (30p)

You can try some denoising filters, but your video is pretty durn clean!

~MiSfit
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 22nd April 2008, 19:12   #15  |  Link
hollywood10s
Registered User
 
Join Date: Apr 2008
Posts: 29
Very good. Is Tdeint(mode=1) the same as Tdeint(order=1)? I think it is, just wanted to make sure.
hollywood10s is offline   Reply With Quote
Old 22nd April 2008, 19:14   #16  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
Nope

The order parameter specifies the field order - be it top field first or bottom field first. The mode parameter specifies the mode tdeint operates in.

Check the manual for more detailed information.

~MiSfit
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 22nd April 2008, 19:54   #17  |  Link
hollywood10s
Registered User
 
Join Date: Apr 2008
Posts: 29
So in the past my avisynth script said (yadif=order1) so this means that I was encoding it a 30p instead of 60p. It seemed to play back smothly this way, is there an advantage to deinterlace to 60p from 30p other than at 60p it should be smoother and somewhat harder to playback? Will a 60p video enode better (percieved quality, lower compression)? I will be playing these back through flash, so I will experiment to see if a 60p video plays back fine on slower computers compared to the 30p version.
hollywood10s is offline   Reply With Quote
Old 22nd April 2008, 20:35   #18  |  Link
foxyshadis
Angel of Night
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
60p on flash is a lost cause, it's way too slow at rendering frames for that. Better stick with 30p, you can apply a little mv-blending if you want to make it look smoother but that's extremely slow. Otherwise just make do with what you can.

60p does require a higher bitrate to look as sharp, but not twice as much, usually closer to half again as much. It's a tradeoff.
foxyshadis is offline   Reply With Quote
Old 22nd April 2008, 21:11   #19  |  Link
Blue_MiSfit
Derek Prestegard IRL
 
Blue_MiSfit's Avatar
 
Join Date: Nov 2003
Location: Los Angeles
Posts: 5,989
Very true. I hadn't taken into consideration the effeciency of the flash H.264 decoder.

30p for the win

Also, if you're using YADIF, you might try yadifmod, or tdeint - see what looks best to you.

~MiSfit
__________________
These are all my personal statements, not those of my employer :)
Blue_MiSfit is offline   Reply With Quote
Old 23rd April 2008, 08:50   #20  |  Link
hollywood10s
Registered User
 
Join Date: Apr 2008
Posts: 29
What do you think about the resize filter? Sould I stick with lanczos to downsize or try another option? I am really impressed with the output mp4 file with what you guys have helped me with. At 1500kbps its very clear and that is with water and movement. Thanks

Last edited by hollywood10s; 23rd April 2008 at 09:25.
hollywood10s is offline   Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:43.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.