VideoHelp Forum
+ Reply to Thread
Page 4 of 4
FirstFirst ... 2 3 4
Results 91 to 105 of 105
Thread
  1. Member racer-x's Avatar
    Join Date
    Mar 2003
    Location
    3rd Rock from the Sun
    Search Comp PM
    @ PhotoCat, I'm glad to see you've learned so much in so little time...............

    It's been years since I've used DeShaker plugin in Virtualdub, I had to re-learn how to use it. Anyway I used a hand-held shaky shot from my trusty Canon t2i, it records similar to your 5D. I used this script to feed the source into Virtualdub 32-bit:

    Code:
    FFVideoSource("D:\Capture\t2i\River\Duck.MOV").AssumeFPS(30000,1001) 
    ConvertToRGB(matrix="Rec601", interlaced=false)
    Then I encoded with a good compromise between quality and file size using External Encoder - FFmpeg:

    -f rawvideo -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -vcodec libx264 -level 41 -preset medium -crf 18 -g 15 "%(tempvideofile)"

    That used b-frames with a GOP of 15 (half-second). I then compared the two and I think you'd be hard pressed to see color differences between the two. Here is the Split-Screen comparison:
    Image Attached Files
    Last edited by racer-x; 6th Sep 2014 at 14:17.
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  2. Member
    Join Date
    Aug 2014
    Location
    Canada
    Search PM
    racer-x:
    Thanks for generous sharings from u, poisondeathray, jagabo and many others once again!
    Without your help, I am sure I didn't even know where to start doing video editing...
    I will try your FFmpeg script with b-frames. BTW, why does adding b frame help?
    Nice duck video BTW
    Tks!
    Quote Quote  
  3. Member racer-x's Avatar
    Join Date
    Mar 2003
    Location
    3rd Rock from the Sun
    Search Comp PM
    B-Frames help with compression and make the encoded file smaller. The original Canon .MOV also uses B-Frames. Normally for something like this (intermediate), I wouldn't use anything but I-Frames only (intra). You expressed a desire to lower file size, This is a good compromise.

    I would keep GOP size to half-second lengths. So for 30p, use -g 15 and for 24p, use -g 12. Experiment and settle on your own "Best Settings".
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  4. Member
    Join Date
    Aug 2014
    Location
    Canada
    Search PM
    Got it. Tks for your valuable info once again racer-x. I will play with b-frame then when I wanna distribute the clip.
    Otherwise I will keep it all I-frame for future editing. Tks for pointing out this key feature!
    Quote Quote  
  5. Originally Posted by PhotoCat View Post
    why does adding b frame help?
    B frames can reference both frames before and after them, making them smaller (at least theoretically). They are also encoded with lower quality also making them smaller (the idea being that you won't notice a few lower quality frames because the picture will be cleaned up by a P or I frame soon).

    So the advantage of using B frames is smaller file sizes. The disadvantages are lower quality in the B frames (but hopefully higher visual quality overall) and more difficult and more time consuming encoding and decoding.

    If you can't live with the large size of lossless compression, I recommend you use only I and P frames with short GOPs for intermediate files. In the range of ~3 to ~15 depending on the speed of your computer/editor. Shorter GOPs are easier to decode. Longer GOPs give more compression.
    Quote Quote  
  6. Member
    Join Date
    Aug 2014
    Location
    Canada
    Search PM
    Tks for the insight jagabo! Very helpful. I will probably use -intra for master copies and
    use I & b frames only for distribution purposes.

    My rationale of not using lossless compression is that the original Canon .mov file is also H.264 encoded.
    For the same file size, one should be able to re-encode the deshaked file without much loss of quality.
    I could be wrong though.
    Last edited by PhotoCat; 7th Sep 2014 at 21:14.
    Quote Quote  
  7. Member
    Join Date
    Aug 2014
    Location
    Canada
    Search PM
    Originally Posted by poisondeathray View Post

    eg. riffraff has done a bunch of tutorials, and zip files you can download . Others have contributed on this board as well

    http://forums.virtualdub.org/index.php?act=ST&f=3&t=21733
    http://forums.virtualdub.org/index.php?act=ST&f=3&t=18840&st=0
    http://forums.virtualdub.org/index.php?act=ST&f=3&t=22055

    Tks posiondeathray for pointing me to these tutorials of how to set up VD external decoder to mux in audio.

    While they are powerful utilities, I find Windows' Movie Maker 6.0 more user friendly in positioning and fading the audio exactly
    where I want in the video clip. The preview capability in Movie Maker 6.0 is excellent.
    The unfortunate part about movie maker 6.0 is that it doesn't allow me to tweak all the parameters and output formats as in FFmpeg.

    So my workflow now after deshaker and re-encode: I will pull all the resulting files into Movie Maker 6.0 to mux in music or audio.

    Is Movie Maker 6.0 a good choice for quality videos? Is avidemux any good in comparison?
    I heard lightworks was excellent but it only exports in 720p for the free version. Also played with VSDC Free Video Editor. Is it any good?

    Any other similar software you can
    recommend that retains the power of FFmpeg with the ease of Moviemaker 6.0?
    Quote Quote  
  8. Member racer-x's Avatar
    Join Date
    Mar 2003
    Location
    3rd Rock from the Sun
    Search Comp PM
    A very good free one is aviutl. it can output full settings x264, x265, AVI and ffmpeg via export plugin. I use it about 90% of the time.

    Its what I used to make the splitscreen of the duck. I exported to mp4 via ffmpeg export plugin.
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  9. Member
    Join Date
    Aug 2014
    Location
    Canada
    Search PM
    Tks racer-x for the tips. I will try that out...

    Found a brief description of the AviUtl and it sounds promising!

    What is AviUtl?

    About AviUtl...

    AviUtl is made by Mr. Ken with first release back in 16 August 2003.[1] NLE functions was added since August 2008 with the plugin “exedit60.auf”[2]
    At its core, it is just another basic video editor. Yet, together with the Advanced Editing Plugin, it becomes a FREE Alternative to the expensive Adobe After Effect/Premier. (Well, not that powerful yet, but sufficient for most amateur needs anyway)

    With other plugins, it can also act as (batch) transcoder and various unique image composer. Since there are plugins that empower it with features similar to Avisynth, you can also consider to use it as a GUI-based alternative to Avisynth (AviUtl can read AVS scripts with proper plugin).

    What set AviUtl apart is that it can create content out of nothing,[3] not just modifying other video files. As shown in my demo video #2 below, you can create a whole video without a single external(user-provided) file.

    AviUtl can also transcode using Intel Quick Sync (with the QSV plugin)[4]. The only other working alternative (freeware) being MediaCoder.(BUT there is no CUDA-based plugin for AviUtl yet!)

    Note that AviUtl is not really a transcoder/disc ripper. So if you want to rip a DVD or BD, perhaps Handbrake or MeGUI will be better for the job.

    As you may have noticed, this program is highly expandable through plugins and scripts. Hence, the more active the community is, the more powerful it gets!

    *Features overview

    hide feature list

    – Vanilla
    Frame cutting, pasting
    Export frame image
    File linking, muxing
    Deinterlace
    Crop and Resize
    Denoise
    Color Effects/Corrections
    Sound track extraction
    – Advanced Editing Plugin

    Visual Effects/CG Synthesis (Static AND Animated)
    Audio track manipulations
    Layer Support
    LUA Scripting Support
    Quote Quote  
  10. Member
    Join Date
    Aug 2014
    Location
    Canada
    Search PM
    Excellent job on your 2 youtube tutorials on aviutl racer-x! Thank you so much for sharing your wealth of knowledge once again!
    Aviutl's immense power has certainly been demonstrated on your 2nd tutorial! Vy cool for the layer mask!
    Everything seems more powerful than Windows Moviemaker 6.0 except perhaps the storyboard and the ease of adding
    transitions. Perhaps there is a storyboard in Aviutl that I don't know about?

    Avidemux seems quite similar to Aviutl. Any reasons why u prefer Aviutl over Avidemux? Tks!
    Quote Quote  
  11. AviDemux is a buggy piece of crap.
    Quote Quote  
  12. Member
    Join Date
    Aug 2014
    Location
    Canada
    Search PM
    Just found out the latest version of AviDemux is time based, not frame based. This is a deal breaker for me. Tks jagabo for sharing your experience!
    Quote Quote  
  13. Member
    Join Date
    Aug 2014
    Location
    Canada
    Search PM
    On 20140912 I had the following working workflow but I have got something better now. Pls see below (20140918):

    Old workflow posted on 20140912:

    In summary, the following workflow worked well for me in re-encoding Canon 5Dmk2 .mov file after deshake:

    1) Decode Canon 5D2 .mov using avisynth & preview with AvsPMod

    LoadPlugin("C:\Virtualdub32\FFMS2\ffms2.dll")
    FFmpegSource2("MVI_8695.mov", threads=1, atrack=-1)
    ConvertToRGB32(matrix="PC.601" )

    2) Use Avsf to quick mount the .avs file in (1) so that it can frameserve to Virtualdub 64 for deshaking (I found Virtualdub 64 more robust in deshaking)

    3) Deshake in virtualdub and tweak parameters for best stabilization in pass 1 and pass 2; it is important to set rolling shutter to 70% for 5D2.

    4) Use FFmpeg external decoder to export the resulting .mp4 file with the following switches

    -f rawvideo -s %(width)x%(height) -r %(fpsnum)/%(fpsden) -i - -vcodec libx264 -level 51 -preset slow -intra -crf 12 -qmin 1 -pix_fmt yuv420p -vf colormatrix=bt601:bt709 -x264opts colorprim=bt709:transfer=bt709:colormatrix=bt709 "%(tempvideofile)"

    5) Copy the original audio track from original.mov to the exported output.mp4 video only file:

    ffmpeg -i original.mov -i new.mp4 -map 0:1 -map 1:0 -c:v copy -c:a copy -f mov output.mov

    6) Double check audio sync, if good then we are done. If not, we need to sync it up in virtualdub or similar application.

    ----------------------------------------------------------------------------------------------------------------------------------
    New workflow posted on 20140918:

    My new simplified workflow without needing any intermediate files to "re-encode" Canon 5D2 .mov after deshake for future use:

    1) Decode Canon 5D2 .mov using avisynth & preview with AvsPMod

    LoadPlugin("C:\Virtualdub32\FFMS2\ffms2.dll")
    FFmpegSource2("MVI_8695.mov", threads=1, atrack=-1)
    ConvertToRGB32(matrix="PC.601" )

    2) Use Avsf to quick mount the .avs file in (1) so that it can frameserve to Virtualdub 64 for deshaking (I found Virtualdub 64 more robust in deshaking)

    3) Deshake in virtualdub and tweak parameters for best stabilization in pass 1 and pass 2; it is important to set rolling shutter to 70% for 5D2.

    Note Step 1)-3) same as before

    4) Make sure deshake results are good in step 3 by previewing in virtualdub or by writing out a .avi or .mp4 file. You can delete this file later.

    5) With Deshaker filter set to pass 2, save virtualdub "processing settings" in a .vdscript file

    6) In the original .avs avisynth script append at the end:

    LoadVirtualDubPlugin ("C:\Virtualdub32\plugins32\Deshaker.vdf", "deshaker", preroll=0)
    # or your own path to Deshaker.vdf on your computer
    deshaker()

    7) Using a text editor, open the .vdscript file saved in step 5 and find the deshaker command:

    e.g.
    VirtualDub.video.filters.Add("Deshaker v3.0");
    VirtualDub.video.filters.instance[0].Config("18|2|30|15|1|0|1|0|640|480|1|2|3000|3000| 3000|3000|4|1|3|2|0.1|15|300|4|W:\\Canon5D2_2014\\ 201406th\\Video\\coffeehouse\\mvi_4058_deshake01.l og|0|0|1100|0|450|200|0|350|850|100|0|0|0|1|30|30| 15|1|0|0|30|30|0|0|1|0|1|0|0|10|50|1|70|0|0|20|500 0|100|20|0");

    8) Cut and paste whatever inside the "" marks into deshaker()

    i.e.

    deshaker("18|2|30|15|1|0|1|0|640|480|1|2|3000|3000 |3000|3000|4|1|3|2|0.1|15|300|4|W:\\Canon5D2_2014\ \201406th\\Video\\coffeehouse\\mvi_4058_deshake01. log|0|0|1100|0|450|200|0|350|850|100|0|0|0|1|30|30 |15|1|0|0|30|30|0|0|1|0|1|0|0|10|50|1|70|0|0|20|50 00|100|20|0")

    9) Save the .avs script! We are done! No intermediate files are needed and the highest possible quality of the original .mov is preserved!

    10) To further edit the deshaked file, simply drag the .avs file into Aviutl or other avisynth-compatible editors.
    (Editing directly inside the .avs script is ok too)

    11) To export from Aviutl, use FFmpeg external H264 encoder profile or any other encoder of your choice inside Aviutl.

    So the final .avs file looks something like this: (and it is ready for future editing use)


    LoadPlugin("C:\Virtualdub32\FFMS2\ffms2.dll")
    FFmpegSource2("MVI_4058.mov", threads=1, atrack=-1)
    ConvertToRGB32(matrix="PC.601" )
    Trim(0, 2595)
    #do your own trim before deshake
    LoadVirtualDubPlugin ("C:\Virtualdub32\plugins32\Deshaker.vdf", "deshaker", preroll=0)
    deshaker("18|2|30|15|1|0|1|0|640|480|1|2|3000|3000 |3000|3000|4|1|3|2|0.1|15|300|4|W:\\Canon5D2_2014\ \201406th\\Video\\coffeehouse\\mvi_4058_deshake01. log|0|0|1100|0|450|200|0|350|850|100|0|0|0|1|30|30 |15|1|0|0|30|30|0|0|1|0|1|0|0|10|50|1|70|0|0|20|50 00|100|20|0")
    Trim(0,1000) + Trim(2000,2500)
    #do your own trim after deshake

    Yay! We now have everything contained inside a small .avs avisynth script! avisynth rules!
    Oh... don't forget to archive the .log file from deshaker pass1 together with the original .mov file!
    Last edited by PhotoCat; 18th Sep 2014 at 18:55.
    Quote Quote  
  14. Member racer-x's Avatar
    Join Date
    Mar 2003
    Location
    3rd Rock from the Sun
    Search Comp PM
    I tested out your final workflow loading the Deshaker.vdf in Avisynth. It works very well, thanks for sharing........
    Got my retirement plans all set. Looks like I only have to work another 5 years after I die........
    Quote Quote  
  15. Member
    Join Date
    Oct 2011
    Location
    argentina
    Search Comp PM
    I made a script for automatic deshake and compress all videos in folder:
    https://sourceforge.net/projects/virtualdub-batch-video-deshake/

    Will add 5d markII in next version, although it's easy to modify...
    Hope it helps someone.
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!