VideoHelp Forum




+ Reply to Thread
Page 2 of 2
FirstFirst 1 2
Results 31 to 50 of 50
  1. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by poisondeathray View Post
    DirectShowSource() + ffdshow directshow for mjpeg seems to work correctly with unique frames , it doesn't clamp YUV levels either (some decoders like picvideo do) , and you can salvage some shadow detail. 1961 unique frames, 30.0003 FPS in the Jersey clip . Smooth motion . I normally hate DSS, but it works in this case
    DirectShowSource and ffdshow's decoder worked on the Jersey AVI. That's what I get for thinking inside the box, first time around. But the 640x480 still has dupes (although it does play more smoothly, given a spastic camera). I'll remake later and remove the earlier versions of my mkv's. Thanks again.

    Originally Posted by poisondeathray View Post
    I don't have elements , but it might be mishandling the clips as well
    Tried two versions over the years. Both went back to the store next day.
    Last edited by sanlyn; 19th Mar 2014 at 09:33.
    Quote Quote  
  2. Premiere pro decodes it like vdub, AviSource() , with the duplicates at 30FPS. I suspect elements will do the same

    The pattern isn't perfect - It's not exactly 1 in 6 duplicates, so the frame rate isn't 25 (if you try to decimate 1 in 6 there will be good frames dropped, jumps in motion) . It looks like FFMS2 decodes without the dupes exactly and the framerate is 26.511, framecount 1733

    I guess it's ok to leave the dupes if you need it NTSC compatible for DVD (it's easier to go to 29.97), but OP is in the UK...(although most UK DVD players can play NTSC discs) . But duplicates will make any temporal filtering less effective
    Last edited by poisondeathray; 8th Jan 2014 at 14:40.
    Quote Quote  
  3. It all sounds like Chinese to me, lol

    Anyone recommend a book i can read to begin learning all these skills?
    Quote Quote  
  4. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Hmm. Brother, I wish there was a book. Or two. Do we hear three? Amazon has tons of them, but so technical they're probably priscribed for chronic insomniacs. It's a wonder there isn't a basic but nominally comprehensive guide to apps like Avisynth and VirtualDub; in the process of reading such guides you pick up many processing terms. Problem is, those guides date back to the jurassic era.

    If you look at the upper left side of a forum page you'll see links to other parts of the forum. At the very top is ye olde description of what's involved in the formats for BluRay and DVD. Good to know this, even if you don't have to memorize it (who memorizes?). Many unfamiliar terms have brief descriptions in the forum Glossary.

    Most of this material is acquired piecemeal. There are a few pros in the forum with backgrounds in video processing and engineering who contribute frequently. But learning for most members is done in threads such as the Restoration forum, where things can be fairly simple but often get into heavy coding and horrendous problems. Follow some of these threads and you can see how problems are analyzed and resolved. The other way to learn this stuff is to use it -- which is both simple and complex. If you download Avisynth and install it (easy!) and start browsing its online guide, the intro seems simple enough...until you get to the point where you have to apply specific methods to specific problems. At that point you would undoubtedly head for the nearest forum thread that discusses the issue and actually uses those commands and filters. Again, VirtualDub seems easy enough, but most people never get beyond loading up a video and watching it. Consider that VDub has over 200 filters available and dozens of media decoders. Some of those filters mimic the features of Photoshop Pro and other pro apps.

    The first thing that users of popular NLE's from Adobe and SONY come to learn is that Avisynth and VirtualDub are, by and large, superior when it comes to really repairing and cleaning a video and playing tricks with it. This doesn't mean that apps like Premire Pro and After Effects don't have very strong features found nowhere else, but try repairing bad frames, compression artifacts, chroma bleed, rainbows, interlace problems, etc., with those apps and you'll see where the big guys fall short. On the other hand try to do some motion tracking or adding 5 sountracks with Avisynth/VDub and you'll see why After Effects costs so much.

    Having spent my first year of video processing with a popular consumer NLE, I can say that you don't learn much from them. They're designed to make many decisions for you (many of which are incorrect), but not to teach you much beyond which icon to click. When you get into the "pro" apps you get hundreds of pages of user guides that go more deeply into video matters. From experience I know that most consumers spend big money on pro apps and then use them like basic, budget editors. Fact is, the user guides for the heavy apps are free downloads from the makers' websites.

    There is a ton of free websites and internet tutorials on color correction and broadcast processing standards. There's another ton of websites on what kinds of filters are in Avisynth. One of those guides is Improving Visual Quality with AviSynth Filters -- an anime website, but 90% of the methods discussed can be used with "real" video; I used some of them on your AVI's. With images and text designed for beginners, they discuss stuff like aliasing, grain, halos, rainbows, anti-banding etc. (which is one way to find out what some of the geeks around here are talking about. A picture is worth a thousand words).

    Unless someone here can post a viable suggestions on "a book", I'd say there really isn't a single, easily digestible book. For starters, try a couple of the sources I mentioned, or the link to using Avisynth at the anime site. In fact you could spend a week at that single site and not see all of it. Later I'll remake your two AVI's and hope I can post the scripts I used to work on them with some comments on what they do....probably one of the best ways of "getting into it". Sharing scripts is a great idea, especially when someone who knows more than you proceeds to tear it apart and teach our readers something. Happens all the time.
    Last edited by sanlyn; 19th Mar 2014 at 09:33.
    Quote Quote  
  5. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Nope. The duplicate frames are still there. I even disbaled the PicVideo MJPG codec in teh registry (a harrowing and time-consuming experience, believe me) and enabled ffdshow+AVisynth. And so on. Not only does the same dupe frame problem exist (I even found one spot where there are 3 dupes), but as poisiondeathray noted the duplicated rate is inconsistent. It's usually one dupe every 6 frames, but I found 2 dupe sets within 6 frames, followed and sometimes preceded by missing frames. DirectShowSource did give visibly smoother playback even with the dupoes, but both clips show a worsening situation near the end.

    Either this problem exists in the original recording, or Premiere Elements is causing it. Or something, who knows? I no longer have Elements in any of my PC's, so I can't advise on what settings might be involved. We have seen many MJPG videos in the forum, but none that I recall with this hassle.
    Last edited by sanlyn; 19th Mar 2014 at 09:33.
    Quote Quote  
  6. Premiere Elements is non-destructive to original clips, isn't it?
    Quote Quote  
  7. ps. thanks for the detailed beginners advice
    Quote Quote  
  8. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Only with DV-AVI, as far as I know. It re-rencodes everything else. Perhaps someone familiar with its settings might offer suggestions. You could try making an edit in VirtualDub and then saving the results using "fast recompress" or "Direct Stream copy" (do NOT use "Full processing mode").
    Last edited by sanlyn; 19th Mar 2014 at 09:33.
    Quote Quote  
  9. Originally Posted by DJBoshh View Post
    Premiere Elements is non-destructive to original clips, isn't it?
    It won't change your original clips. (Though making a safety backup is always a good idea anyway.)

    As Sanlyn rightly points out only certain kinds of files can be "smart" rendered, output identical to input.
    Quote Quote  
  10. Originally Posted by sanlyn View Post
    Nope. The duplicate frames are still there.
    Yeah, this is a tough one. I tested with the Mummy AVI and used DirectShowSource, which I normally avoid like the plague. It opens the video at 30fps and based on the cyclical pattern of sixes and sevens I came up with this:

    TDecimate(Mode=0,Cycle=135,CycleR=22)

    The result is 25.111fps and it seems to be pretty good. If the plan is to make a PAL DVD, I suppose you could go for 25fps, but there'll be dropped frames as a result unless you just slow the result to 25fps and adjust the audio as well. For NTSC DVD DGPulldown can easily add the pulldown. For anything else you can use about any framerate you want.
    Last edited by manono; 9th Jan 2014 at 14:16.
    Quote Quote  
  11. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Right, and a coool fix. It might work for the Mummy file, but not for the Jersey file. Toward the end, the latter AVI gets haywire and it still has missing frames. In some cases there appear to be 2 or 3 frames gone; At one point the repeat pattern is 1 2 3 4 5 5 6 -missing- 7 7 8 9 10 11 11 ..... How that would fare for longer lengths of the video is something else, because the patterns change and/or get worse toward the end of both clips.

    I think we should be looking for a way to make a properly cut sample. I don't believe Premiere Elements can handle it, at least not with whatever settings are currently in use. And PE won't smart-render anyway with MJPG.
    Last edited by sanlyn; 19th Mar 2014 at 09:34.
    Quote Quote  
  12. I think i remember trying to create a movie with those clips a couple of years ago in Windows Live Movie Maker. That wouldn't modify the clips at all, would it?
    Quote Quote  
  13. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    It certainly would. We wouldn't recommend WMM. At all. For anything.
    Last edited by sanlyn; 19th Mar 2014 at 09:34.
    Quote Quote  
  14. WMM shouldn't modify the original clips. Anything produced by WMM from your MJPEG AVI files would be re-encoded.
    Quote Quote  
  15. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    That's what I mean. It's the output that's re-encoded, not the original.
    Last edited by sanlyn; 19th Mar 2014 at 09:34.
    Quote Quote  
  16. I just wanted to be sure that was clear to the OP.
    Quote Quote  
  17. Understood, ty. So it's a mystery why these clips were made so poorly, other than the original camcorder was simply not very good?
    Quote Quote  
  18. Originally Posted by DJBoshh View Post
    So it's a mystery why these clips were made so poorly, other than the original camcorder was simply not very good?
    I've seen other cheap cameras do similar things.
    Quote Quote  
  19. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    It's possible. I made movies in the UK several times with my Kodak still camera (it recorded 4:3 QuickTime .mov at 23.976 FPS progressive). Not exactly a cheapo with that expensive German anastigmat lens on the front of it, which doubled the price. But I had no frame problems transferring it to MPEG2/DVD and applying pulldown to make it play at 29.972. I turned off the Auto Gain (AGC) and set exposure manually, but still had to work some levels corrections later. Not exactly a Steven Spielberg production, but it had no major problems.

    You might try making a short cut with VirtualDub and direct stream copy and check the results. I don't know how the samples were made.
    Last edited by sanlyn; 19th Mar 2014 at 09:34.
    Quote Quote  
  20. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    The attached mkv is square-pixel 30FPS NTSC with AC3 audio. I gave up trying to fix lost frames or totally eliminating stutter, but DirectShowSource gave a smoother video. This mkv replaces those I posted earlier. I joined the Mummy and Jersey vids and applied a few transitions with TMPGEnc. Sorry for the 5000 Mbps bitrate, but it gave much better motion handling. On a final delivery copy I'd bump up the x264 bitrate to 6000 or even 8000 VBR for playback on large screens.

    Aside from the weird frame structure, both videos display luma pumping. The Mummy video starts too bright, but darkening it made it look horrible by midstream. The same goes for the Jersey AVI. I maintain that Auto Gain on consumer cameras is the work of the devil. The Jersey AVI has grimy and dense blacks to begin with; I used a contrast mask to bring up shadow detail. Both vids have CMOS noise and streaks in the darks, so I applied a smoother. There are obvious missing frames in the Jersey vid; it's possible to interpolate new frames with Avisynth, but considering the amount of motion it would be very tricky and audio would have to be adjusted accordingly.

    Both scripts begin by opening the AVI audio and video separately, then muxing them. I did this because I resampled the audio to kosher 48KHz beforehand in VirtualDub and saved the audio as PCM .wav. There are other ways of doing it. Both scripts are similar but with some differences between them.

    Mummy script, with comments on lines that begin with "#":
    Code:
    Import(D:\Avisynth 2.5\plugins\Stab.avs")
    
    aud = WavSource("E:\forum\djboshh\mummy_01.wav")
    vid = DirectShowSource("E:\forum\djboshh\2010-08-05 - emily and her mummy with a message for ben.AVI")
    av=audiodub(vid,aud)
    
    # ---- tell Avisynth to work with the new "av" version of the input files
    av
    
    # ---- Fix black levels and brights, etc. + smooth the response curve
    ColorYUV(cont_y=-5,off_v=-1.5)
    SmoothLevels(6, 0.90, 255, 15, 225, chroma=200,limiter=0,tvrange=true,dither=100)
    MCTemporalDenoise(settings="Low")
    
    # ---- Some mild stablization for excess camera shake
    Stab(range=2,dxmax=8,dymax=8)
    
    # ---- Crop off uneven borders modified by stab() processing
    Crop(2,4,-2,0)
    
    # ---- Replace modified borders + add 40 pixels left+right for 720x480 square-pixel
    AddBorders(42,2,42,2)
    
    # ---- Mild sharpen
    LSFMod(strength=50)
    
    # ---- Anti-banding & add fine grain to remove plastic "digital" look and MJPG compression noise
    GradFun2DBmod()
    
    # ---- To RGB for VirtualDub filters
    ConvertToRGB32(matrix="Rec601",interlaced=false)
    return last
    
    # ------------------------ VirtualDub filter used ---------------------------
    # -- TemporalSmoother set to low 3 (clean low-frequency noise in dark areas)
    # ---------------------------------------------------------------------------
    # ----- After VirtualDub processing, save as Lagarith YV12 for encoding -----
    Jersey script, with comments on lines that begin with "#":
    Code:
    aud = WavSource("E:\forum\djboshh\2010-12-20 - emily in jersey.wav")
    vid = DirectShowSource("E:\forum\djboshh\2010-12-20 - emily in jersey.AVI")
    av=audiodub(vid,aud)
    
    # ---- tell Avisynth to work with the new "av" version of the input files
    av
    
    # ---- Delete the first frame (too noisy, blurry)
    Trim(1,0)
    
    # ---- Fix black levels and brights, etc. + smooth the response curve
    ColorYUV(cont_y=35,gain_y=10,off_y=24,off_u=-1,off_v=-2.5,cont_u=-10)
    SmoothLevels(6,0.95,255,20,225,chroma=200,limiter=0,tvrange=true,dither=100) #,protect=6)
    SmoothTweak(saturation=1.3)
    
    # ---- Bring up dense shadow detail without affecting brighter areas
    ContrastMask(enhance=3.0)
    
    # ---- Denoiser (salt+pepper grain, streaking in darks, some rough edges
    MCTemporalDenoise(settings="Low")
    
    # ---- Mild sharpen
    LSFMod(strength=50)
    
    # ---- Anti-banding & add fine grain to remove plastic "digital" look and MJPG compression noise
    GradFun2DBmod()
    
    # ---- To RGB for VirtualDub filters
    ConvertToRGB32(matrix="Rec601",interlaced=false)
    return last
    
    # ---- Code for ContrastMask function used on Line 13.
    # ---- Similar to contrast adjustment layer in Photoshop.
    
    function ContrastMask(clip v, float "gblur", float "enhance")
    {
    enhance = default (enhance, 10.0)
    gblur = default (gblur, 20.0)
    enhance = (enhance>=0.0 && enhance<=10.0) ? float(enhance*0.1) : 1.0
    v2=v.Tweak(sat=0)
    v2=v2.invert()
    v2=v2.gaussianblur(50.0,50.0+gblur)
    photoshop_overlay=mt_lutxy(v,v2,"x 127.5 > y 255 x - 127.5 / * x 255 x - - + y x 127.5 / * ? ")
    merged=overlay(v,photoshop_overlay,opacity=enhance)
    return merged
    }
    
    #  ----------------------- VirtualDub filters used --------------------------
    # -- TemporalSmoother set to low 3 (clean low-frequency noise in dark areas)
    # -- Gradation curves to tweak lower gamma and tame "hot" brights
    # -- ColorMill to lower midpoints slightly
    # -- FadeFX = fade last 20 frames to black
    # ---------------------------------------------------------------------------
    # ----- After VirtualDub processing, save as Lagarith YV12 for encoding -----
    Both scripts were saved as lossless Lagarith YV12 AVI, then joined and encoded with TMPGenc Video Mastering Woks 5 with some minor transitions applied.
    Last edited by sanlyn; 19th Mar 2014 at 09:34.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!