There's a film I shot in DV and HDV, mainly because of budget restrictions I had. The intention had been to try blowing the SD material to HD later on, all to be edited in Avid Media Composer in an HD timeline.
Following some tips I got from Doom9, I got to do some tests that proved quite promising. So I ended up blowing things up with ffmpeg using an avisynth script that read like this:
What I would like to know is if there are other options to do this, instead of going through ffmpeg.Code:import("C:\video\AviSynth 2.58\plugins\BlindDeHalo3.avs") AVISource("h:file.avi") trim(1991,3000) converttoyv12(interlaced=true) TempGaussMC_beta1mod(EDIMode="NNEDI2") nnedi(field=0,dh=true).TurnRight().nnedi(field=0,dh=true).TurnLeft() spline36resize(1280,960) BlindDeHalo3(rx=3.2,ry=1.5) sharpen(0.3) spline36resize(1920,1080) return last separatefields.selectevery(4,0,3).weave
+ Reply to Thread
Results 1 to 26 of 26
-
-
only ffmpeg for free; but you can do it through any software that can access quicktime API (e.g. premiere pro with .avs import plugin, vegas with avisynth virtual file system AVFS) , if you have dnxhd installed
the upscaling part is done by avisynth and your script
the encoding part is done by ffmpeg
What is your question? Are you asking for other upscaling methods ? other import formats? or other encoding options?
The problem is trying to get quicktime to "read" an .avs script. You can with AVFS , just add ConvertToRGB24() at the end of the script. -
It has to be for free. I use Avid, not Premiere or Vegas. So I do have dnxhd installed.
I upscaled my two longer shots with ffmpeg two weeks ago. But on the third shot I tried yesterday I'm getting this error:
http://www.mediafire.com/i/?mzahzzjiymy
As the script is the same, only changing the avi shot, and the ffmpeg variables are also the same, I wonder why I'm getting this error.
What is your question? Are you asking for other upscaling methods ? other import formats? or other encoding options?
The problem is trying to get quicktime to "read" an .avs script. You can with AVFS , just add ConvertToRGB24() at the end of the script. -
judging from that error message I would say something is wrong with your script . It's reading the dimensions as 840x80, which isn't compatible with DNxHD
What you open your script in vdub, and use file=>file information what does it say?
There are no other options for encoding to dnxhd. On windows, it has to be done through quicktime API (some of those programs I mentioned, or maybe mpegstreamclip). So you need quicktime installed. If you are trying to use avisynth that's even harder, because quicktime doesn't understand avisynth. The only reliable way is frameserve through AVFS.
You could also try encoding your avs script to uncompressed AVI, then feed that into ffmpegLast edited by poisondeathray; 19th Mar 2010 at 14:33.
-
I'm ashamed to confess that the error was mine and simpler than I thought it might be: wrong directory for the avi file on the script.
It would be longish and unnecessary to explain why it happened, but I tried that and it worked. My fault and I'm sorry for my mess. Conversion went fine.
Now I have a different problem: where to put the trim line for it to work. I'm working on upscaling another shot, using the same script as on my first post above.
The problem is where to place the trim line. It doesn't work as it should where it is now: I get one frame long shot.
Where should the trim line be placed for it to work correctly? -
Use AvsP and figure it out the start & end frames of the section you want to keep.
It is usually after you bob it (so after TGMC) , because the frame count is doubled. Once you have that section Trim(start,end) , then you can re-interlace it -
Nothing happens after the 'Return Last' line. Therefore it's not being reinterlaced. Therefore the framecount remains doubled. Therefore your Trim statement is trimming about 995 to 1500 of the original frames.
Is the DV BFF to begin with? If so, do you know you're reversing the field order (after you get the reinterlacing going again)? Nor do I think TempGaussMC the best bobber for this kind of work. -
OK. Now that I put the trim line after TGMC things were fine.
Is the DV BFF to begin with? If so, do you know you're reversing the field order (after you get the reinterlacing going again)? Nor do I think TempGaussMC the best bobber for this kind of work.
Which bobber would you suggest for this application? -
Sorry. I didn't know the terms Bottom Field First or Top Field First could be named with BFF or TFF.
AFAIK all DV is captured as BFF, from what I could find out. These particular videos were captured with WinDV, and you can't specify on it what you want it to be.
Also what I don't know is what Avid does when it imports the video. -
As long as you reinterlace after the 'Return Last' line, it doesn't get reinterlaced. Either remove it entirely (there's no need for it at all, as near as I can tell), or make it the very last line.
Correct me if I'm wrong because interlaced video isn't my strong suit, but if you put an 'Info()' line at the end of the script, doesn't it show as TFF? He never had an 'AssumeBFF' before beginning the reinterlacing. The SelectEvery(4,0,3) does it (unless I'm very mistaken). There's nothing really wrong with reversing the field order except for...
Just about anything other than TempGaussMC. It's good at doing away with aliasing, but it affects both fields. If the aim is to upsize with as little filtering otherwise as possible (except for what you put into the script), then something like Yadif is fine. All TempGaussMC does is slow the encoding to a crawl. The visual difference might be slight but the encoding speed difference is significant.
Most bobbing deinterlacers will keep one field the same and interpolate off of it to bob the second field (that's a simplistic explanation, I know). When reinterlacing you want to use the unfiltered field which usually, in the case of BFF, means the bottom field. So, I'd use 'SelectEvery(4,1,2)'. It keeps it BFF and should result in slightly better quality. Alexander taught me this. Where are you Alexander (or Gavino)? Did I mess up your teachings?I'd reinterlace it like this:
AssumeBFF()
Yadif(Mode=1)
#Upsize, Halo Removal, Sharpen
AssumeBFF()
SeparateFields()
SelectEvery(4,1,2)
Weave()
Also, I see no need for resizing twice. Is there really a Doom9 thread that recommends all the things you've done the way you've done them? Is there a link? Or, as I suspect, have you taken bits and pieces from various threads and posts to come up with this? -
Oh yeah, you're right. I was testing with an MPEG, and it seems to behave differently. Thanks for the correction.
I'll apologize to carlmart for needlessly confusing the issue. I still see no need for TempGaussMC or for the double resize (although maybe there's a reason for doing it that way I haven't noticed yet). -
-
-
You're not misunderstanding, and maybe I just should have deleted or heavily edited that earlier post. It's probably reversing a reversal bringing it back to BFF. Or something. As I said later on, I was testing with an MPEG and his first script didn't work right with it.
Do you agree that just about any bobber will work well for this, as long as you're careful to use the original uninterpolated field when reinterlacing - that there's no need for the excruciatingly slow TempGaussMC? -
There's a thread I begun there a long time ago on this upscale, and the tips I got were from there.
http://forum.doom9.org/showthread.php?t=145314
I do not know enough to come up with this scripts yet.
If you look at post #162 you will see that I agree that Yadif was marginally better for deinterlacing. It showed quite well in AvsP.
But a few posts below, our friend Poison argued that yadifmod+nnedi2 could leave artifacts. So I went in a different direction.
The problem I was having was a different one, as there was an artifact I described later on, that I thought might be related to yadif. But it was not, and apparently might be an Avid codec problem.Last edited by carlmart; 21st Mar 2010 at 06:49.
-
Just to be more thorough. The artifact I have sometimes is like this. Imagine a circle which splits horizontally in two, and you see them displaced for a split second, sometimes in two places at the same time.
At first I thought it might be something related to Avid and its video player, which is QT, or even the video board. But when I used a Geforce 9600GT, things were crystal clear, so it's not hardware related.
My guess was it might be related to the deinterlacing plug-ins, as the artifact always happens in movements: subject, pan or camera movement. It's a split second, so it doesn't show when you view it frame by frame.
Any suggestions?
1) The name of this artifact.
2) Tips to avoid them. -
-
This sounds like a tearing artifact, and a playback issue. If you watch videos through flash player (e.g. youtube) you can consistently see this
Post a sample to provide more information
But a few posts below, our friend Poison argued that yadifmod+nnedi2 could leave artifacts. So I went in a different direction. -
Sure, but that's not what I said, or not what I intended to say. With regular old bobbers, ones like TDeint in bob mode, LeakKernelBob, Yadif in bob mode, etc. (but not TempGaussMC), the new frame will contain one untouched field and one interpolated from that field in various ways. Heck, probably even AviSynth's basic Bob() should be OK for this. Then you go ahead and filter it (here resizing, dehaloing, and sharpening). And when the time comes to reinterlace it, you want to make sure you use the field that hasn't been created by interpolation in the first place, the one that was originally untouched before the filtering took place. But both fields from a TempGaussMC bob have already been filtered prior to being additionally filtered (in carlmart's script). The AviSynth page says this about it:
Motion-compensated bob deinterlacer, based on temporal gaussian blurring. Reduces noise/grain of the source and does NOT leave the original fields unchanged.
Which isn't to say it's bad, just that it wasn't intended for this job and is overkill for what the bobber is needed for in this kind of a script.
Maybe that makes more sense. Or maybe not. And maybe you don't even agree. I don't know. -
I see what you're getting at, but once you introduce resizing into the post-deinterlacing filter chain, you are inevitably mixing data from both fields, so in principle you want that data to be as good as possible.
You may well be right that TempGaussMC is overkill in this case, but I think that would depend more on the quality of the OP's source material. -
That is next to impossible to implement, at least from what I know. The original DV shot plays flawlessly, and the converted mov/DNxHD file proved unplayable except inside Avid after it imports it.
It is not in the original or even shows in Avid when you play frame by frame.
That's why I think it's a temporary playback issue, that hopefully will not be there when I export the final edit.
Actually they ALL leave artifacts. They ALL have problems. You will find TGMC might let a few frames pass through with jaggies, but overall is usually better than most deinterlacers. Sometimes you have to tweak the settings to get the best out of it. I've gone so far as to mix & match frames from different deinterlacers.
But you are right: I'm sure all plugins leave artifacts. The ones I care more are those that show more. Some are just a fair price to pay for some other benefit.
I also want to learn how to tweak the settings, as most are still chinese for me, difficult to grab. -
This is trivial to do in an editor, but it can get as difficult as you want it to be. You basically make as many versions as you want (you might make several different TGMC versions with different settings, throw in some MCBOB versions, etc.... and mix and match the best frames from each), you can even do this in avisynth, but it's a lot easier to do in a NLE like premiere, vegas or avid etc...
But you are right: I'm sure all plugins leave artifacts. The ones I care more are those that show more. Some are just a fair price to pay for some other benefit.
If you can't provide a sample or see it on a frame by frame basis when scrubbing, I suspect the ones you describe are probably from playback issues (screen tearing & video refresh).
I also want to learn how to tweak the settings, as most are still chinese for me, difficult to grab.
Similar Threads
-
Video Upscaling?
By Xdecade in forum EditingReplies: 9Last Post: 21st Jan 2010, 00:56 -
Best upscaling software
By Spectral Fusion in forum Video ConversionReplies: 10Last Post: 15th Oct 2009, 21:13 -
DVP5990 and Upscaling
By Wanderlustus in forum DVD & Blu-ray PlayersReplies: 6Last Post: 24th Sep 2009, 20:26 -
Upscaling SD content on PC...?
By snadge in forum Video ConversionReplies: 21Last Post: 29th Jul 2009, 22:22 -
upscaling
By gunukhan in forum DVD & Blu-ray PlayersReplies: 1Last Post: 31st Jul 2007, 13:08