Raffriff's awesome VirtualDub tutorial

Discussion in 'Video Encoding' started by raffriff, Oct 27, 2011.

  1. Tor


    i 'm using WLMM just to add my intro to it.
  2. raffriff

    raffriff Moderator Staff Member Site Contributor

  3. Van


    Hello. I am having trouble with YouTube compatibility. I have a 30 min 1080p FRAPS segment that I want to combine with another 30 min 1080p FRAPS segment. I opened the first file then tried to append the second. Using the options x264vfw CQP 18, zero latency (I've had a problem with YouTube not liking my videos without this), VirtualDub Hack, and an audio-stream combined with my commentary in PCM mode, I am unable to get YouTube to correctly display my video. The output video is the correct length. However, when I upload to Youtube, it cuts off at 25 mins. Any ideas?
  4. raffriff

    raffriff Moderator Staff Member Site Contributor

    Hi Van, you say "tried" to append the video. If the append failed, you should have gotten an immediate error message, so the append should be OK.

    When you play the completed video, is the length showing as 60 min? Does it play all right in a media player, at the beginning, middle and end? Is audio in sync at the end?

    BTW "QCP" (constant quantizer) mode is somewhat less space-efficient than "CRF" (constant ratefactor). Not that it matters too much - unless the loss of compression pushes your file over your upload limit? :confused:
    Now Youtube has cut videos short in the past...
    ...and in these cases, the problem was the AVI format. I have never had a problem with using the AVI format, but then I haven't made any 60 min videos. You could try encoding to .MP4 instead, using another program such as StaxRip, I guess. I don't have a good answer for you, sorry :(

    Supported Youtube formats

    Encoding Video For YouTube: Advanced Specifications
  5. Van


    Yes it plays fine all 60 mins. I have made multiple videos over 60 mins before. Filesize is usually less than 6GB so that is not a problem. I only ran into this problem using the append function. I have encoded it multiple times now still same issue appears. I am uploading the two separate segments individually now to see if they will work. I will try the mp4 container to see if it works. Thanks for the reply.
  6. Van


    Actually never mind. I had another file that was 60+ mins that got cutoff without appending without me noticing. I am uploading the mp4 version now. One of my videos in AVI was proper length and the other got cut by 8 mins. Probably just need to do the MP4 format if this works. Thanks.
  7. raffriff

    raffriff Moderator Staff Member Site Contributor

    OK - please let me know how it works out :)
  8. Van


    Yes the problem is the AVI container. Works perfectly with MP4.
  9. raffriff

    raffriff Moderator Staff Member Site Contributor

    Thanks for the follow up. At least now we know. :(
  10. Van


    Looks like I am going to start using MeGUI and AVIsynth from now. Wish Virtualdub had the ability to work with mp4 etc.
  11. ETAdmin

    ETAdmin Administrator Staff Member

  12. raffriff

    raffriff Moderator Staff Member Site Contributor

    @admin, that's for input only.

    For those of you that like VirtualDub but want an MP4 final video for uploading, I've experimented with remuxing AVI to MP4 (converting only the container without re-compressing the video; it's very fast). I find FFCoder works very well for this.
    • source: VirtualDub-encoded AVI with x264 video and Lame MP3 or PCM audio
    • remuxing program: FFCoder
      • Encoder menu: Use Multiple Encoders (AutoSelect)
      • File format: MP4
      • Video: Copy
      • Audio: Copy (if you encoded in Virtualdub with Lame MP3)
      • Audio: AAC (if you encoded as PCM uncompressed)
      • Use Avisynth: unchecked
    Here's a generic ffmpeg command line to remux AVI to MP4 (must have MP3 audio, not PCM)
    "path\to\ffmpeg.exe" -i "path\to\output.avi" -acodec copy -vcodec copy "path\to\output.mp4"
    There's probably a way to save direct to MP4 with VirtualDub's Options, External Encoders, but at this point it's really, really difficult to use.
  13. raffriff

    raffriff Moderator Staff Member Site Contributor

    Last edited: Aug 15, 2013
  14. raffriff

    raffriff Moderator Staff Member Site Contributor

    Hi huwa, it sounds like it's an issue with Virtualdub batch job list maker (or VDBJ for short :))

    But first, how many videos are you doing? 20 videos total, or 20 times however many filter changes? I wouldn't bother with a batch creator unless you are doing hundreds. The normal VirtualDub method works pretty well if you only have a few dozen files: drop a file, Queue batch, save as AVI, repeat.

    Make a keyboard shortcut for the above: Options, Keyboard shortcuts, Jobs.SaveAsAVI.

    Find the right version of VirtualDub to work with this script. On the web page he even says use VirtualDubMod, last updated in 2003. It's old, very old. Not surprising the script doesn't work right with any recent VirtualDub.

    More info - for programmers and advanced users:

    After a lot of trial and error, I know what is wrong with the scripts VDBJ makes, and how to fix them with search-and-replace. What follows is how to do it in TextPad. Most good text editors can do the same thing, but with a slightly different regular expression syntax.

    1. Lines starting with "// $id fd": this is the Job ID, in hex. These numbers must be unique for each video. VDBJ makes them all the same. A quick and dirty fix is to replace the last few digits with an incrementing sequence.
    // $id fd\([0-9a-f]+\)[0-9a-f][0-9a-f][0-9a-f]$​
    // $id fd\1\i(100)​

    2. Find all lines that say "VirtualDub.subset.Clear();" and delete them
    (Find, Bookmark all; Edit, Delete, Bookmarked lines)​

    3. Find all lines starting with "VirtualDub.subset.AddRange" and delete them

    4. Find all lines starting with "VirtualDub.video.SetRangeFrames" and delete them

    Note: I am not teaching anybody how to use TextPad or Regexp's! Use Google!
    huwa likes this.
  15. Thanks Riffraff for the effort and the reply .........really appreciated. Actually I need to do 5 midifications to 20 clips and thus need to create 100 vids. I found that if you drag and drop the vid into VD the filter setting are retained so all I have to do is drag and drop the vid, press F7 and change the filename .............................. for 100 times :eek:. By the time of reply I have 40 ready so I'll continue like this.

    Again thanks for the reply, you're great.
    raffriff likes this.
  16. Hi again raffriff, I have another question. Now that I've finished the 100 modifications, I tried taking the video clips from one pc to the other using a memory stick and discovered that the file sizes of the modifications increased dramatically, such that they do not fit any more :mad:.

    As an example a video clip which had a size of 12,577KB increased to 1,448,583KB after blurring (or any other modification). I tried going round the menus to find a setting to keep the original size of the file or something similar, but did not manage. Do you know what going on?

    Thanks for your support
  17. raffriff

    raffriff Moderator Staff Member Site Contributor

    You aren't compressing your videos. You need to read this tutorial thread from the beginning, at least read the first post. :)
  18. Thanks raffriff - as you can see I'm green in video processing.:) That's why the modifications were fast since I had no compressing. Now it's taking much longer ...................
  19. Hi, raffriff!
    If I use deshaker filter and sharpen filter, then what the sequence in which they should be used?
  20. raffriff

    raffriff Moderator Staff Member Site Contributor

    Hi sevilho, I think I would sharpen last, but you should try it for yourself both ways.

    EDIT - I mean of course, select a short section - 5 or 10 seconds - to test; compress it; change filter order; compress it again and compare.

Share This Page